From 7df0fe29a6a07b7406b180ead7c67d852bfb69e6 Mon Sep 17 00:00:00 2001 From: Mladjan Gadzic Date: Mon, 23 Dec 2024 12:00:25 +0100 Subject: [PATCH] fix-ci (#4) * create maven profiles, use ci profile for release, include getting and creating proto files for local profile only --- .github/workflows/ci.yml | 4 +- pom.xml | 266 +++++++++++++++++++++------------------ 2 files changed, 148 insertions(+), 122 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b632666..85965f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: run: | cp settings.xml /home/runner/.m2 cat /home/runner/.m2/settings.xml - mvn clean install -DskipTests + mvn clean install env: MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} @@ -37,7 +37,7 @@ jobs: pwd ls -la /home/runner/.m2 cat /home/runner/.m2/settings.xml - mvn --batch-mode deploy -DskipTests + mvn --batch-mode deploy -DskipTests -Pci env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} diff --git a/pom.xml b/pom.xml index d635097..c0db1a0 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,8 @@ scm:git:git://github.com/armadaproject/java-client.git - scm:git:ssh://github.com:armadaproject/java-client.git + scm:git:ssh://github.com:armadaproject/java-client.git + http://github.com/armadaproject/java-client/tree/main @@ -58,6 +59,150 @@ + + + local + + local + + + true + + + + + + org.codehaus.mojo + exec-maven-plugin + ${exec-maven-plugin.version} + + + clone-armada-repo + generate-sources + + exec + + + git + + clone + https://github.com/armadaproject/armada.git + ${project.build.directory}/armada + + + + + clone-api-repo + generate-sources + + exec + + + git + + clone + https://github.com/kubernetes/api.git + ${project.build.directory}/k8s.io/api + + + + + clone-apimachinery-repo + generate-sources + + exec + + + git + + clone + https://github.com/kubernetes/apimachinery.git + ${project.build.directory}/k8s.io/apimachinery + + + + + + + + + maven-resources-plugin + ${maven-resources-plugin.version} + + + copy-protos + generate-sources + + copy-resources + + + ${project.basedir}/src/main/proto + + + ${project.build.directory}/armada + + pkg/api/*.proto + pkg/api/binoculars/*.proto + + + + ${project.build.directory} + + k8s.io/api/core/v1/generated.proto + k8s.io/api/networking/v1/generated.proto + k8s.io/apimachinery/pkg/api/resource/generated.proto + k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto + k8s.io/apimachinery/pkg/runtime/generated.proto + k8s.io/apimachinery/pkg/runtime/schema/generated.proto + k8s.io/apimachinery/pkg/util/intstr/generated.proto + + + + + + + + + + + + + ci + + ci + + + + + org.sonatype.central + central-publishing-maven-plugin + 0.6.0 + true + + central + true + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.7 + + + sign-artifacts + verify + + sign + + + + + + + + + @@ -74,99 +219,6 @@ - - - org.codehaus.mojo - exec-maven-plugin - ${exec-maven-plugin.version} - - - clone-armada-repo - generate-sources - - exec - - - git - - clone - https://github.com/armadaproject/armada.git - ${project.build.directory}/armada - - - - - clone-api-repo - generate-sources - - exec - - - git - - clone - https://github.com/kubernetes/api.git - ${project.build.directory}/k8s.io/api - - - - - clone-apimachinery-repo - generate-sources - - exec - - - git - - clone - https://github.com/kubernetes/apimachinery.git - ${project.build.directory}/k8s.io/apimachinery - - - - - - - - - maven-resources-plugin - ${maven-resources-plugin.version} - - - copy-protos - generate-sources - - copy-resources - - - ${project.basedir}/src/main/proto - - - ${project.build.directory}/armada - - pkg/api/*.proto - pkg/api/binoculars/*.proto - - - - ${project.build.directory} - - k8s.io/api/core/v1/generated.proto - k8s.io/api/networking/v1/generated.proto - k8s.io/apimachinery/pkg/api/resource/generated.proto - k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto - k8s.io/apimachinery/pkg/runtime/generated.proto - k8s.io/apimachinery/pkg/runtime/schema/generated.proto - k8s.io/apimachinery/pkg/util/intstr/generated.proto - - - - - - - - org.apache.maven.plugins @@ -231,32 +283,6 @@ - - - org.sonatype.central - central-publishing-maven-plugin - 0.6.0 - true - - central - true - - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.2.7 - - - sign-artifacts - verify - - sign - - - -