wg-gen-web/.gitlab-ci.yml

36 lines
762 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 --network br_docker --tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA} --tag ${CI_REGISTRY_IMAGE}:latest .
2020-01-30 06:45:49 +00:00
- docker push ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}
- docker push ${CI_REGISTRY_IMAGE}:latest