Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Copr nightly test pipeline #349

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should/could this pass staging_source somehow, so we don't need theforeman/forklift#1717?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mhh, runDuffyPipeline doesn't allow us to pass arbitrary parameters to the job, so probably not so easy.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reached the same conclusion. However, forklift should match CI if someone goes to run things so I think it's OK.

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