mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2024-12-18 00:13:23 +00:00
36 lines
742 B
YAML
36 lines
742 B
YAML
stages:
|
|
- build
|
|
- deploy
|
|
|
|
build-back:
|
|
stage: build
|
|
image: golang:alpine
|
|
script:
|
|
- 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
|