Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
firelizzard18 committed Sep 10, 2023
1 parent e7d6188 commit e42564f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitlab/common.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
stages:
- all

variables:
BOLD_RED: '\e[1;31m'
NO_COLOR: '\e[0m'
Expand All @@ -7,6 +10,7 @@ variables:
GO_CI_IMAGE: ${CI_REGISTRY_IMAGE}/ci-golang

build-image:golang:
stage: all
image: docker:20
needs: []
rules:
Expand All @@ -20,6 +24,7 @@ build-image:golang:
- docker push ${GO_CI_IMAGE}

.go:
stage: all
image: ${GO_CI_IMAGE}
cache:
key: go-mod-cache
Expand Down
1 change: 1 addition & 0 deletions .gitlab/merge-request.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mr bott:
stage: all
needs: []
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
Expand Down
4 changes: 4 additions & 0 deletions .gitlab/release.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- if: ($CI_COMMIT_BRANCH == 'release-1.0' || $CI_COMMIT_TAG != null) && $CI_PIPELINE_SOURCE != 'merge_request_event'

git describe:
stage: all
extends: .rules all
needs: []
script:
Expand All @@ -13,6 +14,7 @@ git describe:
dotenv: git.env

docker buildx:
stage: all
extends: .rules release
image: docker:20-git
needs: []
Expand All @@ -29,6 +31,7 @@ docker buildx:
- docker build --platform=local -o . ./docker-buildx

build main image:
stage: all
extends: .rules release
needs: [ docker buildx ]
image: docker:20
Expand All @@ -46,6 +49,7 @@ build main image:
- docker buildx build --platform linux/amd64,linux/arm64 --push -t ${PRODUCTION_IMAGE} .

build binaries:
stage: all
extends: [ .rules release, .go ]
needs: [ git describe ]
# rules:
Expand Down

0 comments on commit e42564f

Please sign in to comment.