Skip to content

Commit aed8cbe

Browse files
committed
ceph-dev-pipeline: check shaman for "are there binaries"
Checking chacra isn't the right check, since this build's chacra url is not necessarily the prior successful build's chacra url (there are multiple chacra instances). Instead, check shaman to see if there is a built repo; if so, the build can be skipped. build_container will search shaman again to find the repo url to use to build the container, if necessary. Signed-off-by: Dan Mick <[email protected]>
1 parent e3c476c commit aed8cbe

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

ceph-dev-pipeline/build/Jenkinsfile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//
2+
// vim: ts=2 sw=2 expandtab
3+
//
14
ceph_build_repo = "https://github.com/ceph/ceph-build"
25
ceph_build_branch = "main"
36
base_node_label = "gigantic"
@@ -6,6 +9,7 @@ ubuntu_releases = [
69
"jammy": "22.04",
710
"focal": "20.04",
811
]
12+
913
debian_releases = [
1014
"bookworm": "12",
1115
"bullseye": "11",
@@ -333,18 +337,13 @@ pipeline {
333337
}
334338
steps {
335339
script {
336-
sh './scripts/setup_chacractl.sh'
337-
def chacra_url = sh(
338-
script: '''grep url ~/.chacractl | cut -d'"' -f2''',
339-
returnStdout: true,
340-
).trim()
341340
def os = get_os_info(env.DIST)
342-
def chacra_endpoint = "ceph/${env.BRANCH}/${env.SHA1}/${os.name}/${os.version_name}/${env.ARCH}/flavors/${env.FLAVOR}/"
343-
def chacractl_rc = sh(
344-
script: "$HOME/.local/bin/chacractl exists binaries/${chacra_endpoint}",
345-
returnStatus: true,
346-
)
347-
if ( chacractl_rc == 0 && env.FORCE != "true" ) {
341+
def shaman_endpoint = "https://shaman.ceph.com/api/repos/ceph/${env.BRANCH}/${env.SHA1}/${os.name}/${os.version_name}"
342+
def chacra_repo_url = sh(
343+
script: '''curl ${shaman_endpoint} | jq -r 'first(.[] | select(.flavor == "env.FLAVOR" and (.archs | any(. == "env.ARCH")) and .status=="ready")) | .chacra_url'''',
344+
returnStdout: true
345+
).trim()
346+
if ( chacra_repo_url != "" && env.FORCE != "true" ) {
348347
println("Skipping compilation since chacra already has artifacts. To override, use THROWAWAY=true (to skip this check) or FORCE=true (to re-upload artifacts).")
349348
build_matrix["${DIST}_${ARCH}"] = false
350349
}

0 commit comments

Comments
 (0)