Commit 48b2b612 authored by Erik Hedenström's avatar Erik Hedenström
Browse files

Simplified ci file

parent 0d63b5d7
Pipeline #1537 passed with stages
in 2 minutes and 37 seconds
image: gcr.io/hedenstroem-docker/gitlab-builder-base
image: gcr.io/hedenstroem-docker/gitlab-builder-tools
before_script:
- export GOPATH=${CI_PROJECT_DIR}/.cache
......@@ -9,7 +9,7 @@ stages:
- deps
.build: &build
image: gcr.io/hedenstroem-docker/gitlab-builder-go:1.14
image: golang:1.14
stage: build
only:
- master
......@@ -26,13 +26,23 @@ stages:
paths:
- $CI_PROJECT_NAME-$CI_JOB_NAME
version.txt:
stage: build
only:
- /^\d+[.]\d+[.]\d+$/
script:
- git describe --tags --long > $CI_PROJECT_NAME-version.txt
artifacts:
name: "$CI_PROJECT_NAME-version"
paths:
- $CI_PROJECT_NAME-version.txt
upload to s3:
image: amazon/aws-cli
stage: upload
only:
- /^\d+[.]\d+[.]\d+$/
script:
- git describe --tags --long > $CI_PROJECT_NAME-version.txt
- eval $(vaultenv read -s secret/gitlab-ci/s3)
- aws s3 cp . s3://s3.hedenstroem.com/utils/$CI_PROJECT_NAME/ --recursive --exclude="*" --include="$CI_PROJECT_NAME-*"
- aws configure set preview.cloudfront true
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/utils/$CI_PROJECT_NAME/*"
......@@ -41,7 +51,7 @@ gitlab-builder-base:
stage: deps
only:
- /^\d+[.]\d+[.]\d+$/
trigger: google-cloud/cloud-build/gitlab-builder-base
trigger: google-cloud/cloud-build/gitlab-builder-tools
"darwin-amd64": *build
"linux-arm": *build
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment