Retry repo sync when failing; Trigger docs CI after building

parent 07fe972c
Pipeline #92875460 passed with stages
in 135 minutes and 30 seconds
......@@ -2,6 +2,7 @@ stages:
- upgrade
- environment
- build
- deployment
image: registry.gitlab.com/pantacor/ci/pantavisor-builder:AMD64
......@@ -19,13 +20,14 @@ upgrade:
script:
# download source code
- mkdir work; cd work
- repo init -u $CI_PROJECT_URL; repo sync -j10
- repo init -u $CI_PROJECT_URL
- until repo sync -j10; do echo "Sync failed, retrying..."; done
# download manifest project
- git clone -b $CI_COMMIT_REF_NAME --single-branch $CI_PROJECT_URL
# create new manifest
- cp pv-manifest/release.xml pv-manifest/.release.xml
- repo manifest -r -o pv-manifest/release.xml
# push manifest to gitlab, exit if no manifest changes
# push manifest to gitlab, exit when nothing changes
- cd pv-manifest
- git config --global user.name "Aníbal Portero Hermida"
- git config --global user.email "[email protected]"
......@@ -52,7 +54,14 @@ environment:
only:
- pushes
- tags
- triggers
deployment:
stage: deployment
script:
- "curl -X POST -F token=\"$DOCS_TRIGGER_TOKEN\" -F ref=master https://gitlab.com/api/v4/projects/4485718/trigger/pipeline"
only:
- pushes
- tags
.build:
stage: build
......@@ -65,7 +74,8 @@ environment:
script:
# download source code
- mkdir work; cd work
- repo init -u $CI_PROJECT_URL -m release.xml; cp ../release.xml .repo/manifests/release.xml; repo sync -j10
- repo init -u $CI_PROJECT_URL -m release.xml; cp ../release.xml .repo/manifests/release.xml
- until repo sync -j10; do echo "Sync failed, retrying..."; done
# download device from pantahub
- TOKEN=`http --ignore-stdin POST https://api.pantahub.com/auth/login username=$PHUSER password=$PHPASS | jq -r .token`
- pvr -a $TOKEN clone --objects .pvr/objects $PH_DEVICE_LATEST device-checkout
......@@ -100,7 +110,6 @@ environment:
only:
- pushes
- tags
- triggers
artifacts:
name: images
paths:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment