Skip to content

Commit

Permalink
Merge pull request #21 from jaguililla/develop
Browse files Browse the repository at this point in the history
Improve :CI
  • Loading branch information
jaguililla authored Aug 28, 2024
2 parents f5be854 + 5a24101 commit 7797f7c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 5 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 10 additions & 1 deletion .mvn/parent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
</profile>

<profile>
<id>release</id>
<id>publish</id>

<build>
<defaultGoal>${release.goal}</defaultGoal>
Expand All @@ -268,6 +268,15 @@
<publish>true</publish>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>release</id>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</parent>

<artifactId>appointments</artifactId>
<version>0.3.1</version>
<version>0.3.2</version>

<name>Appointments</name>
<description>Application to create appointments (REST API)</description>
Expand Down

0 comments on commit 7797f7c

Please sign in to comment.