gitlab-ci 추가

This commit is contained in:
2024-04-05 16:18:44 +09:00
parent fa0405a8b0
commit bf11a0bac2
2 changed files with 23 additions and 0 deletions

19
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,19 @@
include:
- var.yml
docker-build:
image: docker:cli
stage: build
services:
- docker:dind
variables:
DOCKER_IMAGE_NAME: $reg/test/intermax:$ver
before_script:
- docker login -u "$reg_id" -p "$reg_pw" $reg
script:
- docker build --pull -t "$DOCKER_IMAGE_NAME" .
- docker push "$DOCKER_IMAGE_NAME"
rules:
- if: $CI_COMMIT_BRANCH
exists:
- Dockerfile

4
var.yml Normal file
View File

@@ -0,0 +1,4 @@
reg: "harbor.elppa.xyz"
reg_id: "sa_8001"
reg_pw: "Ios2011a!"
ver: "test1"