Skip to content

Commit

Permalink
Fix :GitLab :release :CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jaguililla committed Aug 29, 2024
1 parent 7626634 commit 955934a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ release:
- export REGISTRY_PASSWORD="${CI_REGISTRY_PASSWORD}"
- export CLIENT_PATH='target/generated-sources/openapi'
- export CONTROLLERS_PATH='com/github/jaguililla/appointments/http/controllers'
- export REPOSITORY='https://gitlab.com/api/v4/projects/58632066/packages/maven'
- export ALT_REPOSITORY="altDeploymentRepository=github::default::${REPOSITORY}"
- 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"
- ./mvnw -D ${ALT_REPOSITORY} -D image.registry=${IMG_REGISTRY} -B -P publish
- ./mvnw -s ci_settings.xml -D ${ALT_REPOSITORY} -D image.registry=${IMG_REGISTRY} -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:
Expand Down
20 changes: 20 additions & 0 deletions ci_settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<settings
xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">

<servers>
<server>
<id>gitlab</id>
<configuration>
<httpHeaders>
<property>
<name>Job-Token</name>
<value>${CI_JOB_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>

0 comments on commit 955934a

Please sign in to comment.