Server IP : 85.214.239.14 / Your IP : 3.144.244.48 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/root/usr/lib/python3/dist-packages/ansible_collections/ovirt/ovirt/automation/ |
Upload File : |
#!/bin/bash -xe ROOT_PATH="$PWD" BUILD_ROOT_PATH="/tmp" # Remove any previous artifacts rm -rf "$BUILD_ROOT_PATH/ansible_collections" rm -f "$BUILD_ROOT_PATH"/*tar.gz # Create exported-artifacts dir [[ -d exported-artifacts ]] || mkdir "$ROOT_PATH/exported-artifacts/" # Create builds ./build.sh build ovirt "$BUILD_ROOT_PATH" ./build.sh build rhv "$BUILD_ROOT_PATH" OVIRT_BUILD="$BUILD_ROOT_PATH/ansible_collections/ovirt/ovirt" RHV_BUILD="$BUILD_ROOT_PATH/ansible_collections/redhat/rhv" cd "$OVIRT_BUILD" # Create the src.rpm rpmbuild \ -D "_srcrpmdir $BUILD_ROOT_PATH/output" \ -D "_topmdir $BUILD_ROOT_PATH/rpmbuild" \ -ts ./*.gz # Remove the tarball so it will not be included in galaxy build mv ./*.gz "$ROOT_PATH/exported-artifacts/" # Overwrite github README with dynamic mv ./README.md.in ./README.md # Create tar for galaxy ansible-galaxy collection build # Create the rpms rpmbuild \ -D "_rpmdir $BUILD_ROOT_PATH/output" \ -D "_topmdir $BUILD_ROOT_PATH/rpmbuild" \ --rebuild "$BUILD_ROOT_PATH"/output/*.src.rpm cd "$RHV_BUILD" # Remove the tarball so it will not be included in automation hub build rm -rf ./*.gz # Overwrite github README with dynamic mv ./README.md.in ./README.md # create tar for automation hub ansible-galaxy collection build # Store any relevant artifacts in exported-artifacts for the ci system to # archive find "$BUILD_ROOT_PATH/output" -iname \*rpm -exec mv "{}" "$ROOT_PATH/exported-artifacts/" \; # Export build for Ansible Galaxy mv "$OVIRT_BUILD"/*tar.gz "$ROOT_PATH/exported-artifacts/" # Export build for Automation Hub mv "$RHV_BUILD"/*tar.gz "$ROOT_PATH/exported-artifacts/" COLLECTION_DIR="/usr/local/share/ansible/collections/ansible_collections/ovirt/ovirt" export ANSIBLE_LIBRARY="$COLLECTION_DIR/plugins/modules" mkdir -p $COLLECTION_DIR cp -r "$OVIRT_BUILD"/* "$OVIRT_BUILD"/.config "$COLLECTION_DIR" cd "$COLLECTION_DIR" antsibull-changelog lint -v ansible-lint roles/* cd "$ROOT_PATH" # If PR changed something in ./plugins or ./roles it is required to have changelog if [[ $(git diff --quiet HEAD^ ./plugins ./roles)$? -eq 1 && $(git diff --quiet HEAD^ ./changelogs)$? -eq 0 ]]; then echo "ERROR: Please add changelog."; exit 1; fi