Skip to content

Commit aff4f23

Browse files
backporting[bot]3nids
authored andcommittedMar 6, 2019
avoid triggering twice build of PyQGIS docs (#9407)
1 parent bda4620 commit aff4f23

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
@@ -105,6 +105,7 @@ matrix:
105105
env:
106106
- TRAVIS_CONFIG=docker_image
107107
- CCACHE_DIR=${HOME}/.ccache_docker_build_bionic
108+
- TRIGGER_PYQGIS_DOC=FALSE
108109
- DOCKER_TAG=$( echo $TRAVIS_BRANCH | sed 's/master/latest/' )
109110
- DOCKER_BUILD_DEPS_FILE=qgis3-build-deps.dockerfile
110111

@@ -118,6 +119,7 @@ matrix:
118119
env:
119120
- TRAVIS_CONFIG=docker_image
120121
- CCACHE_DIR=${HOME}/.ccache_docker_build_cosmic
122+
- TRIGGER_PYQGIS_DOC=TRUE
121123
- DOCKER_TAG="$( echo $TRAVIS_BRANCH | sed 's/master/latest/' )_cosmic"
122124
- DOCKER_BUILD_DEPS_FILE=qgis3-build-deps-cosmic.dockerfile
123125

0 commit comments

Comments
 (0)
Please sign in to comment.