2021-01-24 21:16:22 +01:00
|
|
|
include:
|
2021-08-28 18:26:16 +02:00
|
|
|
#- local: 'ci_templates/.cic-template.yml' #kaniko build templates
|
|
|
|
# these includes are app specific unit tests
|
2021-02-04 05:36:32 +01:00
|
|
|
- local: 'apps/cic-eth/.gitlab-ci.yml'
|
2021-02-06 19:28:08 +01:00
|
|
|
- local: 'apps/cic-ussd/.gitlab-ci.yml'
|
2021-02-07 03:29:24 +01:00
|
|
|
- local: 'apps/cic-notify/.gitlab-ci.yml'
|
2021-02-08 18:31:29 +01:00
|
|
|
- local: 'apps/cic-meta/.gitlab-ci.yml'
|
2021-02-18 06:04:30 +01:00
|
|
|
- local: 'apps/cic-cache/.gitlab-ci.yml'
|
2021-08-28 18:26:16 +02:00
|
|
|
#- local: 'apps/contract-migration/.gitlab-ci.yml'
|
|
|
|
#- local: 'apps/data-seeding/.gitlab-ci.yml'
|
2021-01-24 21:16:22 +01:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- test
|
2021-08-28 18:26:16 +02:00
|
|
|
- deploy
|
|
|
|
|
|
|
|
image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/docker-with-compose:latest
|
|
|
|
|
|
|
|
variables:
|
|
|
|
DOCKER_BUILDKIT: "1"
|
|
|
|
COMPOSE_DOCKER_CLI_BUILD: "1"
|
|
|
|
CI_DEBUG_TRACE: "true"
|
2021-09-08 05:06:51 +02:00
|
|
|
SEMVERBOT_VERSION: "0.2.0"
|
2021-08-28 18:26:16 +02:00
|
|
|
|
2021-09-08 05:06:51 +02:00
|
|
|
#before_script:
|
|
|
|
# - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
2021-08-28 18:26:16 +02:00
|
|
|
|
|
|
|
# runs on protected branches and pushes to repo
|
|
|
|
build-push:
|
|
|
|
stage: build
|
|
|
|
tags:
|
|
|
|
- integration
|
2021-09-01 22:00:44 +02:00
|
|
|
#script:
|
|
|
|
# - TAG=$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA sh ./scripts/build-push.sh
|
2021-08-28 18:26:16 +02:00
|
|
|
script:
|
2021-10-05 08:16:00 +02:00
|
|
|
- apk update && apk add git
|
|
|
|
- git remote remove origin
|
|
|
|
- git remote add origin https://kamikazechaser:$CI_TOKEN@gitlab.com/$CI_PROJECT_PATH
|
|
|
|
- curl -o sbot -L https://github.com/restechnica/semverbot/releases/download/v$SEMVERBOT_VERSION/sbot-linux-amd64
|
|
|
|
- chmod +x sbot
|
|
|
|
- ./sbot predict version -m git-commit
|
|
|
|
- export TAG=$(./sbot predict version)
|
|
|
|
- TAG=$TAG sh ./scripts/build-push.sh
|
|
|
|
- git tag -a v$TAG -m "ci tagged"
|
|
|
|
- git push origin v$TAG
|
2021-08-28 18:26:16 +02:00
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_REF_PROTECTED == "true"
|
|
|
|
when: always
|