]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph,ceph-build: build prerelease containers (using container/) 2304/head
authorDan Mick <dan.mick@redhat.com>
Mon, 9 Dec 2024 21:37:09 +0000 (13:37 -0800)
committerDan Mick <dan.mick@redhat.com>
Mon, 9 Dec 2024 21:44:13 +0000 (13:44 -0800)
Signed-off-by: Dan Mick <dan.mick@redhat.com>
ceph-build/build/build_rpm
ceph-build/build/setup_rpm
ceph-build/config/definitions/ceph-build.yml
ceph/config/definitions/ceph.yml

index 2393951c59eb93fde27c9f4d67be2af89f6ec063..b6eb307c2ba865d734433d0aca73142d51e4ce0b 100644 (file)
@@ -60,5 +60,28 @@ EOF
     $VENV/chacractl repo update ${chacra_repo_endpoint}
 fi
 
+# XXX perhaps use job parameters instead of literals; then
+# later stages can also use them to compare etc.
+if [[ $DISTRO == "centos" && "$RELEASE" =~ 8|9 ]] ; then
+    loop=0
+    ready=false
+    while ((loop < 15)); do
+      curl -s "https://shaman.ceph.com/api/search/?project=ceph&distros=centos/${RELEASE}/${ARCH}&sha1=${SHA1}&ref=${BRANCH}&flavor=${FLAVOR}" > shaman.status
+      if [[ ($(jq -r '.[0].extra.build_url' < shaman.status) == ${BUILD_URL}) && ($(jq -r '.[0].status' < shaman.status) == 'ready') ]] ; then ready=true; break; fi
+      ((loop = loop + 1))
+      sleep 60
+    done
+
+    if [[ "$ready" == "false" ]] ; then
+      echo "FAIL: timed out waiting for shaman repo to be built:  https://shaman.ceph.com/api/repos/${chacra_endpoint}/flavors/${FLAVOR}/"
+      # don't fail the build here on purpose
+      # update_build_status "failed" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
+      # exit 1
+    fi
+    # get into $WORKSPACE/$dist/ceph-$cephver, where the copied source tree is
+    cd ${WORKSPACE}/dist/ceph-${cephver}/container
+    CEPH_SHA1=${SHA1} ./build.sh
+fi
+
 # update shaman with the completed build status
 update_build_status "completed" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
index af2c1e288f51f2d54edf89c9cd1f5e867d0885cf..9052ceb0a1204b0f1eeb31abfb26b71b9117553f 100644 (file)
@@ -30,6 +30,12 @@ pwd
 get_rpm_dist
 setup_rpm_build_deps
 
+if [[ $DISTRO == "centos" && "$RELEASE" =~ 8|9 ]] ;
+then
+    podman login -u $CONTAINER_REPO_USERNAME -p $CONTAINER_REPO_PASSWORD $CONTAINER_REPO_HOSTNAME/$CONTAINER_REPO_ORGANIZATION
+fi
+
+
 BRANCH=`branch_slash_filter $BRANCH`
 
 if [[ ! -f /etc/redhat-release && ! -f /usr/bin/zypper ]] ; then
index 03331101263aa336114ca097183a4e9c34b456b2..a101450eeac6f968236ad8934c9c2e2f252c68f7 100644 (file)
           - text:
               credential-id: shaman-api-key
               variable: SHAMAN_API_KEY
+          - username-password-separated:
+              credential-id: quay-ceph-io-ceph-ci
+              username: CONTAINER_REPO_USERNAME
+              password: CONTAINER_REPO_PASSWORD
index 6aaa496dcc43462fb77fb8a58e1e18c822beb8e2..ccfa86ee468fb76d2a96e65de47ecde426cfaae5 100644 (file)
@@ -86,6 +86,16 @@ SECURITY: Builds from BRANCH-release branch in ceph-private.git (private repo)."
           description: "A list of architectures to build for. Available options are: x86_64, and arm64"
           default: "x86_64 arm64"
 
+      - string:
+          name: CONTAINER_REPO_HOSTNAME
+          description: "Name of (prerelease) container repo server (i.e. 'quay.ceph.io')"
+          default: "quay.ceph.io"
+
+      - string:
+          name: CONTAINER_REPO_ORGANIZATION
+          description: "Name of (prerelease) container repo organization (i.e. 'ceph').  Container build script will add prerelease-<arch>"
+          default: "ceph"
+
     builders:
       - multijob:
           name: 'ceph setup phase'