Skip to content
Permalink
Browse files
Update for new apache hosted containers, drop CentOS 6
  • Loading branch information
wohali committed Apr 13, 2021
1 parent afec8b9 commit 1c97f373e46f5534b15b38b35fb4acf7a867aeb2
Showing 2 changed files with 26 additions and 7 deletions.
@@ -23,3 +23,5 @@ prime/
snap/.snapcraft/
stage/
*.tar.gz
*.bak
*~
@@ -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() {

0 comments on commit 1c97f37

Please sign in to comment.