generated from PenaSide/GolangTemplate
Merge branch 'dev' into 'staging'
Update .gitlab-ci.yml file See merge request pena-services/customer!38
This commit is contained in:
commit
f9a7389870
@ -13,9 +13,7 @@ build-app:
|
||||
deploy-to-staging:
|
||||
extends: .deploy_template
|
||||
rules:
|
||||
- if: "$CI_COMMIT_BRANCH == $BRANCH"
|
||||
after_script:
|
||||
- ls
|
||||
- if: "$CI_COMMIT_BRANCH == $STAGING_BRANCH"
|
||||
|
||||
deploy-to-prod:
|
||||
rules:
|
||||
|
@ -5,6 +5,7 @@ FROM golang:1.20.3-alpine AS build
|
||||
RUN apk add --no-cache curl
|
||||
# Set work directory
|
||||
WORKDIR /app
|
||||
RUN apk add git
|
||||
# Create binary directory
|
||||
RUN mkdir /app/bin -p
|
||||
# Create golang migrate util directory
|
||||
@ -13,8 +14,9 @@ RUN mkdir /bin/golang-migrate -p
|
||||
ADD ./tools/migrate /bin/golang-migrate/
|
||||
# Add main files to app
|
||||
ADD . .
|
||||
RUN git config --global url."https://buildToken:glpat-axA8ttckx3aPf_xd2Dym@penahub.gitlab.yandexcloud.net/".insteadOf "https://penahub.gitlab.yandexcloud.net/"
|
||||
# Download go depences
|
||||
# RUN go mod download
|
||||
RUN go mod download
|
||||
# Build app
|
||||
RUN GOOS=linux go build -o bin ./...
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user