Skip to content

Commit

Permalink
Merge pull request #24 from jaguililla/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jaguililla authored Aug 29, 2024
2 parents 6104bb4 + dddeff2 commit 5ef27c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ jobs:
export REGISTRY_PASSWORD="${GITHUB_TOKEN}"
export POM_VERSION="$(mvn help:evaluate -D expression=project.version -q -D forceStdout)"
git config --global user.name "${GIT_USERNAME}"
./mvnw -D image.registry=ghcr.io/jaguililla/hexagonal_spring -D spring-boot.build-image.publish=true -B deploy
git config --global user.name "${GIT_USERNAME}"
git config --global user.email "${GIT_USERNAME}@github.com"
git tag -m "Release ${POM_VERSION}" "${POM_VERSION}"
git push --tags
- name: Publish Client
Expand Down
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 5ef27c4

Please sign in to comment.