Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 993e640

Browse files
committedMar 6, 2019
avoid triggering twice build of PyQGIS docs
1 parent 9c2993f commit 993e640

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed
 

‎.ci/travis/docker_image/script.sh

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,25 @@ docker cp qgis_container:/usr/src/.ccache_image_build ${CCACHE_DIR}
3939
docker rm qgis_container
4040
popd
4141
echo "Trigger build of PyQGIS Documentation"
42-
body='{
43-
"request": {
44-
"branch":"master",
45-
"message": "Trigger PyQGIS doc build after release of new Docker image as __DOCKER_TAG__",
46-
"config": {
47-
"merge_mode": "deep_merge",
48-
"matrix": {
49-
"include": {
50-
"env": ["QGIS_VERSION_BRANCH=__QGIS_VERSION_BRANCH__"]
42+
if [[ ${TRIGGER_PYQGIS_DOC} =~ ^TRUE$ ]]; then
43+
body='{
44+
"request": {
45+
"branch":"master",
46+
"message": "Trigger PyQGIS doc build after release of new Docker image as __DOCKER_TAG__",
47+
"config": {
48+
"merge_mode": "deep_merge",
49+
"matrix": {
50+
"include": {
51+
"env": ["QGIS_VERSION_BRANCH=__QGIS_VERSION_BRANCH__"]
52+
}
5153
}
5254
}
5355
}
54-
}
55-
}'
56-
body=$(sed "s/__QGIS_VERSION_BRANCH__/${TRAVIS_BRANCH}/; s/__DOCKER_TAG__/${DOCKER_TAG}/" <<< $body)
57-
curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" \
58-
-H "Travis-API-Version: 3" -H "Authorization: token $TRAVIS_TOKEN" -d "$body" \
59-
https://api.travis-ci.org/repo/qgis%2Fpyqgis/requests
56+
}'
57+
body=$(sed "s/__QGIS_VERSION_BRANCH__/${TRAVIS_BRANCH}/; s/__DOCKER_TAG__/${DOCKER_TAG}/" <<< $body)
58+
curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" \
59+
-H "Travis-API-Version: 3" -H "Authorization: token $TRAVIS_TOKEN" -d "$body" \
60+
https://api.travis-ci.org/repo/qgis%2Fpyqgis/requests
61+
else
62+
echo "skipped from configuration"
63+
fi

‎.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ matrix:
102102
env:
103103
- TRAVIS_CONFIG=docker_image
104104
- CCACHE_DIR=${HOME}/.ccache_docker_build_bionic
105+
- TRIGGER_PYQGIS_DOC=FALSE
105106
- DOCKER_TAG=$( echo $TRAVIS_BRANCH | sed 's/master/latest/' )
106107
- DOCKER_BUILD_DEPS_FILE=qgis3-build-deps.dockerfile
107108

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

0 commit comments

Comments
 (0)
Please sign in to comment.