Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iss1982 - Add copyright header and remove argo app param #129

Merged
merged 2 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#
# Copyright contributors to the Galasa project
#
# SPDX-License-Identifier: EPL-2.0
#
name: Main build

on:
Expand Down Expand Up @@ -26,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:
Expand Down Expand Up @@ -99,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 \
Expand All @@ -112,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 }} \
Expand Down Expand Up @@ -169,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
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#
# Copyright contributors to the Galasa project
#
# SPDX-License-Identifier: EPL-2.0
#
name: PR build

on:
Expand Down Expand Up @@ -28,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
Expand Down Expand Up @@ -69,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 \
Expand Down