Merge branch 'dev' into 'staging'

Update .gitlab-ci.yml file

See merge request pena-services/customer!38
This commit is contained in:
Mikhail 2024-02-10 01:35:06 +00:00 committed by skeris
commit f9a7389870
2 changed files with 4 additions and 4 deletions

@ -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 ./...