diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1c2c833..9f0182b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,19 +51,26 @@ publish: - export REPOSITORY="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/maven" - export ALT_REPOSITORY="altDeploymentRepository=gitlab::default::${REPOSITORY}" - export IMG_REGISTRY="${CI_REGISTRY}/jaguililla/hexagonal_spring" + - export POM_VERSION="$(mvn help:evaluate -D expression=project.version -q -D forceStdout)" - ./mvnw -s ci_settings.xml -D ${ALT_REPOSITORY} -D image.registry=${IMG_REGISTRY} -D spring-boot.build-image.publish=true -B deploy - rm -rf "${CLIENT_PATH}/src/main/java/${CONTROLLERS_PATH}" - mvn -s ci_settings.xml -f "${CLIENT_PATH}/pom.xml" -B -D ${ALT_REPOSITORY} clean deploy + - echo "POM_VERSION=${POM_VERSION}" >> variables.env + artifacts: + reports: + dotenv: variables.env release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest - dependencies: - - publish + needs: + - job: publish + artifacts: true rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH script: - - export POM_VERSION="$(mvn help:evaluate -D expression=project.version -q -D forceStdout)" + - echo "Release version ${POM_VERSION}" release: tag_name: ${POM_VERSION} description: Release ${POM_VERSION} + ref: ${POM_VERSION}