Commit e6dbb6f9 authored by Aníbal Portero Hermida's avatar Aníbal Portero Hermida

Merge branch 'new_auto_commit_message' into 'master'

Modify .gitlab-ci.yml; New auto commit commit and fix stages dependencies

See merge request !8
parents 9a265510 ebcc1373
Pipeline #81710419 failed with stages
in 43 minutes and 54 seconds
include:
- remote: 'https://gitlab.com/pantacor/ci/ci-templates/raw/master/pantavisor-builder.yml'
stages:
- upgrade
- build
......@@ -22,15 +19,59 @@ upgrade:
- mkdir work; cd work
- repo init -u $CI_PROJECT_URL; repo sync -j10
- git clone -b $CI_COMMIT_REF_NAME --single-branch $CI_PROJECT_URL
- cp pv-manifest/release.xml pv-manifest/.release.xml
- repo manifest -r -o pv-manifest/release.xml
- cd pv-manifest
- git config --global user.name "Aníbal Portero Hermida"
- git config --global user.email "[email protected]"
- git add release.xml
- git commit -m "auto generated commit" || exit 0
- RELEASE_CHANGES=`repo diffmanifests --raw release.xml .release.xml`
- git commit -m "auto commit of release.xml for daily build" -m "$RELEASE_CHANGES" || exit 0
- git push http://anibalportero:${PERSONAL_ACCESS_TOKEN}@$CI_SERVER_HOST/$CI_PROJECT_PATH HEAD:$CI_COMMIT_REF_NAME
- cd ../..; mkdir out
- cp -r work/pv-manifest/release.xml out/release.xml
only:
- schedules
artifacts:
expire_in: 1 day
paths:
- out/release.xml
.build:
stage: build
variables:
PH_DEVICE_IN: TO_BE_OVERRIDDEN
PH_DEVICE_OUT: TO_BE_OVERRIDDEN
ARCH: TO_BE_OVERRIDDEN
TARGET: TO_BE_OVERRIDDEN
DEPLOY: TO_BE_OVERRIDDEN
script:
- test -e out/release.xml || exit 0
- mkdir work; cd work
- repo init -u $CI_PROJECT_URL -m release.xml; cp ../out/release.xml .repo/manifests/release.xml; repo sync -j10
- 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_IN device-checkout
- PVR_MERGE_SRC=device-checkout/.pvr PV_BUILD_INTERACIVE=false ./build.docker.sh $ARCH
- test "$DEPLOY" = "false" && exit 0
- cd device-checkout
- rm -rf *
- pvr get ../out/$TARGET/trail/final/trails/0/.pvr/
- pvr checkout
- "test -z \"$CI_COMMIT_TAG\" && pvr app ls | while read -r line; do [ -f $line/src.json ] && ( pvr app update $line; pvr app install $line ) || echo \"Skipping app without src.json $line\"; done"
- pvr add .
- pvr commit
- TOKEN=`http --ignore-stdin POST https://api.pantahub.com/auth/login username=$PHUSER password=$PHPASS | jq -r .token`
- pvr -a $TOKEN post -m "$CI_COMMIT_SHORT_SHA" $PH_DEVICE_OUT
- cd ..
- PVR_MERGE_SRC=device-checkout/.pvr PV_BUILD_INTERACIVE=false ./build.docker.sh $ARCH
- cd out/$TARGET/
- xz *.img
dependencies:
- upgrade
artifacts:
name: images
paths:
- work/out/$TARGET/*.xz
build-rpi3-daily:
extends: .build
......
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