summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2021-03-02 11:48:25 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2021-07-08 14:10:30 +0200
commit4c98214eda3b652899ae8972fba5cb4756a6116f (patch)
tree1fb5e4812bb601f31ee22dd62ec0e2ca8c158276
parentbff056302c6344fe00f929ea0ad5c4099741cc3d (diff)
add gitlab-ci
Import from dunfell-5.x.y branch @ 1687afa. This does a repo init; repo sync. It will fail if any of the layers cannot be cloned at the given revision. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r--.gitlab-ci.yml40
1 files changed, 40 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..609976c
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,40 @@
+variables:
+# uncomment for the pipeline debug purpose
+# CI_DEBUG_TRACE: "true"
+ CI_IMAGE: gitlab.int.toradex.com:4567/oleksandr.suvorov/ci-toolchain-container:linux-kernel-builder
+ DOCKER_HOST: tcp://docker:2375
+ DOCKER_DRIVER: overlay2
+ DOCKER_TLS_CERTDIR: ""
+
+stages:
+ - build
+
+repo-sync:
+ rules:
+# Don't run the job when tagging, it fails as $CI_COMMIT_BRANCH is not set
+# https://gitlab.com/gitlab-org/gitlab-foss/-/issues/7184
+# https://docs.gitlab.com/ee/ci/yaml/README.html#rules
+ - if: '$CI_COMMIT_BRANCH != null'
+ stage: build
+ image: $CI_IMAGE
+ variables:
+ GIT_STRATEGY: clone
+ script:
+ - ORIGIN=$(git remote get-url origin)
+ - mkdir -p ../bin
+ - wget -O ../bin/repo https://commondatastorage.googleapis.com/git-repo-downloads/repo
+ - chmod a+x ../bin/repo
+ - mkdir -p ../workspace
+ - cd ../workspace
+ - ../bin/repo init -u $ORIGIN -b $CI_COMMIT_BRANCH -m tdxref/default.xml
+ - ../bin/repo sync
+ - ../bin/repo init -u $ORIGIN -b $CI_COMMIT_BRANCH -m tdxref/integration.xml
+ - ../bin/repo sync
+ - ../bin/repo init -u $ORIGIN -b $CI_COMMIT_BRANCH -m tdxref/next.xml
+ - ../bin/repo sync
+ - ../bin/repo init -u $ORIGIN -b $CI_COMMIT_BRANCH -m torizoncore/default.xml
+ - ../bin/repo sync
+ - ../bin/repo init -u $ORIGIN -b $CI_COMMIT_BRANCH -m torizoncore/integration.xml
+ - ../bin/repo sync
+ - ../bin/repo init -u $ORIGIN -b $CI_COMMIT_BRANCH -m torizoncore/next.xml
+ - ../bin/repo sync