CI: Use RHEL 8 CDN subscribed instance

Replace RHEL 8.2 nightly images with a RHEL 8 CDN subscribed instance so
we can test with the exact content a customer would have.

Signed-off-by: Major Hayden <major@redhat.com>
This commit is contained in:
Major Hayden 2020-05-27 16:32:01 -05:00 committed by Tom Gundersen
parent 5299e7e242
commit 18fe05f686
4 changed files with 29 additions and 39 deletions

34
schutzbot/Jenkinsfile vendored
View file

@ -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')
}
}
}

View file

@ -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 \

View file

@ -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} \

View file

@ -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 }}"