From fcc44b92506a549fb35afdcc42ffdd3df49dc678 Mon Sep 17 00:00:00 2001 From: Alexey Vinogradov Date: Fri, 30 Sep 2022 16:32:23 +0700 Subject: [PATCH] feat: multiplatform docker image via JIB --- .github/workflows/deploy.yml | 2 +- Jenkinsfile | 2 +- app/pom.xml | 88 ++++++++++++++++++++++++------------ pom.xml | 17 +++++++ 4 files changed, 79 insertions(+), 30 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2142499e..4003bed5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -36,7 +36,7 @@ jobs: uses: camunda-community-hub/community-action-maven-release@a9e964bf56978eef9bca81551cecceebb246a8e5 # pin@v1 with: release-version: ${{ github.event.release.tag_name }} - release-profile: community-action-maven-release + release-profile: community-action-maven-release,-jib-local,jib-multiplatform nexus-usr: ${{ secrets.NEXUS_USR }} nexus-psw: ${{ secrets.NEXUS_PSW }} maven-usr: ${{ secrets.MAVEN_CENTRAL_DEPLOYMENT_USR }} diff --git a/Jenkinsfile b/Jenkinsfile index c39e13ae..519b087c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -102,7 +102,7 @@ pipeline { container('maven') { configFileProvider([configFile(fileId: 'maven-nexus-settings-zeebe', variable: 'MAVEN_SETTINGS_XML')]) { sshagent(['camunda-jenkins-github-ssh']) { - sh 'mvn -pl app jib:build -Djib.to.tags=latest,${RELEASE_VERSION} -Djib.to.auth.username=${DOCKER_HUB_USR} -Djib.to.auth.password=${DOCKER_HUB_PSW}' + sh 'mvn -pl app jib:build -Djib.to.tags=latest,${RELEASE_VERSION} -Djib.to.auth.username=${DOCKER_HUB_USR} -Djib.to.auth.password=${DOCKER_HUB_PSW} -P-jib-local,jib-multiplatform' } } } diff --git a/app/pom.xml b/app/pom.xml index a67c8709..66c1f8a2 100644 --- a/app/pom.xml +++ b/app/pom.xml @@ -52,33 +52,6 @@ zeeqs-${project.version} - - com.google.cloud.tools - jib-maven-plugin - 3.3.0 - - - deploy - - build - - - - build-local - verify - - dockerBuild - - - - - - ghcr.io/camunda-community-hub/zeeqs - ${project.version} - - - - org.springframework.boot spring-boot-maven-plugin @@ -90,9 +63,68 @@ - + + + jib-local + + true + + + + + com.google.cloud.tools + jib-maven-plugin + + + build-local + verify + + dockerBuild + + + + + + + + + + jib-multiplatform + + + + com.google.cloud.tools + jib-maven-plugin + + + deploy + + build + + + + + + + + amd64 + linux + + + arm64 + linux + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 15f8d00f..756d4350 100644 --- a/pom.xml +++ b/pom.xml @@ -52,6 +52,7 @@ -Xdoclint:none + 3.3.0 @@ -300,6 +301,22 @@ + + + + + com.google.cloud.tools + jib-maven-plugin + ${jib-maven-plugin.version} + + + ghcr.io/camunda-community-hub/zeeqs + ${project.version} + + + + +