docker镜像构建

This commit is contained in:
william
2024-04-27 08:46:05 +08:00
parent 40555fcd64
commit 7524952c46
3 changed files with 55 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
stages:
# 构建
- build
- docker
- webhook
build:
@@ -37,6 +38,26 @@ build:
- mvn clean install -Dmaven.test.skip=true
- ls
- echo ">>>>>>Finish Building<<<<<<"
docker:
stage: docker
tags:
- hk2
dependencies:
- build
only:
- main
- develop
script:
- echo ">>>>>>Start Building Image<<<<<<"
- ls
- ls target
- echo $DOCKER_PASSWORD
- echo $CI_PIPELINE_ID
- docker build -t juyoutech/india_market_java:latest .
- docker tag juyoutech/india_market_java:latest juyoutech/india_market_java:$CI_PIPELINE_ID
- docker login -u juyoutech -p $DOCKER_PASSWORD
- docker push juyoutech/india_market_java:latest
- docker push juyoutech/india_market_java:$CI_PIPELINE_ID
webhook:
stage: webhook
only: