Compare commits

...

23 Commits

Author SHA1 Message Date
semvervot e88b947e52 fix sbot path 2021-10-19 13:35:49 -07:00
semvervot fa96f6adce chore: fix the semver image 2021-10-19 12:12:32 -07:00
semvervot 2b4771d97a fix: the image is in cic-base-images 2021-10-18 17:52:24 -07:00
semvervot 078c2720f9 Merge branch 'master' into feat/automation/add-semver 2021-10-18 13:52:43 -07:00
semvervot c3a63d0942 chore: build cache 2021-10-18 13:52:39 -07:00
semvervot c72bb56220 feat: test this feature bump 2021-10-18 12:14:29 -07:00
semvervot a6384a46b8 fix login flags again 2021-10-18 11:06:47 -07:00
semvervot aa92c7e5e0 fix login flags 2021-10-18 11:02:08 -07:00
semvervot 0856d26fc7 docker login 2021-10-18 10:13:48 -07:00
semvervot 1f50abe13c updated sbot config 2021-10-18 10:08:44 -07:00
Blair Vanderlugt 035531ba49 url to ssh 2021-10-16 18:00:07 -07:00
Blair Vanderlugt d155566735 Update .gitlab-ci.yml 2021-10-17 00:47:49 +00:00
Blair Vanderlugt 0d5bd8edb2 run only on protected branches 2021-10-15 18:47:01 -07:00
Blair Vanderlugt ab70ecee26 added version stage 2021-10-15 15:01:42 -07:00
Blair Vanderlugt d77deb28f0 improvement: add bot ssh deploy key 2021-10-15 14:58:58 -07:00
Mohamed Sohail 8bf5c1fec5
fix: remove latest tag build step 2021-10-05 09:21:31 +03:00
Mohamed Sohail df1c38a6f0
add: semverbot config with auto git tag 2021-10-05 09:16:00 +03:00
Blair Vanderlugt 68184c6e00 fix: sbot path hack...sbot needs a better execution path and git needs to be installed in the build image 2021-09-07 20:06:51 -07:00
Blair Vanderlugt 21c48a7a5f fix: use relative path 2021-09-07 16:42:57 -07:00
Blair Vanderlugt bbc13fb03b fix: add sbot to path 2021-09-07 16:38:11 -07:00
Blair Vanderlugt bdb825bfb8 fix: mkdir 2021-09-07 16:34:02 -07:00
Blair Vanderlugt f9518d01d7 fix: yaml error 2021-09-07 16:32:20 -07:00
Blair Vanderlugt 25c75a1218 add semver 2021-09-07 16:29:58 -07:00
4 changed files with 61 additions and 5 deletions

View File

@ -10,6 +10,7 @@ include:
#- local: 'apps/data-seeding/.gitlab-ci.yml'
stages:
- version
- build
- test
- deploy
@ -20,9 +21,39 @@ variables:
DOCKER_BUILDKIT: "1"
COMPOSE_DOCKER_CLI_BUILD: "1"
CI_DEBUG_TRACE: "true"
SEMVERBOT_VERSION: "0.2.0"
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
#before_script:
# - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
version:
#image: python:3.7-stretch
image: registry.gitlab.com/grassrootseconomics/cic-base-images/ci-version:b01318ae
stage: version
script:
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- ssh-keyscan gitlab.com >> ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- git remote set-url origin git@gitlab.com:grassrootseconomics/cic-internal-integration.git
- export TAG=$(sbot predict version -m auto)
- |
if [[ -z $TAG ]]
then
echo "tag could not be set $@"
exit 1
fi
- echo $TAG > version
- git tag -a v$TAG -m "ci tagged"
- git push origin v$TAG
artifacts:
paths:
- version
rules:
- if: $CI_COMMIT_REF_PROTECTED == "true"
when: always
- if: $CI_COMMIT_REF_NAME == "master"
when: always
# runs on protected branches and pushes to repo
build-push:
@ -30,12 +61,17 @@ build-push:
tags:
- integration
#script:
# - TAG=$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA sh ./scripts/build-push.sh
# - TAG=$CI_Cbefore_script:
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- TAG=latest sh ./scripts/build-push.sh
- TAG=latest ./scripts/build-push.sh
- TAG=$(cat ./version) ./scripts/build-push.sh
rules:
- if: $CI_COMMIT_REF_PROTECTED == "true"
when: always
- if: $CI_COMMIT_REF_NAME == "master"
when: always
deploy-dev:
stage: deploy

16
.semverbot.toml Normal file
View File

@ -0,0 +1,16 @@
[git]
[git.config]
email = "semverbot@grassroots.org"
name = "semvervot"
[git.tags]
prefix = "v"
[semver]
mode = "git-commit"
[semver.detection]
patch = ["fix", "[fix]", "patch", "[patch]"]
minor = ["minor", "[minor]", "feat", "[feat]", "release", "[release]", "bump", "[bump]"]
major = ["BREAKING CHANGE"]

View File

@ -4,6 +4,7 @@
This repo uses docker-compose and docker buildkit. Set the following environment variables to get started:
```
export COMPOSE_DOCKER_CLI_BUILD=1
export DOCKER_BUILDKIT=1

View File

@ -6,4 +6,7 @@ set -e
TAG=${TAG?Variable not set} \
docker-compose \
-f docker-compose.yml \
build
build \
--no-cache \
--parallel \
--progress plain