From 739c591b9db9264286c83e29b580d269cbc4576f Mon Sep 17 00:00:00 2001 From: Jade Carino Date: Fri, 30 Aug 2024 13:46:04 +0100 Subject: [PATCH 1/2] Add copyright header Signed-off-by: Jade Carino --- .github/workflows/build.yaml | 5 +++++ .github/workflows/pr-build.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5a36c70..80812d8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,3 +1,8 @@ +# +# Copyright contributors to the Galasa project +# +# SPDX-License-Identifier: EPL-2.0 +# name: Main build on: diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 950ddb0..46a7995 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -1,3 +1,8 @@ +# +# Copyright contributors to the Galasa project +# +# SPDX-License-Identifier: EPL-2.0 +# name: PR build on: From 6c59dcb17e8d032d25edb538512f517cbbc8e2ef Mon Sep 17 00:00:00 2001 From: Jade Carino Date: Fri, 30 Aug 2024 13:52:13 +0100 Subject: [PATCH 2/2] remove argo app param Signed-off-by: Jade Carino --- .github/workflows/build.yaml | 13 ++++++------- .github/workflows/pr-build.yaml | 6 ++++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 80812d8..cad4c9c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,7 +31,6 @@ env: REGISTRY: ghcr.io NAMESPACE: galasa-dev BRANCH: ${{ github.ref_name }} - ARGO_APP_BRANCH: gh # TODO: remove this parameter and just use env.BRANCH once we update development.galasa.dev/main with these workflows. jobs: log-github-ref: @@ -104,8 +103,8 @@ jobs: if: github.event_name == 'push' run: | set -o pipefail - mvn -f galasa-maven-plugin/pom.xml -X deploy \ - -Dgalasa.source.repo=https://development.galasa.dev/${{ env.ARGO_APP_BRANCH }}/maven-repo/gradle \ + mvn -f galasa-maven-plugin/pom.xml deploy -X \ + -Dgalasa.source.repo=https://development.galasa.dev/${{ env.BRANCH }}/maven-repo/gradle \ -Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \ -Dgalasa.release.repo=file:${{ github.workspace }}/repo \ -Dgalasa.jacocoEnabled=true \ @@ -117,8 +116,8 @@ jobs: if: github.event_name == 'workflow_dispatch' # Use the input values provided by the workflow dispatch. run: | set -o pipefail - mvn -f galasa-maven-plugin/pom.xml -X deploy \ - -Dgalasa.source.repo=https://development.galasa.dev/${{ env.ARGO_APP_BRANCH }}/maven-repo/gradle \ + mvn -f galasa-maven-plugin/pom.xml deploy -X \ + -Dgalasa.source.repo=https://development.galasa.dev/${{ env.BRANCH }}/maven-repo/gradle \ -Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \ -Dgalasa.release.repo=file:${{ github.workspace }}/repo \ -Dgalasa.jacocoEnabled=${{ inputs.jacocoEnabled }} \ @@ -174,14 +173,14 @@ jobs: env: ARGOCD_AUTH_TOKEN: ${{ secrets.ARGOCD_TOKEN }} run: | - docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app actions run ${{ env.ARGO_APP_BRANCH }}-maven-repos restart --kind Deployment --resource-name maven-${{ env.ARGO_APP_BRANCH }} --server argocd.galasa.dev + docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app actions run ${{ env.BRANCH }}-maven-repos restart --kind Deployment --resource-name maven-${{ env.BRANCH }} --server argocd.galasa.dev # Wait for the application to show as healthy in ArgoCD - name: Wait for app health in ArgoCD env: ARGOCD_AUTH_TOKEN: ${{ secrets.ARGOCD_TOKEN }} run: | - docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app wait ${{ env.ARGO_APP_BRANCH }}-maven-repos --resource apps:Deployment:maven-${{ env.ARGO_APP_BRANCH }} --health --server argocd.galasa.dev + docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app wait ${{ env.BRANCH }}-maven-repos --resource apps:Deployment:maven-${{ env.BRANCH }} --health --server argocd.galasa.dev trigger-framework-workflow: name: Trigger Framework workflow diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 46a7995..97c50a7 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -33,6 +33,7 @@ jobs: run: | echo $GITHUB_SHA > ./maven.githash + # Copy secrets into files to use in workflow - name: Make secrets directory run : | mkdir /home/runner/work/secrets @@ -74,8 +75,9 @@ jobs: - name: Building Maven source code run: | - mvn -f galasa-maven-plugin/pom.xml -X deploy -Dgpg.skip=true \ - -Dgalasa.source.repo=https://development.galasa.dev/gh/maven-repo/gradle \ + mvn -f galasa-maven-plugin/pom.xml deploy -X \ + -Dgpg.skip=true \ + -Dgalasa.source.repo=https://development.galasa.dev/main/maven-repo/gradle \ -Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \ -Dgalasa.release.repo=file:${{ github.workspace }}/repo \ --batch-mode --errors --fail-at-end \