-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Copr jobs for pulpcore-packaging
- Loading branch information
Showing
3 changed files
with
133 additions
and
1 deletion.
There are no files selected for viewing
84 changes: 84 additions & 0 deletions
84
theforeman.org/pipelines/release/pulpcore_packaging_rpm_copr_release.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
def packages_to_build | ||
|
||
pipeline { | ||
agent { label 'rpmbuild' } | ||
|
||
options { | ||
timestamps() | ||
timeout(time: 4, unit: 'HOURS') | ||
disableConcurrentBuilds() | ||
ansiColor('xterm') | ||
} | ||
|
||
stages { | ||
stage('Clone Packaging') { | ||
steps { | ||
checkout([ | ||
$class : 'GitSCM', | ||
branches : [[name: "*/${packaging_branch}"]], | ||
extensions: [[$class: 'CleanCheckout']], | ||
userRemoteConfigs: [ | ||
[url: 'https://github.com/theforeman/pulpcore-packaging'] | ||
] | ||
]) | ||
|
||
} | ||
} | ||
stage('Find packages') { | ||
steps { | ||
copyArtifacts(projectName: env.JOB_NAME, optional: true) | ||
|
||
script { | ||
|
||
if (fileExists('commit')) { | ||
|
||
commit = readFile(file: 'commit').trim() | ||
packages_to_build = find_changed_packages("${commit}..HEAD") | ||
|
||
} else { | ||
|
||
packages_to_build = [] | ||
|
||
} | ||
} | ||
} | ||
} | ||
stage('Release Build Packages') { | ||
when { | ||
expression { packages_to_build != [] } | ||
} | ||
steps { | ||
|
||
setup_obal() | ||
|
||
withCredentials([file(credentialsId: 'theforeman-bot-copr', variable: 'copr_config')]) { | ||
obal( | ||
action: "release", | ||
extraVars: [ | ||
'build_package_build_system': 'copr', | ||
'build_package_copr_config': copr_config, | ||
], | ||
packages: packages_to_build | ||
) | ||
} | ||
|
||
} | ||
} | ||
} | ||
|
||
post { | ||
success { | ||
archive_git_hash() | ||
} | ||
failure { | ||
notifyDiscourse( | ||
env, | ||
"${env.JOB_NAME} failed for ${packages_to_build.join(',')}", | ||
"pulpcore packaging release job failed: ${env.BUILD_URL}" | ||
) | ||
} | ||
cleanup { | ||
deleteDir() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters