heptapod-ci: simpler CI stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 18 Nov 2019 11:46:59 +0100
branchstable
changeset 4959 edc29a909339
parent 4958 8ced373682c4
child 4960 4941bb6d179c
heptapod-ci: simpler CI We have a mercurial clone available in the docker image now. This will same some time to avoid a full Mercurial clone for each run.
.gitlab-ci.yml
--- a/.gitlab-ci.yml	Sun Nov 17 01:23:48 2019 +0100
+++ b/.gitlab-ci.yml	Mon Nov 18 11:46:59 2019 +0100
@@ -6,39 +6,27 @@
 tests-py2-cext:
     image: octobus/ci-py2-hgext3rd
     script:
-        - echo $PWD
-        - rm -rf /tmp/mercurial-clone-`hg log -r . -T "{node}"`
-        - hg clone https://mirror.octobus.net/hg/ /tmp/mercurial-clone-`hg log -r . -T "{node}"` --config share.pool=/tmp/
-        - hg -R /tmp/mercurial-clone-`hg log -r . -T "{node}"` update `hg log -r . -T '{branch}'`
-        - (cd tests; /tmp/mercurial-clone-`hg log -r . -T "{node}"`/tests/run-tests.py --color=always)
-        - rm -rf /tmp/mercurial-clone-`hg log -r . -T "{node}"`
+        - hg pull -R /ci/repos/mercurial/
+        - hg -R /ci/repos/mercurial/ update `hg log -r . -T '{branch}'`
+        - (cd tests; /ci/repos/mercurial/tests/run-tests.py --color=always)
 
 tests-py2-pure:
     image: octobus/ci-py2-hgext3rd
     script:
-        - echo $PWD
-        - rm -rf /tmp/mercurial-clone-`hg log -r . -T "{node}"`
-        - hg clone https://mirror.octobus.net/hg/ /tmp/mercurial-clone-`hg log -r . -T "{node}"` --config share.pool=/tmp/
-        - hg -R /tmp/mercurial-clone-`hg log -r . -T "{node}"` update `hg log -r . -T '{branch}'`
-        - (cd tests; /tmp/mercurial-clone-`hg log -r . -T "{node}"`/tests/run-tests.py --color=always --pure)
-        - rm -rf /tmp/mercurial-clone-`hg log -r . -T "{node}"`
+        - hg pull -R /ci/repos/mercurial/
+        - hg -R /ci/repos/mercurial/ update `hg log -r . -T '{branch}'`
+        - (cd tests; /ci/repos/mercurial/tests/run-tests.py --color=always --pure)
 
 tests-py3-cext:
     image: octobus/ci-py3-hgext3rd
     script:
-        - echo $PWD
-        - rm -rf /tmp/mercurial-clone-`hg log -r . -T "{node}"`
-        - hg clone https://mirror.octobus.net/hg/ /tmp/mercurial-clone-`hg log -r . -T "{node}"` --config share.pool=/tmp/
-        - hg -R /tmp/mercurial-clone-`hg log -r . -T "{node}"` update `hg log -r . -T '{branch}'`
-        - (cd tests; python3 /tmp/mercurial-clone-`hg log -r . -T "{node}"`/tests/run-tests.py --color=always)
-        - rm -rf /tmp/mercurial-clone-`hg log -r . -T "{node}"`
+        - hg pull -R /ci/repos/mercurial/
+        - hg -R /ci/repos/mercurial/ update `hg log -r . -T '{branch}'`
+        - (cd tests; python3 /ci/repos/mercurial/tests/run-tests.py --color=always)
 
 tests-py3-pure:
     image: octobus/ci-py3-hgext3rd
     script:
-        - echo $PWD
-        - rm -rf /tmp/mercurial-clone-`hg log -r . -T "{node}"`
-        - hg clone https://mirror.octobus.net/hg/ /tmp/mercurial-clone-`hg log -r . -T "{node}"` --config share.pool=/tmp/
-        - hg -R /tmp/mercurial-clone-`hg log -r . -T "{node}"` update `hg log -r . -T '{branch}'`
-        - (cd tests; python3 /tmp/mercurial-clone-`hg log -r . -T "{node}"`/tests/run-tests.py --color=always --pure)
-        - rm -rf /tmp/mercurial-clone-`hg log -r . -T "{node}"`
+        - hg pull -R /ci/repos/mercurial/
+        - hg -R /ci/repos/mercurial/ update `hg log -r . -T '{branch}'`
+        - (cd tests; python3 /ci/repos/mercurial/tests/run-tests.py --color=always --pure)