Skip to content
Closed
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
33 changes: 30 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,42 @@ 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.BRANCH }}-simplatform restart --kind Deployment --resource-name simplatform-${{ env.BRANCH }} --server argocd.galasa.dev

for i in {1..10}; do
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 }}-simplatform restart \
--kind Deployment \
--resource-name \
simplatform-${{ env.BRANCH }} \
--server argocd.galasa.dev \
--grpc-web \
&& exit 0 || sleep 10
done

echo "ArgoCD still uncontactable after 10 attempts."
exit 1

- name: Wait for app health in ArgoCD
# Skip this step for forks
if: ${{ github.repository_owner == 'galasa-dev' }}
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.BRANCH }}-simplatform --resource apps:Deployment:simplatform-${{ env.BRANCH }} --health --server argocd.galasa.dev
for i in {1..10}; do
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 }}-simplatform \
--resource apps:Deployment:simplatform-${{ env.BRANCH }} \
--health \
--server argocd.galasa.dev \
--grpc-web \
&& exit 0 || sleep 10
done

echo "ArgoCD still uncontactable after 10 attempts."
exit 1

run-simbank-tests:
name: Run the SimBank Tests
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
name: Test SimBank

on:
# This workflow_dispatch is used in the release process.
workflow_dispatch:
# This workflow_call is used after the Main Build of Simplatform.
workflow_call:
# This workflow_dispatch allows this workflow to be called by a
# scheduled regression run in the Automation repository. It also
# allows this workflow to be called by pressing 'Run Workflow'.
workflow_dispatch:
schedule:
- cron: "0 6 * * *" # Daily at 06:00

env:
NAMESPACE: ${{ github.repository_owner }}
Expand Down Expand Up @@ -99,9 +99,9 @@ jobs:
name: simplatform
path: ${{ env.HOME }}/.m2/repository

# If this workflow was called by the daily regression test run, build the code.
# If this workflow was called by the daily regression test run or the release, build the code.
- name: Build SimBank using local build script
if: ${{ github.event_name == 'workflow_dispatch' }}
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
run: |
./build-locally.sh --skip-docker --skip-secrets

Expand Down Expand Up @@ -157,15 +157,15 @@ jobs:
# Skip these steps for forks. Only report results if this workflow was
# called from a regression run as Main builds run multiple times a day.
- name: Combine test reports
if: ${{ github.repository_owner == 'galasa-dev' && github.event_name == 'workflow_dispatch' }}
if: ${{ github.repository_owner == 'galasa-dev' && github.event_name == 'schedule' }}
run: |
jq -s '{ tests: map(.tests[]) }' ${{ github.workspace }}/.galasa/test-1.json ${{ github.workspace }}/.galasa/test-2.json ${{ github.workspace }}/.galasa/test-3.json > ${{ github.workspace }}/.galasa/tests.json

# The test report must be sent to Slack in the next job that uses the ubuntu-latest runner.
# We need to run a Docker image to communicate with the Slack webhook and the macos-latest
# runner does not have `docker` installed. Upload the report and download in the next job.
- name: Upload combined test report
if: ${{ github.repository_owner == 'galasa-dev' && github.event_name == 'workflow_dispatch' }}
if: ${{ github.repository_owner == 'galasa-dev' && github.event_name == 'schedule' }}
uses: actions/upload-artifact@v4
with:
name: tests.json
Expand All @@ -177,7 +177,7 @@ jobs:

# Skip this job for forks. Only report results if this workflow was
# called from a regression run as Main builds run multiple times a day.
if: ${{ github.repository_owner == 'galasa-dev' && github.event_name == 'workflow_dispatch' }}
if: ${{ github.repository_owner == 'galasa-dev' && github.event_name == 'schedule' }}

needs: [build-and-run-simbank-tests]

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/dockerfile.simplatform-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WORKDIR /galasa

USER galasa

COPY galasa-simplatform-application/galasa-simplatform-3270/target/galasa-simplatform-0.42.0.jar /galasa/simplatform.jar
COPY galasa-simplatform-application/galasa-simplatform-3270/target/galasa-simplatform-0.43.0.jar /galasa/simplatform.jar

VOLUME /galasa/.galasa
VOLUME /galasa/load
Expand Down
4 changes: 2 additions & 2 deletions galasa-simbank-tests/dev.galasa.simbank.gherkin.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>dev.galasa</groupId>
<artifactId>galasa-simbanktests-parent</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
</parent>

<artifactId>dev.galasa.simbank.gherkin.tests</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<packaging>galasa-gherkin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>dev.galasa</groupId>
<artifactId>galasa-bom</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions galasa-simbank-tests/dev.galasa.simbank.manager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<parent>
<groupId>dev.galasa</groupId>
<artifactId>galasa-simbanktests-parent</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
</parent>

<name>Galasa SimBank Manager</name>

<artifactId>dev.galasa.simbank.manager</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<!-- If updating version, reflect in dev.galasa.simbank.feature, dev.galasa.simbank.tests and dev.galasa.simbank.obr -->
<packaging>bundle</packaging>

Expand Down
8 changes: 4 additions & 4 deletions galasa-simbank-tests/dev.galasa.simbank.obr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>dev.galasa</groupId>
<artifactId>galasa-simbanktests-parent</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
</parent>

<name>Galasa SimBank OBR</name>

<artifactId>dev.galasa.simbank.obr</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<!-- If updating version, reflect change in build/docker/testcatalogs/pom.xml -->
<packaging>galasa-obr</packaging>

Expand All @@ -25,13 +25,13 @@
<dependency>
<groupId>dev.galasa</groupId>
<artifactId>dev.galasa.simbank.tests</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>dev.galasa</groupId>
<artifactId>dev.galasa.simbank.manager</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>dev.galasa</groupId>
<artifactId>galasa-bom</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions galasa-simbank-tests/dev.galasa.simbank.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<parent>
<groupId>dev.galasa</groupId>
<artifactId>galasa-simbanktests-parent</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
</parent>

<name>Galasa SimBank Example Tests</name>

<artifactId>dev.galasa.simbank.tests</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<!-- If updating version, reflect in dev.galasa.simbank.feature and dev.galasa.simbank.obr -->
<packaging>bundle</packaging>

<dependencies>
<dependency>
<groupId>dev.galasa</groupId>
<artifactId>dev.galasa.simbank.manager</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
6 changes: 3 additions & 3 deletions galasa-simbank-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>dev.galasa</groupId>
<artifactId>galasa-simbanktests-parent</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<!-- If updating version, reflect change in dev.galasa.simbank.ui -->
<packaging>pom</packaging>

Expand Down Expand Up @@ -77,7 +77,7 @@
<dependency>
<groupId>dev.galasa</groupId>
<artifactId>galasa-bom</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -191,7 +191,7 @@
<plugin>
<groupId>dev.galasa</groupId>
<artifactId>galasa-maven-plugin</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
</plugin>
<plugin>
<groupId>org.eclipse.m2e</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WORKDIR /galasa

USER galasa

COPY target/galasa-simplatform-0.42.0.jar /galasa/simplatform.jar
COPY target/galasa-simplatform-0.43.0.jar /galasa/simplatform.jar

VOLUME /galasa/.galasa
VOLUME /galasa/load
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<parent>
<groupId>dev.galasa</groupId>
<artifactId>galasa-simplatform-parent</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
</parent>

<groupId>dev.galasa</groupId>
<artifactId>galasa-simplatform</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>dev.galasa</groupId>
<artifactId>galasa-simplatform-parent</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
</parent>

<groupId>dev.galasa</groupId>
<artifactId>galasa-simplatform-webapp</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<packaging>war</packaging>

<name>galasa-simplatform-webapp Maven Webapp</name>
Expand Down
4 changes: 2 additions & 2 deletions galasa-simplatform-application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>dev.galasa</groupId>
<artifactId>galasa-simplatform-parent</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<packaging>pom</packaging>

<name>Galasa SimPlatform</name>
Expand Down Expand Up @@ -85,7 +85,7 @@
<dependency>
<groupId>dev.galasa</groupId>
<artifactId>galasa-bom</artifactId>
<version>0.42.0</version>
<version>0.43.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion run-locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ fi
# Main logic.
#-----------------------------------------------------------------------------------------

SIMBANK_VERSION="0.42.0"
SIMBANK_VERSION="0.43.0"

function run_server {
h1 "Running Simbank back-end server application (version ${SIMBANK_VERSION}) ..."
Expand Down
4 changes: 2 additions & 2 deletions test-locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function runProvisionedAccountCreditTests {
source_dir="."

project=$(basename ${BASEDIR})
SIMBANK_VERSION="0.42.0"
SIMBANK_VERSION="0.43.0"

checkGalasaCtlAvailable
checkSimBankTestAreBuilt
Expand All @@ -197,7 +197,7 @@ java -jar ~/.m2/repository/dev/galasa/galasa-simplatform/${SIMBANK_VERSION}/gala

success "Simbank application started OK."

TEST_OBR_VERSION="0.42.0"
TEST_OBR_VERSION="0.43.0"

h1 "Running Simbank tests"

Expand Down