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: ...@@ -13,7 +13,6 @@ variables:
stages: stages:
- test - test
- build - build
- tag
- publish - publish
test_job: test_job:
...@@ -25,19 +24,6 @@ test_job: ...@@ -25,19 +24,6 @@ test_job:
build_job: build_job:
stage: build 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: rules:
- if: $CI_COMMIT_REF_NAME == "prod" || $CI_COMMIT_REF_NAME == "dev" - if: $CI_COMMIT_REF_NAME == "prod" || $CI_COMMIT_REF_NAME == "dev"
when: always when: always
...@@ -46,12 +32,12 @@ tag_job: ...@@ -46,12 +32,12 @@ tag_job:
- docker:dind - docker:dind
tags: tags:
- docker-privileged - docker-privileged
dependencies:
- build_job
script: script:
- docker build -t $CI_REGISTRY_IMAGE:$version -f Containerfile . - docker build -t $CI_REGISTRY_IMAGE:$version -t $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:$environment_tag -f Containerfile .
- docker tag $CI_REGISTRY_IMAGE:$version $CI_REGISTRY_IMAGE:latest artifacts:
- docker tag $CI_REGISTRY_IMAGE:$version $CI_REGISTRY_IMAGE:$environment_tag paths:
- artifact.bin
expire_in: 5 min
publish_job: publish_job:
stage: publish stage: publish
...@@ -63,8 +49,6 @@ publish_job: ...@@ -63,8 +49,6 @@ publish_job:
- docker:dind - docker:dind
tags: tags:
- docker-privileged - docker-privileged
dependencies:
- tag_job
script: script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker push $CI_REGISTRY_IMAGE:$version - 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