Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
avoid triggering twice build of PyQGIS docs
  • Loading branch information
3nids committed Mar 6, 2019
1 parent 9c2993f commit 993e640
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .ci/travis/docker_image/script.sh
Expand Up @@ -39,21 +39,25 @@ docker cp qgis_container:/usr/src/.ccache_image_build ${CCACHE_DIR}
docker rm qgis_container
popd
echo "Trigger build of PyQGIS Documentation"
body='{
"request": {
"branch":"master",
"message": "Trigger PyQGIS doc build after release of new Docker image as __DOCKER_TAG__",
"config": {
"merge_mode": "deep_merge",
"matrix": {
"include": {
"env": ["QGIS_VERSION_BRANCH=__QGIS_VERSION_BRANCH__"]
if [[ ${TRIGGER_PYQGIS_DOC} =~ ^TRUE$ ]]; then
body='{
"request": {
"branch":"master",
"message": "Trigger PyQGIS doc build after release of new Docker image as __DOCKER_TAG__",
"config": {
"merge_mode": "deep_merge",
"matrix": {
"include": {
"env": ["QGIS_VERSION_BRANCH=__QGIS_VERSION_BRANCH__"]
}
}
}
}
}
}'
body=$(sed "s/__QGIS_VERSION_BRANCH__/${TRAVIS_BRANCH}/; s/__DOCKER_TAG__/${DOCKER_TAG}/" <<< $body)
curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" \
-H "Travis-API-Version: 3" -H "Authorization: token $TRAVIS_TOKEN" -d "$body" \
https://api.travis-ci.org/repo/qgis%2Fpyqgis/requests
}'
body=$(sed "s/__QGIS_VERSION_BRANCH__/${TRAVIS_BRANCH}/; s/__DOCKER_TAG__/${DOCKER_TAG}/" <<< $body)
curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" \
-H "Travis-API-Version: 3" -H "Authorization: token $TRAVIS_TOKEN" -d "$body" \
https://api.travis-ci.org/repo/qgis%2Fpyqgis/requests
else
echo "skipped from configuration"
fi
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -102,6 +102,7 @@ matrix:
env:
- TRAVIS_CONFIG=docker_image
- CCACHE_DIR=${HOME}/.ccache_docker_build_bionic
- TRIGGER_PYQGIS_DOC=FALSE
- DOCKER_TAG=$( echo $TRAVIS_BRANCH | sed 's/master/latest/' )
- DOCKER_BUILD_DEPS_FILE=qgis3-build-deps.dockerfile

Expand All @@ -114,6 +115,7 @@ matrix:
env:
- TRAVIS_CONFIG=docker_image
- CCACHE_DIR=${HOME}/.ccache_docker_build_cosmic
- TRIGGER_PYQGIS_DOC=TRUE
- DOCKER_TAG="$( echo $TRAVIS_BRANCH | sed 's/master/latest/' )_cosmic"
- DOCKER_BUILD_DEPS_FILE=qgis3-build-deps-cosmic.dockerfile

Expand Down

0 comments on commit 993e640

Please sign in to comment.