0
0
mirror of https://github.com/vx3r/wg-gen-web.git synced 2024-12-18 00:13:23 +00:00
wg-gen-web/.gitlab-ci.yml

36 lines
742 B
YAML
Raw Normal View History

2020-01-30 06:45:49 +00:00
stages:
- build
- deploy
build-back:
stage: build
2020-02-03 10:14:15 +00:00
image: golang:alpine
2020-01-30 06:45:49 +00:00
script:
2020-02-03 10:14:15 +00:00
- go build -o ${CI_PROJECT_NAME}-linux-amd64
2020-01-30 06:45:49 +00:00
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