Skip to content
Snippets Groups Projects
Commit 743b3d28 authored by schnarkus's avatar schnarkus
Browse files

inline

parent c60739b0
No related branches found
No related tags found
No related merge requests found
Pipeline #68708 failed
......@@ -13,7 +13,6 @@ variables:
stages:
- test
- build
- tag
- publish
test_job:
......@@ -25,19 +24,6 @@ test_job:
build_job:
stage: build
rules:
- if: $CI_COMMIT_REF_NAME == "prod" || $CI_COMMIT_REF_NAME == "dev"
when: always
image: public.ecr.aws/docker/library/golang:1.21
script: |
GOARCH=amd64 GOOS=linux CGO_ENABLED=0 go build -o artifact.bin ./*.go
artifacts:
paths:
- artifact.bin
expire_in: 5 min
tag_job:
stage: tag
rules:
- if: $CI_COMMIT_REF_NAME == "prod" || $CI_COMMIT_REF_NAME == "dev"
when: always
......@@ -46,12 +32,12 @@ tag_job:
- docker:dind
tags:
- docker-privileged
dependencies:
- build_job
script:
- docker build -t $CI_REGISTRY_IMAGE:$version -f Containerfile .
- docker tag $CI_REGISTRY_IMAGE:$version $CI_REGISTRY_IMAGE:latest
- docker tag $CI_REGISTRY_IMAGE:$version $CI_REGISTRY_IMAGE:$environment_tag
- docker build -t $CI_REGISTRY_IMAGE:$version -t $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:$environment_tag -f Containerfile .
artifacts:
paths:
- artifact.bin
expire_in: 5 min
publish_job:
stage: publish
......@@ -63,8 +49,6 @@ publish_job:
- docker:dind
tags:
- docker-privileged
dependencies:
- tag_job
script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker push $CI_REGISTRY_IMAGE:$version
......
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