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:
|
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 ./...
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user