Skip to content
Snippets Groups Projects
Commit 84c6d0a2 authored by Gaelle.Barris's avatar Gaelle.Barris
Browse files

Update .gitlab-ci.yml file

parent 4d88ba0b
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ publish-maven-package-private:
artifacts:
expire_in: 10 min
paths:
- target/
- target/*.jar
only:
- tags
......@@ -94,17 +94,23 @@ publish-docker-image-private:
after_script:
- podman logout ${CI_REGISTRY}
- rm -r ~/.docker
artifacts:
expire_in: 10 min
paths:
- target/*.jar
only:
- tags
publish-maven-package-public:
stage: publish
dependencies:
- publish-docker-image-private
script:
- mvn $MAVEN_CLI_OPTS_PUBLIC -DskipTests=true deploy
artifacts:
expire_in: 10 min
paths:
- target/
- target/*.jar
only:
- tags
when: manual
......@@ -119,7 +125,6 @@ publish-docker-image-public:
PODMAN_AUTH_CONFIG="{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64)\"}}}"
echo "${PODMAN_AUTH_CONFIG}" > ~/.docker/config.json
podman login --authfile=~/.docker/config.json ${CI_REGISTRY}
script:
- source $CI_PROJECT_DIR/ci-info.env
- echo "target=https://gitlab-forge.din.developpement-durable.gouv.fr/api/v4/projects/17127/packages/maven/${IMAGE_NAME}:${IMAGE_TAG}"
......@@ -127,7 +132,6 @@ publish-docker-image-public:
- podman build ${PODMAN_ARGS} --build-arg JAR_FILE=./target/*-boot.war ${PODMAN_CACHE_ARGS} -t ${TARGET_IMAGE_NAME} --file=Dockerfile .
- podman ${PODMAN_ARGS} image list
- podman ${PODMAN_ARGS} push ${TARGET_IMAGE_NAME}
after_script:
- podman logout ${CI_REGISTRY}
- rm -r ~/.docker
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment