ci: add build
This commit is contained in:
parent
fd6e3f2144
commit
1418b54b7c
1 changed files with 27 additions and 0 deletions
27
.gitlab-ci.yml
Normal file
27
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
default:
|
||||||
|
image: sikalabs/ci
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
variables:
|
||||||
|
IMAGE_TAG: $CI_COMMIT_BRANCH-$CI_COMMIT_SHORT_SHA
|
||||||
|
|
||||||
|
docker:build:
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
|
||||||
|
- docker info
|
||||||
|
script:
|
||||||
|
- docker build -t $CI_REGISTRY_IMAGE:$IMAGE_TAG .
|
||||||
|
- docker push $CI_REGISTRY_IMAGE:$IMAGE_TAG
|
||||||
|
|
||||||
|
# deploy:prod:
|
||||||
|
# stage: deploy
|
||||||
|
# environment:
|
||||||
|
# name: prod
|
||||||
|
# script:
|
||||||
|
# - helm upgrade --install ./deploy/chart/wsj-standup --set image.tag=$IMAGE_TAG
|
||||||
|
# rules:
|
||||||
|
# - if: '$CI_COMMIT_BRANCH == "main"'
|
||||||
Reference in a new issue