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: deploy-to-staging:
extends: .deploy_template extends: .deploy_template
rules: rules:
- if: "$CI_COMMIT_BRANCH == $BRANCH" - if: "$CI_COMMIT_BRANCH == $STAGING_BRANCH"
after_script:
- ls
deploy-to-prod: deploy-to-prod:
rules: rules:

@ -5,6 +5,7 @@ FROM golang:1.20.3-alpine AS build
RUN apk add --no-cache curl RUN apk add --no-cache curl
# Set work directory # Set work directory
WORKDIR /app WORKDIR /app
RUN apk add git
# Create binary directory # Create binary directory
RUN mkdir /app/bin -p RUN mkdir /app/bin -p
# Create golang migrate util directory # Create golang migrate util directory
@ -13,8 +14,9 @@ RUN mkdir /bin/golang-migrate -p
ADD ./tools/migrate /bin/golang-migrate/ ADD ./tools/migrate /bin/golang-migrate/
# Add main files to app # Add main files to app
ADD . . ADD . .
RUN git config --global url."https://buildToken:glpat-axA8ttckx3aPf_xd2Dym@penahub.gitlab.yandexcloud.net/".insteadOf "https://penahub.gitlab.yandexcloud.net/"
# Download go depences # Download go depences
# RUN go mod download RUN go mod download
# Build app # Build app
RUN GOOS=linux go build -o bin ./... RUN GOOS=linux go build -o bin ./...