Skip to content
Snippets Groups Projects
Commit 125fbd79 authored by Lorenzo Pagliai's avatar Lorenzo Pagliai
Browse files

Insert new trigger rule on CI_COMMIT_TAG

* Insert trigger rule allowing to build/deploy/notify on tag creation
* In deploy-on-tag job the artifacts are uploaded to the official SECO Azure
container with dedicated token, stored as 'yocto_ng' group variable
* The commit should fix the error in notify job
parent 46dc254a
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ variables:
# The id of the gitlab project used in the rules section to not run pipelines in
# forked projects. Using variable here, to allow override in other projects including
# this file.
#MANIFEST_PROJECT_ID: 2307
MANIFEST_PROJECT_ID: 2307
# In the manifest, the remotes are specified by an identifier. This is used to find
# out included projects for the retrigger job. In custom manifests, the remote may be
......@@ -50,6 +50,7 @@ workflow:
- if: $CI_PIPELINE_SOURCE == "pipeline"
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_TAG
# Do not run pipelines for merge requests
- if: $CI_MERGE_REQUEST_IID
when: never
......@@ -71,7 +72,9 @@ workflow:
- if: $CI_PIPELINE_SOURCE == "api"
- if: $CI_PIPELINE_SOURCE == "pipeline"
- if: $CI_PIPELINE_SOURCE == "web"
# Trigger the pipeline on schedule basis (for weekly release)
- if: $CI_COMMIT_TAG
# Trigger the pipeline on schedule basis (for weekly release)
- if: $CI_PIPELINE_SOURCE == "schedule"
stage: manifest-pipeline
......@@ -130,10 +133,6 @@ retrigger:
extends:
- .infrastructure
- .full_build_pipeline
rules:
#Do not run on schedule
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
stage: retrigger
rules:
- if: $CI_PIPELINE_SOURCE == "pipeline"
......@@ -157,8 +156,9 @@ retrigger:
- .full_build_pipeline
rules:
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: manual
when: "manual"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_TAG
stage: build
timeout: !reference [variables, BUILD_TIMEOUT]
image:
......@@ -239,14 +239,24 @@ retrigger:
cache: {}
retry : 2
timeout: 20 m
tags:
- azure_deploy
rules:
# Trigger deploy jobs only on a schedule basis (for weekly release)
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_TAG
script:
- BASE_DIRECTORY=$PWD
- echo "Deploying packages..."
- ART_PATH=$(cat pathname.txt)
- DEPLOY_DATE=$(date +%Y%m%d)
- |
if [ -n "$CI_COMMIT_TAG" ]; then
TAG_NAME=${CI_COMMIT_TAG}
AZURE_STORAGE_SAS_TOKEN="${AZURE_STORAGE_PUBLIC_SAS_TOKEN}"
AZURE_CONTAINER_NAME="${AZURE_PUBLIC_CONTAINER_NAME}"
AZURE_PATH="${AZURE_PATH}/edgehog/"
fi
- |
uboot_filename="seco_edgehog_"$PROCESSOR"_"$BOARD"_uboot_"$KERNEL"_"$TAG_NAME"_"$DEPLOY_DATE".tar.gz"
uboot_filename_latest="seco_edgehog_"$PROCESSOR"_"$BOARD"_uboot_"$KERNEL"_"$TAG_NAME"_latest.tar.gz"
......@@ -269,7 +279,7 @@ retrigger:
echo $ART_PATH
ls -la $ART_PATH
find $ART_PATH -iname $UBOOT_FILE -exec cp -L {} $BASE_DIRECTORY/ \;
echo "$UBOOT_FILE"
echo "${UBOOT_FILE}"
ls -la
tar -czvf $BASE_DIRECTORY/$uboot_filename -C $BASE_DIRECTORY $UBOOT_FILE
ls -la
......@@ -461,15 +471,16 @@ retrigger:
notify:
stage: notify
extends:
- .infrastructure
image:
name: mcr.microsoft.com/azure-cli
entrypoint: [""]
tags:
- send_notify
allow_failure: true
rules:
# Trigger deploy jobs only on a schedule basis (for weekly release)
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_TAG
script:
- |
echo -e "The job results for all boards are listed below (also available by clicking on the **Job Report** button)." >> Job_message.txt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment