1
1
mirror of https://github.com/vx3r/wg-gen-web.git synced 2024-11-26 04:19:41 +01:00
wg-gen-web/.gitlab-ci.yml
2020-01-30 15:45:49 +09:00

36 lines
766 B
YAML

stages:
- build
- deploy
build-back:
stage: build
image: golang:latest
script:
- GOOS=linux GOARCH=amd64 go build -o ${CI_PROJECT_NAME}-linux-amd64
artifacts:
paths:
- ${CI_PROJECT_NAME}-linux-amd64
build-front:
stage: build
image: node:10-alpine
script:
- cd ./ui
- npm install
- npm run build
- cd ..
artifacts:
paths:
- ui/dist
deploy:
stage: deploy
image: docker:latest
only:
- master
script:
- docker login -u ${CI_REGISTRY_USER} -p ${REGISTRY_PASSWORD} ${CI_REGISTRY}
- docker build --tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA} --tag ${CI_REGISTRY_IMAGE}:latest .
- docker push ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}
- docker push ${CI_REGISTRY_IMAGE}:latest