--- /dev/null
+#!/bin/bash
+set -e
+
+
+sudo apt-get install jq -y
+
+cd "$WORKSPACE"/ceph-container/ || exit
+export PRERELEASE=false
+ARCH=aarch64 bash -x contrib/build-ceph-base.sh
+
+echo "Now running manifest script"
+BUILD_SERVER_GOARCH=arm64 bash -x contrib/make-ceph-base-manifests.sh
--- /dev/null
+2.jenkins.ceph.com
--- /dev/null
+- job:
+ name: ceph-container-build-ceph-base-push-imgs-arm64
+ node: arm64 && xenial
+ project-type: freestyle
+ defaults: global
+ display-name: ceph-container-build-ceph-base-push-imgs-arm64
+ 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
+
+ triggers:
+ - timed: '@daily'
+
+ parameters:
+ - string:
+ name: AARCH64_FLAVORS_TO_BUILD
+ description: "arm64 flavor(s) to build"
+ default: "pacific,centos,8 quincy,centos,8 reef,centos,8"
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-container.git
+ branches:
+ - main
+ 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: ceph-container-quay-io
+ username: REGISTRY_USERNAME
+ password: REGISTRY_PASSWORD
--- /dev/null
+#!/bin/bash
+set -e
+
+
+sudo apt-get install jq -y
+
+cd "$WORKSPACE"/ceph-container/ || exit
+export PRERELEASE=false
+ARCH=x86_64 bash -x contrib/build-ceph-base.sh
+
+echo "Now running manifest script"
+BUILD_SERVER_GOARCH=amd64 bash -x contrib/make-ceph-base-manifests.sh
--- /dev/null
+2.jenkins.ceph.com
--- /dev/null
+- job:
+ name: ceph-container-build-ceph-base-push-imgs
+ node: huge && trusty && x86_64
+ project-type: freestyle
+ defaults: global
+ display-name: ceph-container-build-ceph-base-push-imgs
+ 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
+
+ triggers:
+ - timed: '@daily'
+
+ parameters:
+ - string:
+ name: X86_64_FLAVORS_TO_BUILD
+ description: "x86 flavor(s) to build"
+ default: "pacific,centos,8 quincy,centos,8 reef,centos,8"
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-container.git
+ branches:
+ - main
+ 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: ceph-container-quay-io
+ username: REGISTRY_USERNAME
+ password: REGISTRY_PASSWORD
--- /dev/null
+#!/bin/bash
+set -e
+
+
+cd "$WORKSPACE"/ceph-container/ || exit
+bash -x contrib/build-push-ceph-container-imgs-arm64.sh
--- /dev/null
+2.jenkins.ceph.com
--- /dev/null
+- job:
+ name: ceph-container-build-push-imgs-arm64
+ node: arm64 && xenial
+ project-type: freestyle
+ defaults: global
+ name: ceph-container-build-push-imgs-arm64
+ 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
+
+ triggers:
+ - github
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-container.git
+ branches:
+ - main
+ 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: ceph-container-quay-io
+ username: REGISTRY_USERNAME
+ password: REGISTRY_PASSWORD
--- /dev/null
+#!/bin/bash
+set -e
+
+
+cd "$WORKSPACE"/ceph-container/ || exit
+bash -x contrib/build-push-ceph-container-imgs.sh
--- /dev/null
+2.jenkins.ceph.com
--- /dev/null
+- job:
+ name: ceph-container-build-push-imgs-devel-nightly
+ node: huge && trusty && x86_64
+ project-type: freestyle
+ defaults: global
+ name: ceph-container-build-push-imgs-devel-nightly
+ 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
+
+ triggers:
+ - timed: '@daily'
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-container.git
+ branches:
+ - main
+ browser: auto
+ basedir: "ceph-container"
+ timeout: 20
+
+ builders:
+ - inject:
+ properties-content: |
+ DEVEL=true
+ - 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: ceph-container-quay-io
+ username: REGISTRY_USERNAME
+ password: REGISTRY_PASSWORD
--- /dev/null
+#!/bin/bash
+set -e
+
+
+cd "$WORKSPACE"/ceph-container/ || exit
+bash -x contrib/build-push-ceph-container-imgs.sh
--- /dev/null
+2.jenkins.ceph.com
--- /dev/null
+- job:
+ name: ceph-container-build-push-imgs
+ node: huge && trusty && x86_64
+ project-type: freestyle
+ defaults: global
+ name: ceph-container-build-push-imgs
+ 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
+
+ triggers:
+ - github
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-container.git
+ branches:
+ - main
+ 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: ceph-container-quay-io
+ username: REGISTRY_USERNAME
+ password: REGISTRY_PASSWORD
--- /dev/null
+#!/bin/bash
+
+set -e
+set -x
+
+function generate_filelist(){
+ if [[ "$pull_request_id" -eq "" || "${ghprbCommentBody:-}" = "jenkins flake8 all" ]]
+ then
+ find . -name '*.py'
+ else
+ curl -XGET "https://api.github.com/repos/ceph/ceph-container/pulls/$pull_request_id/files" |
+ jq '.[].filename' | # just the files please
+ tr -d '"' | # remove the quoting from JSON
+ grep ".py$" # just the python
+ fi
+
+}
+
+function check(){
+ local file
+ while read -r filename; do
+ pushd "$(dirname "$filename")"
+ file=$(basename "$filename")
+ sudo docker run --rm -v "$(pwd)"/"$file":/apps/"$file":z docker.io/alpine/flake8 "$file"
+ popd
+ done
+ return $?
+}
+
+function main() {
+ # install some of our dependencies if running on a jenkins builder
+ if [[ -n "$HUDSON_URL" ]]
+ then
+ sudo yum -y install epel-release
+ sudo yum -y install docker jq
+ sudo systemctl start docker || sudo systemctl start podman
+ pull_request_id=${ghprbPullId:-$2}
+ workspace=${WORKSPACE:-$1}
+ else
+ if ! command -v docker || ! command -v jq
+ then
+ echo "docker or jq is/are missing, install it/them"
+ exit 1
+ fi
+ pull_request_id=${ghprbPullId:-$2}
+ workspace=${WORKSPACE:-$1}
+ fi
+
+
+ sudo docker pull eeacms/flake8
+ pushd "$workspace/ceph-container"
+ generate_filelist | check
+ popd
+ exit $?
+}
+
+main "$@"
--- /dev/null
+2.jenkins.ceph.com
--- /dev/null
+- scm:
+ name: ceph-container
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-container.git
+ branches:
+ - ${sha1}
+ refspec: +refs/pull/*:refs/remotes/origin/pr/*
+ browser: auto
+ timeout: 20
+ skip-tag: true
+ wipe-workspace: false
+ basedir: "ceph-container"
+
+- job:
+ name: ceph-container-flake8
+ node: small && centos9
+ defaults: global
+ display-name: 'ceph-container-flake8'
+ properties:
+ - build-discarder:
+ days-to-keep: 15
+ num-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: -1
+ - github:
+ url: https://github.com/ceph/ceph-container/
+
+ parameters:
+ - string:
+ name: sha1
+ description: "A pull request ID, like 'origin/pr/72/head'"
+
+ triggers:
+ - github-pull-request:
+ admin-list:
+ - alfredodeza
+ - ktdreyer
+ - gmeno
+ - zcerza
+ org-list:
+ - ceph
+ trigger-phrase: 'jenkins flake8'
+ only-trigger-phrase: false
+ github-hooks: true
+ permit-all: true
+ auto-close-on-fail: false
+ status-context: "Testing: for sloppy python"
+ started-status: "Running: flake8"
+ success-status: "OK - nice work"
+ failure-status: "FAIL - please clean up for merge"
+
+ scm:
+ - ceph-container
+
+ builders:
+ - shell:
+ !include-raw:
+ - ../../build/build
+
--- /dev/null
+#!/bin/bash
+
+set -e
+set -x
+
+IGNORE_THESE_CODES="SC1091,SC2009,SC2001"
+IGNORE_THESE_FILES="variables_entrypoint.sh" # pipe-separated file names, e.g: foo|bar|foobar, this avoids shellcheck complaining that vars are not used (see: SC2034)
+
+function generate_filelist(){
+ if [[ "$pull_request_id" -eq "" || "${ghprbCommentBody:-}" = "jenkins lint all" ]]
+ then
+ find . -name '*.sh' | grep -vE "$IGNORE_THESE_FILES"
+ else
+ curl -XGET "https://api.github.com/repos/ceph/ceph-container/pulls/$pull_request_id/files" |
+ jq -r '.[] | select(.status != "removed") | .filename' | # just the files please (not removed)
+ grep ".sh$" | # just the bash
+ grep -vE "$IGNORE_THESE_FILES"
+ fi
+
+}
+
+function check(){
+ local file
+ while read -r filename; do
+ pushd "$(dirname "$filename")"
+ file=$(basename "$filename")
+ sudo docker run --rm -v "$(pwd)"/"$file":/"$file":z koalaman/shellcheck --external-sources --exclude "$IGNORE_THESE_CODES" /"$file"
+ popd
+ done
+ return $?
+}
+
+function main() {
+ # install some of our dependencies if running on a jenkins builder
+ if [[ -n "$HUDSON_URL" ]]
+ then
+ sudo yum -y install epel-release
+ sudo yum -y install docker jq
+ sudo systemctl start docker || sudo systemctl start podman
+ pull_request_id=${ghprbPullId:-$2}
+ workspace=${WORKSPACE:-$1}
+ else
+ if ! command -v docker || ! command -v jq
+ then
+ echo "docker or jq is/are missing, install it/them"
+ exit 1
+ fi
+ pull_request_id=${ghprbPullId:-$2}
+ workspace=${WORKSPACE:-$1}
+ fi
+
+
+ sudo docker pull koalaman/shellcheck
+ pushd "$workspace/ceph-container"
+ generate_filelist | check
+ popd
+ exit $?
+}
+
+main "$@"
--- /dev/null
+2.jenkins.ceph.com
--- /dev/null
+- scm:
+ name: ceph-container
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-container.git
+ branches:
+ - ${sha1}
+ refspec: +refs/pull/*:refs/remotes/origin/pr/*
+ browser: auto
+ timeout: 20
+ skip-tag: true
+ wipe-workspace: false
+ basedir: "ceph-container"
+
+- job:
+ name: ceph-container-lint
+ node: small && centos9
+ defaults: global
+ display-name: 'ceph-container-lint'
+ properties:
+ - build-discarder:
+ days-to-keep: 15
+ num-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: -1
+ - github:
+ url: https://github.com/ceph/ceph-container/
+
+ parameters:
+ - string:
+ name: sha1
+ description: "A pull request ID, like 'origin/pr/72/head'"
+
+ triggers:
+ - github-pull-request:
+ admin-list:
+ - alfredodeza
+ - ktdreyer
+ - gmeno
+ org-list:
+ - ceph
+ trigger-phrase: 'jenkins lint'
+ only-trigger-phrase: false
+ github-hooks: true
+ permit-all: true
+ auto-close-on-fail: false
+ status-context: "Testing: for sloppy bash"
+ started-status: "Running: shellchecker"
+ success-status: "OK - nice work"
+ failure-status: "FAIL - please clean up for merge"
+
+ scm:
+ - ceph-container
+
+ builders:
+ - shell:
+ !include-raw:
+ - ../../build/build
+
--- /dev/null
+#!/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}
--- /dev/null
+2.jenkins.ceph.com
--- /dev/null
+- 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
--- /dev/null
+#!/bin/bash
+
+# the following two methods exist in scripts/build_utils.sh
+pkgs=( "tox" )
+TEMPVENV=$(create_venv_dir)
+VENV=${TEMPVENV}/bin
+set_centos_python3_version "python3.9"
+install_python_packages $TEMPVENV "pkgs[@]" "pip==22.0.4"
+
+# XXX this might not be needed
+source $VENV/activate
+
+WORKDIR=$(mktemp -td tox.XXXXXXXXXX)
+
+prune_stale_vagrant_running_vms
+delete_libvirt_vms
+clear_libvirt_networks
+restart_libvirt_services
+update_vagrant_boxes
+
+if ! timeout 3h $VENV/tox -rv -e=$SCENARIO --workdir=$WORKDIR; then
+ echo "ERROR: Job didn't complete successfully or got stuck for more than 3h."
+ exit 1
+fi
--- /dev/null
+#!/bin/bash
+# There has to be a better way to do this than this script which just looks
+# for every Vagrantfile in scenarios and then just destroys whatever is left.
+
+cd $WORKSPACE/ceph-ansible/tests/functional
+
+scenarios=$(find . | grep Vagrantfile | xargs -r dirname)
+
+for scenario in $scenarios; do
+ cd $scenario
+ vagrant destroy -f
+ cd -
+done
--- /dev/null
+2.jenkins.ceph.com
--- /dev/null
+- project:
+ name: ceph-container-prs-auto
+ test:
+ - all_daemons
+ - lvm_osds
+ - collocation
+ jobs:
+ - 'ceph-container-prs-auto'
+
+- job-template:
+ name: 'ceph-container-prs-ceph_ansible-{test}'
+ id: 'ceph-container-prs-auto'
+ node: vagrant&&libvirt&¢os8&&(braggi||adami)
+ concurrent: true
+ defaults: global
+ display-name: 'ceph-container: Pull Requests [ceph_ansible-{test}]'
+ quiet-period: 5
+ block-downstream: false
+ block-upstream: false
+ retry-count: 3
+ properties:
+ - github:
+ url: https://github.com/ceph/ceph-container
+ - build-discarder:
+ days-to-keep: 15
+ num-to-keep: -1
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: -1
+
+ parameters:
+ - string:
+ name: sha1
+ description: "A pull request ID, like 'origin/pr/72/head'"
+
+ triggers:
+ - github-pull-request:
+ cancel-builds-on-update: true
+ allow-whitelist-orgs-as-admins: true
+ org-list:
+ - ceph
+ skip-build-phrase: '^jenkins do not test.*|.*\[skip ci\].*'
+ trigger-phrase: 'jenkins test ceph_ansible-{test}'
+ only-trigger-phrase: true
+ github-hooks: true
+ permit-all: true
+ auto-close-on-fail: false
+ status-context: "Testing: ceph_ansible-{test}"
+ started-status: "Running: ceph_ansible-{test}"
+ success-status: "OK - ceph_ansible-{test}"
+ failure-status: "FAIL - ceph_ansible-{test}"
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-container.git
+ branches:
+ - ${{sha1}}
+ refspec: +refs/pull/*:refs/remotes/origin/pr/*
+ browser: auto
+ timeout: 20
+ skip-tag: true
+ wipe-workspace: false
+
+ builders:
+ - inject:
+ properties-content: |
+ SCENARIO=ceph_ansible-{test}
+ - shell:
+ !include-raw-escape:
+ - ../../../scripts/build_utils.sh
+ - ../../build/build
+
+ wrappers:
+ - inject-passwords:
+ global: true
+ mask-password-params: true
+ - credentials-binding:
+ - username-password-separated:
+ credential-id: ceph-container-quay-io
+ username: REGISTRY_USERNAME
+ password: REGISTRY_PASSWORD
+
+ publishers:
+ - postbuildscript:
+ builders:
+ - role: SLAVE
+ build-on:
+ - FAILURE
+ - ABORTED
+ build-steps:
+ - shell: !include-raw: ../../build/teardown
+
+- job-template:
+ name: 'ceph-container-prs-ceph_ansible-{test}'
+ id: 'ceph-container-prs-trigger'
+ node: vagrant&&libvirt&¢os8
+ concurrent: true
+ defaults: global
+ display-name: 'ceph-container: Pull Requests [ceph_ansible-{test}]'
+ quiet-period: 5
+ block-downstream: false
+ block-upstream: false
+ retry-count: 3
+ properties:
+ - github:
+ url: https://github.com/ceph/ceph-container
+ - build-discarder:
+ days-to-keep: 15
+ num-to-keep: -1
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: -1
+
+ parameters:
+ - string:
+ name: sha1
+ description: "A pull request ID, like 'origin/pr/72/head'"
+
+ triggers:
+ - github-pull-request:
+ cancel-builds-on-update: true
+ allow-whitelist-orgs-as-admins: true
+ org-list:
+ - ceph
+ skip-build-phrase: '^jenkins do not test.*|.*\[skip ci\].*'
+ trigger-phrase: 'jenkins test ceph_ansible-{test}'
+ only-trigger-phrase: true
+ github-hooks: true
+ permit-all: true
+ auto-close-on-fail: false
+ status-context: "Testing: ceph_ansible-{test}"
+ started-status: "Running: ceph_ansible-{test}"
+ success-status: "OK - ceph_ansible-{test}"
+ failure-status: "FAIL - ceph_ansible-{test}"
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-container.git
+ branches:
+ - ${{sha1}}
+ refspec: +refs/pull/*:refs/remotes/origin/pr/*
+ browser: auto
+ timeout: 20
+ skip-tag: true
+ wipe-workspace: false
+
+ builders:
+ - inject:
+ properties-content: |
+ SCENARIO=ceph_ansible-{test}
+ - shell:
+ !include-raw-escape:
+ - ../../../scripts/build_utils.sh
+ - ../../build/build
+
+ wrappers:
+ - inject-passwords:
+ global: true
+ mask-password-params: true
+ - credentials-binding:
+ - username-password-separated:
+ credential-id: ceph-container-quay-io
+ username: REGISTRY_USERNAME
+ password: REGISTRY_PASSWORD
+
+ publishers:
+ - postbuildscript:
+ builders:
+ - role: SLAVE
+ build-on:
+ - FAILURE
+ - ABORTED
+ build-steps:
+ - shell: !include-raw: ../../build/teardown
--- /dev/null
+#!/bin/bash
+# vim: ts=4 sw=4 expandtab
+set -ex
+HOST=$(hostname --short)
+echo "Building on $(hostname)"
+echo " DIST=${DIST}"
+echo " BPTAG=${BPTAG}"
+echo " KEYID=${KEYID}"
+echo " WS=$WORKSPACE"
+echo " PWD=$(pwd)"
+echo "*****"
+env
+echo "*****"
+
+if test $(id -u) != 0 ; then
+ SUDO=sudo
+fi
+
+get_rpm_dist
+
+BRANCH=`branch_slash_filter $BRANCH`
+
+# Normalize variables across rpm/deb builds
+NORMAL_DISTRO=$DISTRO
+NORMAL_DISTRO_VERSION=$RELEASE
+NORMAL_ARCH=$ARCH
+
+chacra_endpoint="ceph/${BRANCH}/${SHA1}/${DISTRO}/${RELEASE}"
+
+SHAMAN_URL="https://shaman.ceph.com/api/search/?project=ceph&distros=centos/${RELEASE}/${ARCH}&sha1=${SHA1}&ref=${BRANCH}&flavor=${FLAVOR}"
+
+loop=0
+ready=false
+while ((loop < 15)); do
+ if [[ $(curl -s "$SHAMAN_URL" | jq -r '.[0].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}/"
+ echo
+ echo "NOTE: You should only use this job if there was already a successful ceph-dev*build job!"
+fi
+
+SHA1=$(curl -s "$SHAMAN_URL" | jq -r '.[0].sha1')
+
+pushd $WORKSPACE/ceph-container
+$SUDO -E CI_CONTAINER=true BASEOS_REGISTRY="quay.io/centos" SHA1=${SHA1} OSD_FLAVOR=${FLAVOR} CONTAINER_FLAVOR=${BRANCH},${DISTRO},${RELEASE} \
+ /bin/bash ./contrib/build-push-ceph-container-imgs.sh
+popd
+$SUDO rm -rf $WORKSPACE/ceph-container
+
+# update shaman with the completed build status
+if $NOTIFY_SHAMAN; then
+ update_build_status "completed" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
+fi
--- /dev/null
+#!/bin/bash -ex
+
+# The ceph-container dir is supposed to get deleted in the build_rpm script.
+# We used to add '|| true' to the container build so the dir would still get
+# deleted even if it failed. This changed in https://github.com/ceph/ceph-build/pull/1603
+# So now we need to delete the directory or the Wipe Workspace plugin will fail on the next build.
+cd $WORKSPACE
+sudo rm -rf ceph-container
+
+get_rpm_dist
+# note: the failed_build_status call relies on normalized variable names that
+# are infered by the builds themselves. If the build fails before these are
+# set, they will be posted with empty values
+BRANCH=`branch_slash_filter $BRANCH`
+
+# Normalize variables across rpm/deb builds
+NORMAL_DISTRO=$DISTRO
+NORMAL_DISTRO_VERSION=$RELEASE
+NORMAL_ARCH=$ARCH
+
+# update shaman with the failed build status
+failed_build_status "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
--- /dev/null
+- job:
+ name: ceph-dev-container-only
+ node: built-in
+ project-type: matrix
+ defaults: global
+ display-name: 'ceph-dev-container-only: Builds a quay.ceph.io/ceph-ci container given a BRANCH'
+ block-downstream: false
+ block-upstream: false
+ concurrent: true
+ properties:
+ - build-discarder:
+ days-to-keep: 30
+ artifact-days-to-keep: 30
+
+ scm:
+ - git:
+ url: git@github.com:ceph/ceph-container.git
+ basedir: ceph-container
+ credentials-id: 'jenkins-build'
+ branches:
+ - $CONTAINER_BRANCH
+ skip-tag: true
+ wipe-workspace: true
+
+ execution-strategy:
+ combination-filter: |
+ DIST == AVAILABLE_DIST && ARCH == AVAILABLE_ARCH &&
+ (ARCH == "x86_64" || (ARCH == "arm64" && ["xenial", "bionic", "centos7", "centos8"].contains(DIST)))
+ axes:
+ - axis:
+ type: label-expression
+ name: MACHINE_SIZE
+ values:
+ - gigantic
+ - axis:
+ type: label-expression
+ name: AVAILABLE_ARCH
+ values:
+ - x86_64
+ - arm64
+ - axis:
+ type: label-expression
+ name: AVAILABLE_DIST
+ values:
+ - centos8
+ - centos9
+ - axis:
+ type: dynamic
+ name: DIST
+ values:
+ - DISTROS
+ - axis:
+ type: dynamic
+ name: ARCH
+ values:
+ - ARCHS
+
+ parameters:
+ - string:
+ name: BRANCH
+ description: "The git branch (or tag) to build. NOTE: This branch must already be built and packages pushed to a chacra node!"
+ default: main
+
+ - string:
+ name: SHA1
+ description: "Change to a specific SHA1 if desired."
+ default: "latest"
+
+ - string:
+ name: DISTROS
+ description: "A list of distros to build for. Available options are: centos8 or centos9"
+ default: "centos8"
+
+ - string:
+ name: ARCHS
+ description: "A list of architectures to build for. Available options are: x86_64, and arm64"
+ default: "x86_64 arm64"
+
+ - choice:
+ name: FLAVOR
+ choices:
+ - default
+ - crimson
+ - jaeger
+ default: "default"
+ description: "Type of Ceph build, choices are: crimson, jaeger, default. Defaults to: 'default'"
+
+ - string:
+ name: CONTAINER_BRANCH
+ description: "For CI_CONTAINER: Branch of ceph-container to use"
+ default: main
+
+ - string:
+ name: CONTAINER_REPO_HOSTNAME
+ description: "For CI_CONTAINER: Name of container repo server (i.e. 'quay.io')"
+ default: "quay.ceph.io"
+
+ - string:
+ name: CONTAINER_REPO_ORGANIZATION
+ description: "For CI_CONTAINER: Name of container repo organization (i.e. 'ceph-ci')"
+ default: "ceph-ci"
+
+ - bool:
+ name: NOTIFY_SHAMAN
+ description: "Should we tell shaman this container built and change the corresponding build to READY?"
+ default: true
+
+
+ builders:
+ - shell:
+ !include-raw:
+ - ../../../scripts/build_utils.sh
+ - ../../build/build_rpm
+
+ publishers:
+ - postbuildscript:
+ builders:
+ - role: SLAVE
+ build-on:
+ - FAILURE
+ - ABORTED
+ build-steps:
+ - shell:
+ !include-raw:
+ - ../../../scripts/build_utils.sh
+ - ../../build/failure
+
+ wrappers:
+ - inject-passwords:
+ global: true
+ mask-password-params: true
+ - credentials-binding:
+ - 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
+ - build-name:
+ name: "#${BUILD_NUMBER} ${BRANCH}, ${DISTROS}, ${ARCH}, ${FLAVOR}"
+++ /dev/null
-#!/bin/bash
-set -e
-
-
-sudo apt-get install jq -y
-
-cd "$WORKSPACE"/ceph-container/ || exit
-export PRERELEASE=false
-ARCH=aarch64 bash -x contrib/build-ceph-base.sh
-
-echo "Now running manifest script"
-BUILD_SERVER_GOARCH=arm64 bash -x contrib/make-ceph-base-manifests.sh
+++ /dev/null
-2.jenkins.ceph.com
+++ /dev/null
-- job:
- name: ceph-container-build-ceph-base-push-imgs-arm64
- node: arm64 && xenial
- project-type: freestyle
- defaults: global
- display-name: ceph-container-build-ceph-base-push-imgs-arm64
- 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
-
- triggers:
- - timed: '@daily'
-
- parameters:
- - string:
- name: AARCH64_FLAVORS_TO_BUILD
- description: "arm64 flavor(s) to build"
- default: "pacific,centos,8 quincy,centos,8 reef,centos,8"
-
- scm:
- - git:
- url: https://github.com/ceph/ceph-container.git
- branches:
- - main
- 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: ceph-container-quay-io
- username: REGISTRY_USERNAME
- password: REGISTRY_PASSWORD
+++ /dev/null
-#!/bin/bash
-set -e
-
-
-sudo apt-get install jq -y
-
-cd "$WORKSPACE"/ceph-container/ || exit
-export PRERELEASE=false
-ARCH=x86_64 bash -x contrib/build-ceph-base.sh
-
-echo "Now running manifest script"
-BUILD_SERVER_GOARCH=amd64 bash -x contrib/make-ceph-base-manifests.sh
+++ /dev/null
-2.jenkins.ceph.com
+++ /dev/null
-- job:
- name: ceph-container-build-ceph-base-push-imgs
- node: huge && trusty && x86_64
- project-type: freestyle
- defaults: global
- display-name: ceph-container-build-ceph-base-push-imgs
- 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
-
- triggers:
- - timed: '@daily'
-
- parameters:
- - string:
- name: X86_64_FLAVORS_TO_BUILD
- description: "x86 flavor(s) to build"
- default: "pacific,centos,8 quincy,centos,8 reef,centos,8"
-
- scm:
- - git:
- url: https://github.com/ceph/ceph-container.git
- branches:
- - main
- 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: ceph-container-quay-io
- username: REGISTRY_USERNAME
- password: REGISTRY_PASSWORD
+++ /dev/null
-#!/bin/bash
-set -e
-
-
-cd "$WORKSPACE"/ceph-container/ || exit
-bash -x contrib/build-push-ceph-container-imgs-arm64.sh
+++ /dev/null
-2.jenkins.ceph.com
+++ /dev/null
-- job:
- name: ceph-container-build-push-imgs-arm64
- node: arm64 && xenial
- project-type: freestyle
- defaults: global
- name: ceph-container-build-push-imgs-arm64
- 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
-
- triggers:
- - github
-
- scm:
- - git:
- url: https://github.com/ceph/ceph-container.git
- branches:
- - main
- 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: ceph-container-quay-io
- username: REGISTRY_USERNAME
- password: REGISTRY_PASSWORD
+++ /dev/null
-#!/bin/bash
-set -e
-
-
-cd "$WORKSPACE"/ceph-container/ || exit
-bash -x contrib/build-push-ceph-container-imgs.sh
+++ /dev/null
-2.jenkins.ceph.com
+++ /dev/null
-- job:
- name: ceph-container-build-push-imgs-devel-nightly
- node: huge && trusty && x86_64
- project-type: freestyle
- defaults: global
- name: ceph-container-build-push-imgs-devel-nightly
- 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
-
- triggers:
- - timed: '@daily'
-
- scm:
- - git:
- url: https://github.com/ceph/ceph-container.git
- branches:
- - main
- browser: auto
- basedir: "ceph-container"
- timeout: 20
-
- builders:
- - inject:
- properties-content: |
- DEVEL=true
- - 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: ceph-container-quay-io
- username: REGISTRY_USERNAME
- password: REGISTRY_PASSWORD
+++ /dev/null
-#!/bin/bash
-set -e
-
-
-cd "$WORKSPACE"/ceph-container/ || exit
-bash -x contrib/build-push-ceph-container-imgs.sh
+++ /dev/null
-2.jenkins.ceph.com
+++ /dev/null
-- job:
- name: ceph-container-build-push-imgs
- node: huge && trusty && x86_64
- project-type: freestyle
- defaults: global
- name: ceph-container-build-push-imgs
- 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
-
- triggers:
- - github
-
- scm:
- - git:
- url: https://github.com/ceph/ceph-container.git
- branches:
- - main
- 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: ceph-container-quay-io
- username: REGISTRY_USERNAME
- password: REGISTRY_PASSWORD
+++ /dev/null
-#!/bin/bash
-
-set -e
-set -x
-
-function generate_filelist(){
- if [[ "$pull_request_id" -eq "" || "${ghprbCommentBody:-}" = "jenkins flake8 all" ]]
- then
- find . -name '*.py'
- else
- curl -XGET "https://api.github.com/repos/ceph/ceph-container/pulls/$pull_request_id/files" |
- jq '.[].filename' | # just the files please
- tr -d '"' | # remove the quoting from JSON
- grep ".py$" # just the python
- fi
-
-}
-
-function check(){
- local file
- while read -r filename; do
- pushd "$(dirname "$filename")"
- file=$(basename "$filename")
- sudo docker run --rm -v "$(pwd)"/"$file":/apps/"$file":z docker.io/alpine/flake8 "$file"
- popd
- done
- return $?
-}
-
-function main() {
- # install some of our dependencies if running on a jenkins builder
- if [[ -n "$HUDSON_URL" ]]
- then
- sudo yum -y install epel-release
- sudo yum -y install docker jq
- sudo systemctl start docker || sudo systemctl start podman
- pull_request_id=${ghprbPullId:-$2}
- workspace=${WORKSPACE:-$1}
- else
- if ! command -v docker || ! command -v jq
- then
- echo "docker or jq is/are missing, install it/them"
- exit 1
- fi
- pull_request_id=${ghprbPullId:-$2}
- workspace=${WORKSPACE:-$1}
- fi
-
-
- sudo docker pull eeacms/flake8
- pushd "$workspace/ceph-container"
- generate_filelist | check
- popd
- exit $?
-}
-
-main "$@"
+++ /dev/null
-2.jenkins.ceph.com
+++ /dev/null
-- scm:
- name: ceph-container
- scm:
- - git:
- url: https://github.com/ceph/ceph-container.git
- branches:
- - ${sha1}
- refspec: +refs/pull/*:refs/remotes/origin/pr/*
- browser: auto
- timeout: 20
- skip-tag: true
- wipe-workspace: false
- basedir: "ceph-container"
-
-- job:
- name: ceph-container-flake8
- node: small && centos9
- defaults: global
- display-name: 'ceph-container-flake8'
- properties:
- - build-discarder:
- days-to-keep: 15
- num-to-keep: 30
- artifact-days-to-keep: -1
- artifact-num-to-keep: -1
- - github:
- url: https://github.com/ceph/ceph-container/
-
- parameters:
- - string:
- name: sha1
- description: "A pull request ID, like 'origin/pr/72/head'"
-
- triggers:
- - github-pull-request:
- admin-list:
- - alfredodeza
- - ktdreyer
- - gmeno
- - zcerza
- org-list:
- - ceph
- trigger-phrase: 'jenkins flake8'
- only-trigger-phrase: false
- github-hooks: true
- permit-all: true
- auto-close-on-fail: false
- status-context: "Testing: for sloppy python"
- started-status: "Running: flake8"
- success-status: "OK - nice work"
- failure-status: "FAIL - please clean up for merge"
-
- scm:
- - ceph-container
-
- builders:
- - shell:
- !include-raw:
- - ../../build/build
-
+++ /dev/null
-#!/bin/bash
-
-set -e
-set -x
-
-IGNORE_THESE_CODES="SC1091,SC2009,SC2001"
-IGNORE_THESE_FILES="variables_entrypoint.sh" # pipe-separated file names, e.g: foo|bar|foobar, this avoids shellcheck complaining that vars are not used (see: SC2034)
-
-function generate_filelist(){
- if [[ "$pull_request_id" -eq "" || "${ghprbCommentBody:-}" = "jenkins lint all" ]]
- then
- find . -name '*.sh' | grep -vE "$IGNORE_THESE_FILES"
- else
- curl -XGET "https://api.github.com/repos/ceph/ceph-container/pulls/$pull_request_id/files" |
- jq -r '.[] | select(.status != "removed") | .filename' | # just the files please (not removed)
- grep ".sh$" | # just the bash
- grep -vE "$IGNORE_THESE_FILES"
- fi
-
-}
-
-function check(){
- local file
- while read -r filename; do
- pushd "$(dirname "$filename")"
- file=$(basename "$filename")
- sudo docker run --rm -v "$(pwd)"/"$file":/"$file":z koalaman/shellcheck --external-sources --exclude "$IGNORE_THESE_CODES" /"$file"
- popd
- done
- return $?
-}
-
-function main() {
- # install some of our dependencies if running on a jenkins builder
- if [[ -n "$HUDSON_URL" ]]
- then
- sudo yum -y install epel-release
- sudo yum -y install docker jq
- sudo systemctl start docker || sudo systemctl start podman
- pull_request_id=${ghprbPullId:-$2}
- workspace=${WORKSPACE:-$1}
- else
- if ! command -v docker || ! command -v jq
- then
- echo "docker or jq is/are missing, install it/them"
- exit 1
- fi
- pull_request_id=${ghprbPullId:-$2}
- workspace=${WORKSPACE:-$1}
- fi
-
-
- sudo docker pull koalaman/shellcheck
- pushd "$workspace/ceph-container"
- generate_filelist | check
- popd
- exit $?
-}
-
-main "$@"
+++ /dev/null
-2.jenkins.ceph.com
+++ /dev/null
-- scm:
- name: ceph-container
- scm:
- - git:
- url: https://github.com/ceph/ceph-container.git
- branches:
- - ${sha1}
- refspec: +refs/pull/*:refs/remotes/origin/pr/*
- browser: auto
- timeout: 20
- skip-tag: true
- wipe-workspace: false
- basedir: "ceph-container"
-
-- job:
- name: ceph-container-lint
- node: small && centos9
- defaults: global
- display-name: 'ceph-container-lint'
- properties:
- - build-discarder:
- days-to-keep: 15
- num-to-keep: 30
- artifact-days-to-keep: -1
- artifact-num-to-keep: -1
- - github:
- url: https://github.com/ceph/ceph-container/
-
- parameters:
- - string:
- name: sha1
- description: "A pull request ID, like 'origin/pr/72/head'"
-
- triggers:
- - github-pull-request:
- admin-list:
- - alfredodeza
- - ktdreyer
- - gmeno
- org-list:
- - ceph
- trigger-phrase: 'jenkins lint'
- only-trigger-phrase: false
- github-hooks: true
- permit-all: true
- auto-close-on-fail: false
- status-context: "Testing: for sloppy bash"
- started-status: "Running: shellchecker"
- success-status: "OK - nice work"
- failure-status: "FAIL - please clean up for merge"
-
- scm:
- - ceph-container
-
- builders:
- - shell:
- !include-raw:
- - ../../build/build
-
+++ /dev/null
-#!/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}
+++ /dev/null
-2.jenkins.ceph.com
+++ /dev/null
-- 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
+++ /dev/null
-#!/bin/bash
-
-# the following two methods exist in scripts/build_utils.sh
-pkgs=( "tox" )
-TEMPVENV=$(create_venv_dir)
-VENV=${TEMPVENV}/bin
-set_centos_python3_version "python3.9"
-install_python_packages $TEMPVENV "pkgs[@]" "pip==22.0.4"
-
-# XXX this might not be needed
-source $VENV/activate
-
-WORKDIR=$(mktemp -td tox.XXXXXXXXXX)
-
-prune_stale_vagrant_running_vms
-delete_libvirt_vms
-clear_libvirt_networks
-restart_libvirt_services
-update_vagrant_boxes
-
-if ! timeout 3h $VENV/tox -rv -e=$SCENARIO --workdir=$WORKDIR; then
- echo "ERROR: Job didn't complete successfully or got stuck for more than 3h."
- exit 1
-fi
+++ /dev/null
-#!/bin/bash
-# There has to be a better way to do this than this script which just looks
-# for every Vagrantfile in scenarios and then just destroys whatever is left.
-
-cd $WORKSPACE/ceph-ansible/tests/functional
-
-scenarios=$(find . | grep Vagrantfile | xargs -r dirname)
-
-for scenario in $scenarios; do
- cd $scenario
- vagrant destroy -f
- cd -
-done
+++ /dev/null
-2.jenkins.ceph.com
+++ /dev/null
-- project:
- name: ceph-container-prs-auto
- test:
- - all_daemons
- - lvm_osds
- - collocation
- jobs:
- - 'ceph-container-prs-auto'
-
-- job-template:
- name: 'ceph-container-prs-ceph_ansible-{test}'
- id: 'ceph-container-prs-auto'
- node: vagrant&&libvirt&¢os8&&(braggi||adami)
- concurrent: true
- defaults: global
- display-name: 'ceph-container: Pull Requests [ceph_ansible-{test}]'
- quiet-period: 5
- block-downstream: false
- block-upstream: false
- retry-count: 3
- properties:
- - github:
- url: https://github.com/ceph/ceph-container
- - build-discarder:
- days-to-keep: 15
- num-to-keep: -1
- artifact-days-to-keep: -1
- artifact-num-to-keep: -1
-
- parameters:
- - string:
- name: sha1
- description: "A pull request ID, like 'origin/pr/72/head'"
-
- triggers:
- - github-pull-request:
- cancel-builds-on-update: true
- allow-whitelist-orgs-as-admins: true
- org-list:
- - ceph
- skip-build-phrase: '^jenkins do not test.*|.*\[skip ci\].*'
- trigger-phrase: 'jenkins test ceph_ansible-{test}'
- only-trigger-phrase: true
- github-hooks: true
- permit-all: true
- auto-close-on-fail: false
- status-context: "Testing: ceph_ansible-{test}"
- started-status: "Running: ceph_ansible-{test}"
- success-status: "OK - ceph_ansible-{test}"
- failure-status: "FAIL - ceph_ansible-{test}"
-
- scm:
- - git:
- url: https://github.com/ceph/ceph-container.git
- branches:
- - ${{sha1}}
- refspec: +refs/pull/*:refs/remotes/origin/pr/*
- browser: auto
- timeout: 20
- skip-tag: true
- wipe-workspace: false
-
- builders:
- - inject:
- properties-content: |
- SCENARIO=ceph_ansible-{test}
- - shell:
- !include-raw-escape:
- - ../../../scripts/build_utils.sh
- - ../../build/build
-
- wrappers:
- - inject-passwords:
- global: true
- mask-password-params: true
- - credentials-binding:
- - username-password-separated:
- credential-id: ceph-container-quay-io
- username: REGISTRY_USERNAME
- password: REGISTRY_PASSWORD
-
- publishers:
- - postbuildscript:
- builders:
- - role: SLAVE
- build-on:
- - FAILURE
- - ABORTED
- build-steps:
- - shell: !include-raw: ../../build/teardown
-
-- job-template:
- name: 'ceph-container-prs-ceph_ansible-{test}'
- id: 'ceph-container-prs-trigger'
- node: vagrant&&libvirt&¢os8
- concurrent: true
- defaults: global
- display-name: 'ceph-container: Pull Requests [ceph_ansible-{test}]'
- quiet-period: 5
- block-downstream: false
- block-upstream: false
- retry-count: 3
- properties:
- - github:
- url: https://github.com/ceph/ceph-container
- - build-discarder:
- days-to-keep: 15
- num-to-keep: -1
- artifact-days-to-keep: -1
- artifact-num-to-keep: -1
-
- parameters:
- - string:
- name: sha1
- description: "A pull request ID, like 'origin/pr/72/head'"
-
- triggers:
- - github-pull-request:
- cancel-builds-on-update: true
- allow-whitelist-orgs-as-admins: true
- org-list:
- - ceph
- skip-build-phrase: '^jenkins do not test.*|.*\[skip ci\].*'
- trigger-phrase: 'jenkins test ceph_ansible-{test}'
- only-trigger-phrase: true
- github-hooks: true
- permit-all: true
- auto-close-on-fail: false
- status-context: "Testing: ceph_ansible-{test}"
- started-status: "Running: ceph_ansible-{test}"
- success-status: "OK - ceph_ansible-{test}"
- failure-status: "FAIL - ceph_ansible-{test}"
-
- scm:
- - git:
- url: https://github.com/ceph/ceph-container.git
- branches:
- - ${{sha1}}
- refspec: +refs/pull/*:refs/remotes/origin/pr/*
- browser: auto
- timeout: 20
- skip-tag: true
- wipe-workspace: false
-
- builders:
- - inject:
- properties-content: |
- SCENARIO=ceph_ansible-{test}
- - shell:
- !include-raw-escape:
- - ../../../scripts/build_utils.sh
- - ../../build/build
-
- wrappers:
- - inject-passwords:
- global: true
- mask-password-params: true
- - credentials-binding:
- - username-password-separated:
- credential-id: ceph-container-quay-io
- username: REGISTRY_USERNAME
- password: REGISTRY_PASSWORD
-
- publishers:
- - postbuildscript:
- builders:
- - role: SLAVE
- build-on:
- - FAILURE
- - ABORTED
- build-steps:
- - shell: !include-raw: ../../build/teardown
+++ /dev/null
-#!/bin/bash
-# vim: ts=4 sw=4 expandtab
-set -ex
-HOST=$(hostname --short)
-echo "Building on $(hostname)"
-echo " DIST=${DIST}"
-echo " BPTAG=${BPTAG}"
-echo " KEYID=${KEYID}"
-echo " WS=$WORKSPACE"
-echo " PWD=$(pwd)"
-echo "*****"
-env
-echo "*****"
-
-if test $(id -u) != 0 ; then
- SUDO=sudo
-fi
-
-get_rpm_dist
-
-BRANCH=`branch_slash_filter $BRANCH`
-
-# Normalize variables across rpm/deb builds
-NORMAL_DISTRO=$DISTRO
-NORMAL_DISTRO_VERSION=$RELEASE
-NORMAL_ARCH=$ARCH
-
-chacra_endpoint="ceph/${BRANCH}/${SHA1}/${DISTRO}/${RELEASE}"
-
-SHAMAN_URL="https://shaman.ceph.com/api/search/?project=ceph&distros=centos/${RELEASE}/${ARCH}&sha1=${SHA1}&ref=${BRANCH}&flavor=${FLAVOR}"
-
-loop=0
-ready=false
-while ((loop < 15)); do
- if [[ $(curl -s "$SHAMAN_URL" | jq -r '.[0].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}/"
- echo
- echo "NOTE: You should only use this job if there was already a successful ceph-dev*build job!"
-fi
-
-SHA1=$(curl -s "$SHAMAN_URL" | jq -r '.[0].sha1')
-
-pushd $WORKSPACE/ceph-container
-$SUDO -E CI_CONTAINER=true BASEOS_REGISTRY="quay.io/centos" SHA1=${SHA1} OSD_FLAVOR=${FLAVOR} CONTAINER_FLAVOR=${BRANCH},${DISTRO},${RELEASE} \
- /bin/bash ./contrib/build-push-ceph-container-imgs.sh
-popd
-$SUDO rm -rf $WORKSPACE/ceph-container
-
-# update shaman with the completed build status
-if $NOTIFY_SHAMAN; then
- update_build_status "completed" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
-fi
+++ /dev/null
-#!/bin/bash -ex
-
-# The ceph-container dir is supposed to get deleted in the build_rpm script.
-# We used to add '|| true' to the container build so the dir would still get
-# deleted even if it failed. This changed in https://github.com/ceph/ceph-build/pull/1603
-# So now we need to delete the directory or the Wipe Workspace plugin will fail on the next build.
-cd $WORKSPACE
-sudo rm -rf ceph-container
-
-get_rpm_dist
-# note: the failed_build_status call relies on normalized variable names that
-# are infered by the builds themselves. If the build fails before these are
-# set, they will be posted with empty values
-BRANCH=`branch_slash_filter $BRANCH`
-
-# Normalize variables across rpm/deb builds
-NORMAL_DISTRO=$DISTRO
-NORMAL_DISTRO_VERSION=$RELEASE
-NORMAL_ARCH=$ARCH
-
-# update shaman with the failed build status
-failed_build_status "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
+++ /dev/null
-- job:
- name: ceph-dev-container-only
- node: built-in
- project-type: matrix
- defaults: global
- display-name: 'ceph-dev-container-only: Builds a quay.ceph.io/ceph-ci container given a BRANCH'
- block-downstream: false
- block-upstream: false
- concurrent: true
- properties:
- - build-discarder:
- days-to-keep: 30
- artifact-days-to-keep: 30
-
- scm:
- - git:
- url: git@github.com:ceph/ceph-container.git
- basedir: ceph-container
- credentials-id: 'jenkins-build'
- branches:
- - $CONTAINER_BRANCH
- skip-tag: true
- wipe-workspace: true
-
- execution-strategy:
- combination-filter: |
- DIST == AVAILABLE_DIST && ARCH == AVAILABLE_ARCH &&
- (ARCH == "x86_64" || (ARCH == "arm64" && ["xenial", "bionic", "centos7", "centos8"].contains(DIST)))
- axes:
- - axis:
- type: label-expression
- name: MACHINE_SIZE
- values:
- - gigantic
- - axis:
- type: label-expression
- name: AVAILABLE_ARCH
- values:
- - x86_64
- - arm64
- - axis:
- type: label-expression
- name: AVAILABLE_DIST
- values:
- - centos8
- - centos9
- - axis:
- type: dynamic
- name: DIST
- values:
- - DISTROS
- - axis:
- type: dynamic
- name: ARCH
- values:
- - ARCHS
-
- parameters:
- - string:
- name: BRANCH
- description: "The git branch (or tag) to build. NOTE: This branch must already be built and packages pushed to a chacra node!"
- default: main
-
- - string:
- name: SHA1
- description: "Change to a specific SHA1 if desired."
- default: "latest"
-
- - string:
- name: DISTROS
- description: "A list of distros to build for. Available options are: centos8 or centos9"
- default: "centos8"
-
- - string:
- name: ARCHS
- description: "A list of architectures to build for. Available options are: x86_64, and arm64"
- default: "x86_64 arm64"
-
- - choice:
- name: FLAVOR
- choices:
- - default
- - crimson
- - jaeger
- default: "default"
- description: "Type of Ceph build, choices are: crimson, jaeger, default. Defaults to: 'default'"
-
- - string:
- name: CONTAINER_BRANCH
- description: "For CI_CONTAINER: Branch of ceph-container to use"
- default: main
-
- - string:
- name: CONTAINER_REPO_HOSTNAME
- description: "For CI_CONTAINER: Name of container repo server (i.e. 'quay.io')"
- default: "quay.ceph.io"
-
- - string:
- name: CONTAINER_REPO_ORGANIZATION
- description: "For CI_CONTAINER: Name of container repo organization (i.e. 'ceph-ci')"
- default: "ceph-ci"
-
- - bool:
- name: NOTIFY_SHAMAN
- description: "Should we tell shaman this container built and change the corresponding build to READY?"
- default: true
-
-
- builders:
- - shell:
- !include-raw:
- - ../../../scripts/build_utils.sh
- - ../../build/build_rpm
-
- publishers:
- - postbuildscript:
- builders:
- - role: SLAVE
- build-on:
- - FAILURE
- - ABORTED
- build-steps:
- - shell:
- !include-raw:
- - ../../../scripts/build_utils.sh
- - ../../build/failure
-
- wrappers:
- - inject-passwords:
- global: true
- mask-password-params: true
- - credentials-binding:
- - 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
- - build-name:
- name: "#${BUILD_NUMBER} ${BRANCH}, ${DISTROS}, ${ARCH}, ${FLAVOR}"