diff --git a/schutzbot/Jenkinsfile b/schutzbot/Jenkinsfile index 620429de6..5d802e79d 100644 --- a/schutzbot/Jenkinsfile +++ b/schutzbot/Jenkinsfile @@ -44,17 +44,8 @@ pipeline { sh "schutzbot/mockbuild.sh" } } - stage('RHEL 8.2') { - agent { label "rhel82" } - environment { - OPENSTACK_CREDS = credentials('psi-openstack-clouds-yaml') - } - steps { - sh "schutzbot/mockbuild.sh" - } - } - stage('RHEL 8.3') { - agent { label "rhel83" } + stage('RHEL 8 CDN') { + agent { label "rhel8" } environment { OPENSTACK_CREDS = credentials('psi-openstack-clouds-yaml') } @@ -62,6 +53,15 @@ pipeline { sh "schutzbot/mockbuild.sh" } } + // stage('RHEL 8.3 Nightly') { + // agent { label "rhel83" } + // environment { + // OPENSTACK_CREDS = credentials('psi-openstack-clouds-yaml') + // } + // steps { + // sh "schutzbot/mockbuild.sh" + // } + // } } } stage("Functional Testing") { @@ -127,20 +127,20 @@ pipeline { } } } - stage('RHEL 8.2 base') { - agent { label "rhel82" } + stage('RHEL 8 CDN Base') { + agent { label "rhel8" } environment { TEST_TYPE = "base" } steps { run_tests() } post { always { - preserve_logs('rhel82-base') + preserve_logs('rhel8-base') } } } - stage('RHEL 8.2 image') { - agent { label "rhel82" } + stage('RHEL 8 CDN Image') { + agent { label "rhel8" } environment { TEST_TYPE = "image" AWS_CREDS = credentials('aws-credentials-osbuildci') @@ -152,7 +152,7 @@ pipeline { } post { always { - preserve_logs('rhel82-image') + preserve_logs('rhel8-image') } } } diff --git a/schutzbot/mockbuild.sh b/schutzbot/mockbuild.sh index 351ff413a..a871ecfbb 100755 --- a/schutzbot/mockbuild.sh +++ b/schutzbot/mockbuild.sh @@ -4,14 +4,6 @@ set -euxo pipefail # Get OS details. source /etc/os-release -# Install packages. -sudo dnf -qy install createrepo_c mock -if [[ $ID == 'fedora' ]]; then - sudo dnf -qy install python3-openstackclient -else - sudo pip3 -qq install python-openstackclient -fi - # Set variables. CONTAINER=osbuildci-artifacts WORKSPACE=${WORKSPACE:-$(pwd)} @@ -22,13 +14,11 @@ REPO_DIR=repo/${BUILD_TAG}/${ID}${VERSION_ID//./} make srpm make -C osbuild srpm -# Fix RHEL 8 mock template. -sudo curl --retry 5 -Lsko /etc/mock/templates/rhel-8.tpl \ - https://gitlab.cee.redhat.com/snippets/2208/raw - -# Add fastestmirror to the Fedora template. -sudo sed -i '/^install_weak_deps.*/a fastestmirror=1' \ - /etc/mock/templates/fedora-branched.tpl +# Fix RHEL 8 mock template for non-subscribed images. +if [[ $NODE_NAME == "rhel82*" ]] || [[ $NODE_NAME == "rhel83*" ]]; then + sudo curl --retry 5 -Lsko /etc/mock/templates/rhel-8.tpl \ + https://gitlab.cee.redhat.com/snippets/2208/raw +fi # Compile RPMs in a mock chroot sudo mock -r $MOCK_CONFIG --no-bootstrap-chroot \ diff --git a/schutzbot/run_tests.sh b/schutzbot/run_tests.sh index c995fc0fc..cfe83e7a1 100755 --- a/schutzbot/run_tests.sh +++ b/schutzbot/run_tests.sh @@ -38,9 +38,6 @@ trap "preserve_journal" ERR # Write a simple hosts file for Ansible. echo -e "[test_instances]\nlocalhost ansible_connection=local" > hosts.ini -# Get the SHA of osbuild-composer which Jenkins checked out for us. -OSBUILD_COMPOSER_VERSION=$(git rev-parse HEAD) - # Deploy osbuild/osbuild-composer via the repository we created. export ANSIBLE_CONFIG=ansible-osbuild/ansible.cfg git clone https://github.com/osbuild/ansible-osbuild.git ansible-osbuild @@ -49,9 +46,6 @@ ansible-playbook \ -e install_source=os \ ansible-osbuild/playbook.yml -# Ensure the testing package is installed. -sudo dnf -y install osbuild-composer-tests - # Run the tests. ansible-playbook \ -e workspace=${WORKSPACE} \ diff --git a/schutzbot/test.yml b/schutzbot/test.yml index 783414e47..7384f023c 100644 --- a/schutzbot/test.yml +++ b/schutzbot/test.yml @@ -1,6 +1,7 @@ --- -- hosts: localhost +- name: Run osbuild-composer tests + hosts: localhost become: yes vars: passed_tests: [] @@ -9,6 +10,11 @@ - vars.yml tasks: + - name: Install osbuild-composer-tests + dnf: + name: osbuild-composer-tests + state: present + - name: Run osbuild-composer base tests include_tasks: test_runner_base.yml loop: "{{ osbuild_composer_base_tests }}"