Skip to content

Commit

Permalink
Merge branch 'develop' into 'main'
Browse files Browse the repository at this point in the history
Fix :GitLab :release :CI

See merge request jaguililla/hexagonal_spring!8
  • Loading branch information
jaguililla committed Aug 29, 2024
2 parents b378272 + 199be5f commit cc77a5c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit cc77a5c

Please sign in to comment.