mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-02-04 21:31:11 +00:00
Add gitlab file
This commit is contained in:
parent
735bac8038
commit
47d4dc8643
1 changed files with 18 additions and 1 deletions
|
|
@ -7,6 +7,8 @@ stages:
|
|||
variables:
|
||||
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
|
||||
IMAGE_MR: "$CI_REGISTRY_IMAGE/mr:$CI_COMMIT_SHORT_SHA"
|
||||
IMAGE_MAIN: "$CI_REGISTRY_IMAGE/main:latest"
|
||||
|
||||
|
||||
checkstyle:
|
||||
stage: checkstyle
|
||||
|
|
@ -52,4 +54,19 @@ docker-build-mr:
|
|||
- docker build -t $IMAGE_MR .
|
||||
- docker push $IMAGE_MR
|
||||
only:
|
||||
- merge_requests
|
||||
- merge_requests
|
||||
|
||||
docker-build-main:
|
||||
stage: docker
|
||||
image: docker:24
|
||||
services:
|
||||
- docker:24-dind
|
||||
variables:
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
before_script:
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||
script:
|
||||
- docker build -t $IMAGE_MAIN .
|
||||
- docker push $IMAGE_MAIN
|
||||
only:
|
||||
- main
|
||||
Loading…
Add table
Add a link
Reference in a new issue