aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrubo77 <github@r.z11.de>2018-07-03 08:21:30 +0200
committerrubo77 <github@r.z11.de>2018-07-03 08:35:15 +0200
commitb99b6cd2549245571ed09854b2ae6e93cd7f5a77 (patch)
tree1da0cf724ac2b8822268d7d2c25b709b8c2b291d
parent20abd13527bf87cf0211b3e0be350bebdcde707b (diff)
- create subfolder for gitlab-ci
- Reduce artifact keep-time to 1 day - Name of firmwares with running nr CI_PIPELINE_ID instead of CI_JOB_ID - replacing deprecated the $CI_BUILD_* variables
-rw-r--r--.gitlab-ci.yml26
1 files changed, 13 insertions, 13 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5e5a2bf..946d7f3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -28,8 +28,8 @@ prepare:
- docker info
- docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
- docker pull $CONTAINER_IMAGE:latest || true
- - docker build --cache-from $CONTAINER_IMAGE:latest -t $CONTAINER_IMAGE:$CI_BUILD_REF -t $CONTAINER_IMAGE:latest contrib/build-container
- - docker push $CONTAINER_IMAGE:$CI_BUILD_REF
+ - docker build --cache-from $CONTAINER_IMAGE:latest -t $CONTAINER_IMAGE:$CI_COMMIT_SHA -t $CONTAINER_IMAGE:latest contrib/build-container
+ - docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA
- docker push $CONTAINER_IMAGE:latest
cache: {}
@@ -39,7 +39,7 @@ clone:
stage: clone
image: $CI_REGISTRY_IMAGE/build
script:
- - ./update-git.sh | tee -a debug.log
+ - ./gitlab-ci/update-git.sh | tee -a debug.log
artifacts:
untracked: false
paths:
@@ -54,20 +54,20 @@ build:
script:
- export FORCE_UNSAFE_CONFIGURE=1
# We can't be sure the cache is actually available right now, thus we have to perform all cache steps here, too
- - ./update-git.sh | tee -a debug.log
- - ./build.sh -c update -b $CI_BUILD_REF_NAME -n $CI_JOB_ID -m "-j $(nproc --all) V=s" | tee -a debug.log
+ - ./gitlab-ci/update-git.sh | tee -a debug.log
+ - ./gitlab-ci/build.sh -c update -b $CI_COMMIT_REF_NAME -n $CI_PIPELINE_ID -m "-j $(nproc --all) V=s" | tee -a debug.log
# We should never need this, should we?
- - ./build.sh -c clean -b $CI_BUILD_REF_NAME -n $CI_JOB_ID -m "-j $(nproc --all) V=s" | tee -a debug.log
- #- ./build.sh -c download -b $CI_BUILD_REF_NAME -n $CI_JOB_ID -m "-j $(nproc --all) V=s" | tee -a debug.log
- - ./build.sh -c build -b $CI_BUILD_REF_NAME -n $CI_JOB_ID -m "-j $(nproc --all) V=s" | tee -a debug.log
+ - ./gitlab-ci/build.sh -c clean -b $CI_COMMIT_REF_NAME -n $CI_PIPELINE_ID -m "-j $(nproc --all) V=s" | tee -a debug.log
+ #- ./gitlab-ci/build.sh -c download -b $CI_COMMIT_REF_NAME -n $CI_PIPELINE_ID -m "-j $(nproc --all) V=s" | tee -a debug.log
+ - ./gitlab-ci/build.sh -c build -b $CI_COMMIT_REF_NAME -n $CI_PIPELINE_ID -m "-j $(nproc --all) V=s" | tee -a debug.log
# Bring gluon repo to cacheable state
- - ./build.sh -c clean -b $CI_BUILD_REF_NAME -n $CI_JOB_ID -m "-j $(nproc --all) V=s" | tee -a debug.log
+ - ./gitlab-ci/build.sh -c clean -b $CI_COMMIT_REF_NAME -n $CI_PIPELINE_ID -m "-j $(nproc --all) V=s" | tee -a debug.log
artifacts:
untracked: false
paths:
- debug.log
- output
- expire_in: 1 week
+ expire_in: 1 day
when: always
dependencies: []
@@ -77,8 +77,8 @@ sign:
script:
- echo $SIGNING_KEY > signing_key
# Update git in case cache is empty
- - ./update-git.sh | tee -a debug.log
- - ./build.sh -c sign -b $CI_BUILD_REF_NAME -s $(pwd)/signing_key
+ - ./gitlab-ci/update-git.sh | tee -a debug.log
+ - ./gitlab-ci/build.sh -c sign -b $CI_COMMIT_REF_NAME -s $(pwd)/signing_key
artifacts:
untracked: false
paths:
@@ -99,7 +99,7 @@ upload:
- ssh-add <(echo "$SSH_KEY")
# create fake gluon dir to satisfy build script
- mkdir -p gluon
- - ./build.sh -c upload -b $CI_BUILD_REF_NAME -n $CI_JOB_ID
+ - ./gitlab-ci/build.sh -c upload -b $CI_COMMIT_REF_NAME -n $CI_PIPELINE_ID
dependencies:
- sign
cache: {}