This repository was archived by the owner on Jun 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ Note image ids also change after scm-source.json has being updated which trigger
1010## TBD_DOCKER_TAG
1111 + ** Changes:** https://github.com/elgalu/docker-selenium/compare/3.5.3-p8...3.5.3-p9 (TBD_DATE)
1212 + Tests: Upgrade python bindings from 3.5.0 to selenium==3.6.0
13+ + Tests: CI: Add logic for untrusted PRs
1314 + ** Image tag details:**
1415 + Selenium version: TBD_SELENIUM_3_VERSION (TBD_SELENIUM_3_REVISION)
1516 + Chrome stable: TBD_CHROME_STABLE
Original file line number Diff line number Diff line change 77docker --version
88docker-compose --version
99
10- ./host-scripts/gen-scm-source.sh
10+ if [[ ${TRAVIS_PULL_REQUEST_SLUG} != " " && \
11+ ${TRAVIS_PULL_REQUEST_SLUG} != ${TRAVIS_REPO_SLUG} && \
12+ ${TRAVIS_PULL_REQUEST} != " false" ]]; then
13+ echo " WARN: External PRs are untrusted by default therefore we need can't reuse and push the image"
14+ exit 0
15+ fi
1116
17+ ./host-scripts/gen-scm-source.sh
1218docker build -t selenium .
1319docker images selenium
1420
Original file line number Diff line number Diff line change @@ -19,6 +19,15 @@ docker-compose --version
1919
2020[ " ${TRAVIS_BUILD_NUMBER} " == " " ] && die " Need env var TRAVIS_BUILD_NUMBER to know where to pull from"
2121
22- docker pull elgalu/build_selenium:${TRAVIS_BUILD_NUMBER}
23- docker tag elgalu/build_selenium:${TRAVIS_BUILD_NUMBER} selenium:latest
22+ if [[ ${TRAVIS_PULL_REQUEST_SLUG} != " " && \
23+ ${TRAVIS_PULL_REQUEST_SLUG} != ${TRAVIS_REPO_SLUG} && \
24+ ${TRAVIS_PULL_REQUEST} != " false" ]]; then
25+ echo " WARN: External PRs are untrusted by default therefore we need can't reuse and pull the image so building it from scratch..."
26+ ./host-scripts/gen-scm-source.sh
27+ docker build -t selenium .
28+ else
29+ docker pull elgalu/build_selenium:${TRAVIS_BUILD_NUMBER}
30+ docker tag elgalu/build_selenium:${TRAVIS_BUILD_NUMBER} selenium:latest
31+ fi
32+
2433docker images selenium
You can’t perform that action at this time.
0 commit comments