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 ceph-container-prerelease-build #2182

Merged
merged 1 commit into from
Dec 16, 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
28 changes: 28 additions & 0 deletions ceph-container-prerelease-build/build/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
set -e

sudo apt-get install jq -y

cd "$WORKSPACE"/ceph-container/ || exit
TMPNAME=$(mktemp)

ARCH=x86_64 \
TEST_BUILD_ONLY=true \
PRERELEASE=true \
FORCE_BUILD=true \
X86_64_FLAVORS_TO_BUILD=${X86_64_FLAVORS_TO_BUILD} \
AARCH64_FLAVORS_TO_BUILD="" \
FULL_BUILD_TAG_TMPFILE=${TMPNAME} \
bash -x contrib/build-ceph-base.sh

imagename=$(<${TMPNAME})

# strip leading path components, sub _ for : in name
imagetag=${imagename##*/}
imagetag=${imagetag//:/_}
imagetag=quay.ceph.io/ceph/prerelease:${imagetag}

docker tag ${imagename} ${imagetag}
docker login --username ${QUAY_CEPH_IO_USERNAME} --password ${QUAY_CEPH_IO_PASSWORD} quay.ceph.io
docker push ${imagetag}
docker rmi ${imagename}
1 change: 1 addition & 0 deletions ceph-container-prerelease-build/config/JENKINS_URL
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.jenkins.ceph.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
- job:
name: ceph-container-prerelease-build
node: huge && trusty && x86_64
project-type: freestyle
defaults: global
display-name: 'ceph-container-prerelease-build: build prerelease container images and push to quay.ceph.io'
quiet-period: 5
block-downstream: false
block-upstream: false
retry-count: 3
properties:
- build-discarder:
days-to-keep: 1
num-to-keep: 1
artifact-days-to-keep: 1
artifact-num-to-keep: 1
- github:
url: https://github.com/ceph/ceph-container

parameters:
- string:
name: BRANCH
description: "Branch of ceph-container.git to use"
default: main

- string:
name: X86_64_FLAVORS_TO_BUILD
description: "x86 flavor(s) to build"
default: "reef,centos,8"

scm:
- git:
url: https://github.com/ceph/ceph-container.git
branches:
- ${BRANCH}
browser: auto
basedir: "ceph-container"
timeout: 20

builders:
- shell:
!include-raw:
- ../../../scripts/build_utils.sh
- ../../build/build

wrappers:
- inject-passwords:
global: true
mask-password-params: true
- credentials-binding:
- username-password-separated:
credential-id: release-build-quay-ceph-io
username: QUAY_CEPH_IO_USERNAME
password: QUAY_CEPH_IO_PASSWORD
- username-password-separated:
credential-id: download-ceph-com-prerelease
username: PRERELEASE_USERNAME
password: PRERELEASE_PASSWORD