This is an automated email from the ASF dual-hosted git repository. wohali pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/couchdb-pkg.git
The following commit(s) were added to refs/heads/main by this push: new 1c97f37 Update for new apache hosted containers, drop CentOS 6 1c97f37 is described below commit 1c97f373e46f5534b15b38b35fb4acf7a867aeb2 Author: Joan Touzet <woh...@apache.org> AuthorDate: Tue Apr 13 15:39:25 2021 -0700 Update for new apache hosted containers, drop CentOS 6 --- .gitignore | 2 ++ build.sh | 31 ++++++++++++++++++++++++------- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 0d70b4a..d630ae8 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,5 @@ prime/ snap/.snapcraft/ stage/ *.tar.gz +*.bak +*~ diff --git a/build.sh b/build.sh index 6f1041d..1842361 100755 --- a/build.sh +++ b/build.sh @@ -27,26 +27,36 @@ set -e # otherwise, see https://stackoverflow.com/questions/59895/ SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -# TODO derive these by interrogating the repo rather than hard coding the list -DEBIANS="debian-stretch debian-buster arm64v8-debian-buster ppc64le-debian-buster" +# TODO derive these by interrogating the couchdb-ci repo rather than hard coding the list... +DEBIANS="debian-stretch debian-buster" UBUNTUS="ubuntu-xenial ubuntu-bionic ubuntu-focal" -CENTOSES="centos-6 centos-7 centos-8" +CENTOSES="centos-7 centos-8" +XPLAT_BASE="debian-buster" +XPLAT_ARCHES="arm64v8 ppc64le" BINTRAY_API="https://api.bintray.com" -ERLANGVERSION=${ERLANGVERSION:-20.3.8.25-1} +ERLANGVERSION=${ERLANGVERSION:-20.3.8.26-1} +split-os-ver() { + OLDIFS=$IFS + IFS='-' tokens=( $1 ) + IFS=$OLDIFS + os=${tokens[0]} + version=${tokens[1]} +} build-js() { # TODO: check if image is built first, if not, complain # invoke as build-js <plat> + split-os-ver $1 if [[ ${TRAVIS} == "true" ]]; then docker run \ --mount type=bind,src=${SCRIPTPATH},dst=/home/jenkins/couchdb-pkg \ - -u 0 couchdbdev/$1-base \ + -u 0 apache/couchdbci-${os}:${CONTAINERARCH}${version}-base \ /home/jenkins/couchdb-pkg/bin/build-js.sh else docker run \ --mount type=bind,src=${SCRIPTPATH},dst=/home/jenkins/couchdb-pkg \ - couchdbdev/$1-base \ + apache/couchdbci-${os}:${CONTAINERARCH}${version}-base \ sudo /home/jenkins/couchdb-pkg/bin/build-js.sh fi } @@ -56,6 +66,9 @@ build-all-js() { for plat in $DEBIANS $UBUNTUS $CENTOSES; do build-js $plat done + for arch in $XPLAT_ARCHES; do + CONTAINERARCH="${arch}-" build-js $XPLAT_BASE + done } bintray-check-credentials() { @@ -156,13 +169,14 @@ get-couch-tarball() { } build-couch() { + split-os-ver $1 # We will be changing user to 'jenkins' - ensure it has write permissions chmod a+rwx pkgs pkgs/couch pkgs/js # $1 is plat, $2 is the optional path to a dist tarball docker run \ --mount type=bind,src=${SCRIPTPATH},dst=/home/jenkins/couchdb-pkg \ -u 0 -w /home/jenkins/couchdb-pkg \ - couchdbdev/$1-erlang-${ERLANGVERSION} \ + apache/couchdbci-${os}:${CONTAINERARCH}${version}-erlang-${ERLANGVERSION} \ make copy-couch $1 COUCHTARBALL=${COUCHTARBALL} make clean } @@ -172,6 +186,9 @@ build-all-couch() { for plat in $DEBIANS $UBUNTUS $CENTOSES; do build-couch $plat $* done + for arch in $XPLAT_ARCHES; do + CONTAINERARCH="${arch}-" build-couch $XPLAT_BASE + done } upload-couch() {