Skip to content

Commit

Permalink
Add Copr nightly test pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Oct 31, 2023
1 parent f34021f commit 5de6898
Show file tree
Hide file tree
Showing 3 changed files with 291 additions and 80 deletions.
129 changes: 100 additions & 29 deletions theforeman.org/pipelines/release/pipelines/foreman-rpm.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,114 @@ pipeline {
}

stages {
stage('Mash Koji Repositories') {
agent { label 'sshkey' }

steps {
mash('foreman', 'nightly')
stage('koji') {
when {
expression { stage_source == 'koji' }
}
}
stage('Repoclosure') {
agent { label 'el' }
stages {
stage('koji-mash-repositories') {
agent { label 'sshkey' }

steps {
script {
parallel repoclosures('foreman', foreman_el_releases, foreman_version)
steps {
mash('foreman', 'nightly')
}
}
}
post {
always {
deleteDir()
stage('koji-repoclosure') {
agent { label 'el' }

steps {
script {
parallel repoclosures('foreman', foreman_el_releases, foreman_version)
}
}
post {
always {
deleteDir()
}
}
}
}
}
stage('Install Test') {
agent any
stage('koji-install-test') {
agent any

steps {
script {
runDuffyPipeline('foreman-rpm', foreman_version)
steps {
script {
runDuffyPipeline('foreman-rpm', foreman_version)
}
}
}
stage('koji-push-rpms') {
agent { label 'admin && sshkey' }
steps {
script {
for (release in foreman_el_releases) {
push_rpms_direct("foreman-${foreman_version}/${release}", "${foreman_version}/${release}")
}
}
}
}
}
}
stage('Push RPMs') {
agent { label 'admin && sshkey' }
steps {
script {
for (release in foreman_el_releases) {
push_rpms_direct("foreman-${foreman_version}/${release}", "${foreman_version}/${release}")
stage('staging') {
agent { label 'el8' }
when {
expression { stage_source == 'stagingyum' }
}
stages {
stage('staging-build-repository') {
steps {
git url: "https://github.com/theforeman/theforeman-rel-eng", poll: false

script {
foreman_el_releases.each { distro ->
sh "./build_stage_repository foreman ${foreman_version} ${distro}"
}
}
}
}
stage('staging-copy-repository') {
steps {
script {
dir('tmp') {
rsync_to_yum_stage('foreman', 'foreman', foreman_version)
}
}
}
}
stage('staging-repoclosure') {
steps {
script {
def parallelStagesMap = [:]
def name = 'foreman-staging'
foreman_el_releases.each { distro ->
parallelStagesMap[distro] = { repoclosure(name, distro, foreman_version) }
}
parallel parallelStagesMap
}
}
post {
always {
deleteDir()
}
}
}
stage('staging-install-test') {
agent any

steps {
script {
runDuffyPipeline('foreman-rpm', foreman_version)
}
}
}
stage('staging-push-rpms') {
agent { label 'admin && sshkey' }

steps {
script {
foreman_el_releases.each { distro ->
push_foreman_staging_rpms('foreman', foreman_version, distro)
}
}
}
}
}
Expand All @@ -56,4 +128,3 @@ pipeline {
}
}
}

128 changes: 100 additions & 28 deletions theforeman.org/pipelines/release/pipelines/katello.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,115 @@ pipeline {
}

stages {
stage('Mash Koji Repositories') {
agent { label 'sshkey' }

steps {
mash("katello", katello_version)
stage('koji') {
when {
expression { stage_source == 'koji' }
}
}
stage('Katello Repoclosure') {
agent { label 'el' }
stages {
stage('koji-mash-repositories') {
agent { label 'sshkey' }

steps {
script {
parallel repoclosures('katello', foreman_el_releases, foreman_version)
steps {
mash("katello", katello_version)
}
}
}
post {
always {
deleteDir()
stage('koji-repoclosure') {
agent { label 'el' }

steps {
script {
parallel repoclosures('katello', foreman_el_releases, foreman_version)
}
}
post {
always {
deleteDir()
}
}
}
}
}
stage('Test Suites') {
agent any
stage('koji-install-test') {
agent any

steps {
script {
runDuffyPipeline('katello-rpm', katello_version)
}
}
}
stage('koji-push-rpms') {
agent { label 'admin && sshkey' }

steps {
script {
runDuffyPipeline('katello-rpm', katello_version)
steps {
script {
foreman_el_releases.each { distro ->
push_katello_rpms(katello_version, distro)
}
}
}
}
}
}
stage('Push RPMs') {
agent { label 'admin && sshkey' }
stage('staging') {
agent { label 'el8' }
when {
expression { stage_source == 'stagingyum' }
}
stages {
stage('staging-build-repository') {
steps {
git url: "https://github.com/theforeman/theforeman-rel-eng", poll: false

script {
foreman_el_releases.each { distro ->
sh "./build_stage_repository katello ${katello_version} ${distro}"
}
}
}
}
stage('staging-copy-repository') {
steps {
script {
dir('tmp') {
rsync_to_yum_stage('katello', 'katello', katello_version)
}
}
}
}
stage('staging-repoclosure') {
steps {
script {
def parallelStagesMap = [:]
def name = 'katello-staging'
foreman_el_releases.each { distro ->
parallelStagesMap[distro] = { repoclosure(name, distro, katello_version) }
}
parallel parallelStagesMap
}
}
post {
always {
deleteDir()
}
}
}
stage('staging-install-test') {
agent any

steps {
script {
runDuffyPipeline('katello-rpm', katello_version)
}
}
}
stage('staging-push-rpms') {
agent { label 'admin && sshkey' }

steps {
script {
foreman_el_releases.each { distro ->
push_katello_rpms(katello_version, distro)
steps {
script {
foreman_el_releases.each { distro ->
push_foreman_staging_rpms('katello', katello_version, distro)
}
}
}
}
}
Expand Down
Loading

0 comments on commit 5de6898

Please sign in to comment.