From 10e539bb132bd7cfe6f88e81dd4890b6b7ac0cd3 Mon Sep 17 00:00:00 2001 From: jaguililla Date: Wed, 28 Aug 2024 17:43:11 +0200 Subject: [PATCH 1/2] Improve :CI --- .github/workflows/release.yml | 2 +- .gitlab-ci.yml | 8 +++++--- .mvn/parent.xml | 11 ++++++++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12b116f..be4e3fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,7 +46,7 @@ jobs: export REGISTRY_PASSWORD="${GITHUB_TOKEN}" export GIT_USERNAME="${GITHUB_ACTOR}" - ./mvnw -D image.registry=ghcr.io/jaguililla/hexagonal_spring -B -P release + ./mvnw -D image.registry=ghcr.io/jaguililla/hexagonal_spring -B -P publish,release - name: Publish Client env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d87f38..5e6f0ae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,11 +46,13 @@ release: - sdk env install - export REGISTRY_USERNAME="${CI_REGISTRY_USER}" - export REGISTRY_PASSWORD="${CI_REGISTRY_PASSWORD}" - - export GIT_USERNAME="${GITLAB_USER_NAME}" - export CLIENT_PATH='target/generated-sources/openapi' - export CONTROLLERS_PATH='com/github/jaguililla/appointments/http/controllers' - - export REPOSITORY='https://maven.pkg.github.com/jaguililla/hexagonal_spring' + - export REPOSITORY='https://gitlab.example.com/api/v4/projects/jaguililla/hexagonal_spring/packages/maven' - export ALT_REPOSITORY="altDeploymentRepository=github::default::${REPOSITORY}" - - ./mvnw -D image.registry=${CI_REGISTRY}/jaguililla/hexagonal_spring -B -P release + - ./mvnw -D image.registry=${CI_REGISTRY}/jaguililla/hexagonal_spring -B -P publish - rm -rf "${CLIENT_PATH}/src/main/java/${CONTROLLERS_PATH}" - mvn -f "${CLIENT_PATH}/pom.xml" -B -D ${ALT_REPOSITORY} clean deploy + release: + tag_name: tag + description: Description TODO diff --git a/.mvn/parent.xml b/.mvn/parent.xml index 6d0b2eb..7176b6e 100644 --- a/.mvn/parent.xml +++ b/.mvn/parent.xml @@ -249,7 +249,7 @@ - release + publish ${release.goal} @@ -268,6 +268,15 @@ true + + + + + + release + + + org.codehaus.mojo exec-maven-plugin From f03d4458ebeadcfec1be84f843734a6348d4eb57 Mon Sep 17 00:00:00 2001 From: jaguililla Date: Wed, 28 Aug 2024 17:44:29 +0200 Subject: [PATCH 2/2] Improve :CI --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a7d574e..3aa9252 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ appointments - 0.3.1 + 0.3.2 Appointments Application to create appointments (REST API)