Repository: couchdb-ci Updated Branches: refs/heads/master 9cfaff61b -> d466e9b7b
Support building from branches other than master Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/d466e9b7 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/d466e9b7 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/d466e9b7 Branch: refs/heads/master Commit: d466e9b7b1ef234e2f4757c5077703b3ae51931f Parents: 9cfaff6 Author: Joan Touzet <[email protected]> Authored: Fri Mar 24 18:58:12 2017 -0700 Committer: Joan Touzet <[email protected]> Committed: Fri Mar 24 18:58:12 2017 -0700 ---------------------------------------------------------------------- ansible/roles/common/files/build-ci.sh | 4 +++- ansible/roles/common/tasks/couchdb.yml | 2 -- jenkins/build.sh | 6 +++--- readme.markdown | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d466e9b7/ansible/roles/common/files/build-ci.sh ---------------------------------------------------------------------- diff --git a/ansible/roles/common/files/build-ci.sh b/ansible/roles/common/files/build-ci.sh index db6993e..e54960b 100755 --- a/ansible/roles/common/files/build-ci.sh +++ b/ansible/roles/common/files/build-ci.sh @@ -19,10 +19,12 @@ set -e -# create a distribution tarball from the current git master branch +# create a distribution tarball from the requested git branch cd /usr/src/couchdb-checkout git reset --hard +git clean -fdx git pull +git checkout $GIT_BRANCH ./configure --with-curl make dist http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d466e9b7/ansible/roles/common/tasks/couchdb.yml ---------------------------------------------------------------------- diff --git a/ansible/roles/common/tasks/couchdb.yml b/ansible/roles/common/tasks/couchdb.yml index a16f630..a26ef04 100644 --- a/ansible/roles/common/tasks/couchdb.yml +++ b/ansible/roles/common/tasks/couchdb.yml @@ -39,8 +39,6 @@ dest: /usr/src/couchdb-checkout accept_hostkey: yes force: yes - # which branch/tag do we actually want to build? I'd say master. - # version: developer-preview-2.0 - name: set permissions on couchdb build file: http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d466e9b7/jenkins/build.sh ---------------------------------------------------------------------- diff --git a/jenkins/build.sh b/jenkins/build.sh index 658b8a6..00f0256 100755 --- a/jenkins/build.sh +++ b/jenkins/build.sh @@ -35,18 +35,18 @@ COUCHDB_CI_DIRECTORY=$( cd "$( dirname "$0" )/.." && pwd ) cd "$COUCHDB_CI_DIRECTORY" DOCKER_IMAGE="couchdbdev/" -DOCKER_OPTIONS="" +DOCKER_OPTIONS="-e $GIT_BRANCH" case $OS in centos-6*) echo "Using CentOS 6" DOCKER_IMAGE=$DOCKER_IMAGE"centos-6-" - DOCKER_OPTIONS="-e LD_LIBRARY_PATH=/usr/local/lib" + DOCKER_OPTIONS="$DOCKER_OPTIONS -e LD_LIBRARY_PATH=/usr/local/lib" ;; centos-7*) echo "Using CentOS 7" DOCKER_IMAGE=$DOCKER_IMAGE"centos-7-" - DOCKER_OPTIONS="-e LD_LIBRARY_PATH=/usr/local/lib" + DOCKER_OPTIONS="$DOCKER_OPTIONS -e LD_LIBRARY_PATH=/usr/local/lib" ;; debian-8*) echo "Using Debian 8" http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d466e9b7/readme.markdown ---------------------------------------------------------------------- diff --git a/readme.markdown b/readme.markdown index 5d91a20..166d485 100644 --- a/readme.markdown +++ b/readme.markdown @@ -31,7 +31,7 @@ Builds marked with an â are skipped due to the version of Erlang being too old ## Open questions and TODOs * Right now we run a CouchDB build on all combinations on each commit, but perhaps we don't need to run Jenkins this often. (We also have Travis CI for a single OS and a few Erlang revisions.) Should we just build them once a day? -* Right now we only build on the master branch. Travis CI handles PRs. ASF hasn't set up a Jenkins/Gitbox bridge yet, but if they do we can consider having Jenkins build PRs as well. +* Right now we only trigger Jenkins on the master branch. The images support building from whatever branch $GIT_BRANCH is set to (c.f. Jenkins environment variable.) Travis CI currently handles PRs. ASF hasn't set up a Jenkins/Gitbox bridge yet, but if they do we can consider having Jenkins build PRs as well. * Ideally, we'd also like to build convenience packages for some of these platforms on a regular basis, i.e. nightly - especially the platforms where building the software is harder (Windows). * Currently, when changes occur to the base images (bugfixes, new OS/Erlang combinations added, etc.) new images are built manually using the scripts in `bin/`. TODO: automate this process in a way that avoids forcibly rebuilding every VM/Erlang combination with every checkin.
