Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit a98efc8

Browse files
authored
Merge branch 'galasa-dev:main' into codeql
2 parents 20f5a7d + b97be05 commit a98efc8

File tree

79 files changed

+3364
-2059
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+3364
-2059
lines changed

.github/workflows/build.yml

Lines changed: 38 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,36 @@ jobs:
127127
run : |
128128
./test-galasactl-local.sh --buildTool gradle
129129
130-
# Commenting out for now as we cannot reach the prod1 ecosystem from GitHub Actions.
131-
# - name: Chmod ecosystem test script
132-
# run : |
133-
# chmod +x test-galasactl-ecosystem.sh
130+
# Skip testing of Galasa service related commands if the
131+
# GALASA_TOKEN_ECOSYSTEM1 secret is not set as the test
132+
# script will not be able to authenticate to ecosystem1.
133+
- name: Check if secret GALASA_TOKEN_ECOSYSTEM1 exists
134+
continue-on-error: true
135+
env:
136+
GALASA_TOKEN_ECOSYSTEM1: ${{ secrets.GALASA_TOKEN_ECOSYSTEM1 }}
137+
run: |
138+
if [ -z "${GALASA_TOKEN_ECOSYSTEM1}" ] || [ "${GALASA_TOKEN_ECOSYSTEM1}" = "" ]; then
139+
echo "GALASA_TOKEN_ECOSYSTEM1 is not set. Skipping tests where the CLI interacts with the Galasa service."
140+
exit 1
141+
else
142+
echo "GALASA_TOKEN_ECOSYSTEM1 is set. Proceeding with tests where the CLI interacts with the Galasa service."
143+
fi
144+
id: check-galasa-token
145+
146+
- name: Set environment variables
147+
if: ${{ steps.check-galasa-token.outcome == 'success' }}
148+
env:
149+
GALASA_HOME: /home/runner/galasa
150+
GALASA_TOKEN: ${{ secrets.GALASA_TOKEN_ECOSYSTEM1 }}
151+
run : |
152+
echo "GALASA_HOME=${{ env.GALASA_HOME }}" >> $GITHUB_ENV
153+
echo "GALASA_TOKEN=${{ env.GALASA_TOKEN }}" >> $GITHUB_ENV
134154
135-
# - name: Run ecosystem test script
136-
# run : |
137-
# ./test-galasactl-ecosystem.sh --bootstrap https://prod1-galasa-dev.cicsk8s.hursley.ibm.com/api/bootstrap
155+
- name: Run ecosystem test script
156+
if: ${{ steps.check-galasa-token.outcome == 'success' }}
157+
run : |
158+
chmod +x test-galasactl-ecosystem.sh
159+
./test-galasactl-ecosystem.sh --bootstrap https://galasa-ecosystem1.galasa.dev/api/bootstrap
138160
139161
- name: Login to Github Container Registry
140162
uses: docker/login-action@v3
@@ -219,55 +241,26 @@ jobs:
219241
ghcr.io/galasa-dev/argocdcli:main app wait ${{ env.BRANCH }}-cli \
220242
--resource apps:Deployment:cli-${{ env.BRANCH }} --health --server argocd.galasa.dev
221243
222-
build-galasactl-ibm-testing-image-and-trigger-tekton-pipeline:
244+
trigger-next-workflow:
223245
# Skip this job for forks
224246
if: ${{ github.repository_owner == 'galasa-dev' }}
225-
name: Build image containing galasactl, OpenJDK and Gradle for testing
247+
name: Trigger next workflow in the build chain
248+
needs: [log-github-ref, build-cli]
226249
runs-on: ubuntu-latest
227-
needs: build-cli
228250

229251
steps:
230-
- name: Checkout CLI
231-
uses: actions/checkout@v4
232-
233-
- name: Login to Github Container Registry
234-
uses: docker/login-action@v3
252+
- name: Triggering isolated build
235253
env:
236-
WRITE_GITHUB_PACKAGES_USERNAME: ${{ vars.WRITE_GITHUB_PACKAGES_USERNAME }}
237-
WRITE_GITHUB_PACKAGES_TOKEN: ${{ secrets.WRITE_GITHUB_PACKAGES_TOKEN }}
238-
with:
239-
registry: ${{ env.REGISTRY }}
240-
username: ${{ env.WRITE_GITHUB_PACKAGES_USERNAME }}
241-
password: ${{ env.WRITE_GITHUB_PACKAGES_TOKEN }}
242-
243-
- name: Extract metadata for galasactl-ibm-testing image
244-
id: meta
245-
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
246-
with:
247-
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/galasactl-ibm-x86_64-testing
248-
249-
- name: Build galasactl-ibm-testing image
250-
id: build
251-
uses: docker/build-push-action@v5
252-
with:
253-
context: .
254-
file: dockerfiles/dockerfile.galasactl-ibm-testing
255-
push: true
256-
tags: ${{ steps.meta.outputs.tags }}
257-
labels: ${{ steps.meta.outputs.labels }}
258-
build-args: |
259-
branch=${{ env.BRANCH }}
260-
261-
- name: Attempt to trigger test-cli-ecosystem-commands Tekton pipeline
262-
run: |
263-
echo "The Tekton pipeline test-cli-ecosystem-commands should be triggered in the next 2-minutes - check the Tekton dashboard"
254+
GH_TOKEN: ${{ secrets.GALASA_TEAM_GITHUB_TOKEN }}
255+
run: |
256+
gh workflow run build.yaml --repo https://github.com/galasa-dev/isolated --ref ${{ env.BRANCH }}
264257
265258
report-failure:
266259
# Skip this job for forks
267260
if: ${{ failure() && github.repository_owner == 'galasa-dev' }}
268261
name: Report failure in workflow
269262
runs-on: ubuntu-latest
270-
needs: [log-github-ref, build-cli, build-galasactl-ibm-testing-image-and-trigger-tekton-pipeline]
263+
needs: [log-github-ref, build-cli]
271264

272265
steps:
273266
- name: Report failure in workflow to Slack
@@ -276,4 +269,4 @@ jobs:
276269
run : |
277270
docker run --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/galasabld-ibm:main slackpost workflows \
278271
--repo "cli" --workflowName "${{ github.workflow }}" --workflowRunNum "${{ github.run_id }}" \
279-
--ref "${{ env.BRANCH }}" --hook "${{ env.SLACK_WEBHOOK }}"
272+
--ref "${{ env.BRANCH }}" --hook "${{ env.SLACK_WEBHOOK }}"

.github/workflows/pr-build.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,36 @@ jobs:
9898
run : |
9999
./test-galasactl-local.sh --buildTool gradle
100100
101-
# Commenting out for now as we cannot reach the prod1 ecosystem from GitHub Actions.
102-
# - name: Chmod ecosystem test script
103-
# run : |
104-
# chmod +x test-galasactl-ecosystem.sh
105-
106-
# - name: Run ecosystem test script
107-
# run : |
108-
# ./test-galasactl-ecosystem.sh --bootstrap https://prod1-galasa-dev.cicsk8s.hursley.ibm.com/api/bootstrap
101+
# Skip testing of Galasa service related commands if the
102+
# GALASA_TOKEN_ECOSYSTEM1 secret is not set as the test
103+
# script will not be able to authenticate to ecosystem1.
104+
- name: Check if secret GALASA_TOKEN_ECOSYSTEM1 exists
105+
continue-on-error: true
106+
env:
107+
GALASA_TOKEN_ECOSYSTEM1: ${{ secrets.GALASA_TOKEN_ECOSYSTEM1 }}
108+
run: |
109+
if [ -z "${GALASA_TOKEN_ECOSYSTEM1}" ] || [ "${GALASA_TOKEN_ECOSYSTEM1}" = "" ]; then
110+
echo "GALASA_TOKEN_ECOSYSTEM1 is not set. Skipping tests where the CLI interacts with the Galasa service."
111+
exit 1
112+
else
113+
echo "GALASA_TOKEN_ECOSYSTEM1 is set. Proceeding with tests where the CLI interacts with the Galasa service."
114+
fi
115+
id: check-galasa-token
116+
117+
- name: Set environment variables
118+
if: ${{ steps.check-galasa-token.outcome == 'success' }}
119+
env:
120+
GALASA_HOME: /home/runner/galasa
121+
GALASA_TOKEN: ${{ secrets.GALASA_TOKEN_ECOSYSTEM1 }}
122+
run : |
123+
echo "GALASA_HOME=${{ env.GALASA_HOME }}" >> $GITHUB_ENV
124+
echo "GALASA_TOKEN=${{ env.GALASA_TOKEN }}" >> $GITHUB_ENV
125+
126+
- name: Run ecosystem test script
127+
if: ${{ steps.check-galasa-token.outcome == 'success' }}
128+
run : |
129+
chmod +x test-galasactl-ecosystem.sh
130+
./test-galasactl-ecosystem.sh --bootstrap https://galasa-ecosystem1.galasa.dev/api/bootstrap
109131
110132
- name: Build Docker image with galasactl executable
111133
uses: docker/build-push-action@v5

.secrets.baseline

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
"hashed_secret": "c042bdfc4bc5516ec716afe9e85c173b614ff9f5",
122122
"is_secret": false,
123123
"is_verified": false,
124-
"line_number": 829,
124+
"line_number": 830,
125125
"type": "Hex High Entropy String",
126126
"verified_result": null
127127
}

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.40.0
1+
0.41.0

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// dealing with. Do not mess with the `def {variableName}` part of the following
1616
// lines, only change the versions we rely upon.
1717

18-
def galasaVersion = '0.40.0'
18+
def galasaVersion = '0.41.0'
1919

2020
repositories {
2121
gradlePluginPortal()
@@ -28,7 +28,7 @@ repositories {
2828
apply plugin: 'java'
2929
dependencies {
3030
// Use dev.galasa.platform to obtain the versions
31-
implementation platform('dev.galasa:dev.galasa.platform:0.40.0')
31+
implementation platform('dev.galasa:dev.galasa.platform:0.41.0')
3232
// We need the galasa-boot jar so we can launch tests in a local JVM
3333
implementation 'dev.galasa:galasa-boot'
3434
// We need the openapi generator to turn a yaml file into go client stubs,

docs/generated/galasactl_runs_submit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ galasactl runs submit [flags]
2020
-h, --help Displays the options for the 'runs submit' command.
2121
--noexitcodeontestfailures set to true if you don't want an exit code to be returned from galasactl if a test fails
2222
--override strings overrides to be sent with the tests (overrides in the portfolio will take precedence). Each override is of the form 'name=value'. Multiple instances of this flag can be used. For example --override=prop1=val1 --override=prop2=val2
23-
--overridefile string path to a properties file containing override properties. Defaults to overrides.properties in galasa home folder if that file exists. Overrides from --override options will take precedence over properties in this property file. A file path of '-' disables reading any properties file.
23+
--overridefile strings path to a properties file containing override properties. Defaults to overrides.properties in galasa home folder if that file exists. Overrides from --override options will take precedence over properties in this property file. A file path of '-' disables reading any properties file. To use multiple override files, either repeat the overridefile flag for each file, or list the path (absolute or relative) of each override file, separated by commas. For example --overridefile file.properties --overridefile /Users/dummyUser/code/test.properties or --overridefile file.properties,/Users/dummyUser/code/test.properties. The files are processed in the order given. When a property is be defined in multiple files, the last occurrence processed will have its value used.
2424
--package strings packages of which tests will be selected from, packages are selected if the name contains this string, or if --regex is specified then matches the regex
2525
--poll int Optional. The interval time in seconds between successive polls of the test runs status. Defaults to 30 seconds. If less than 1, then default value is used. (default 30)
2626
-p, --portfolio string portfolio containing the tests to run

docs/generated/galasactl_runs_submit_local.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ galasactl runs submit local [flags]
1717
--debug When set (or true) the debugger pauses on startup and tries to connect to a Java debugger. The connection is established using the --debugMode and --debugPort values.
1818
--debugMode string The mode to use when the --debug option causes the testcase to connect to a Java debugger. Valid values are 'listen' or 'attach'. 'listen' means the testcase JVM will pause on startup, waiting for the Java debugger to connect to the debug port (see the --debugPort option). 'attach' means the testcase JVM will pause on startup, trying to attach to a java debugger which is listening on the debug port. The default value is 'listen' but can be overridden by the 'galasactl.jvm.local.launch.debug.mode' property in the bootstrap file, which in turn can be overridden by this explicit parameter on the galasactl command.
1919
--debugPort uint32 The port to use when the --debug option causes the testcase to connect to a java debugger. The default value used is 2970 which can be overridden by the 'galasactl.jvm.local.launch.debug.port' property in the bootstrap file, which in turn can be overridden by this explicit parameter on the galasactl command.
20-
--galasaVersion string the version of galasa you want to use to run your tests. This should match the version of the galasa obr you built your test bundles against. (default "0.40.0")
20+
--galasaVersion string the version of galasa you want to use to run your tests. This should match the version of the galasa obr you built your test bundles against. (default "0.41.0")
2121
--gherkin strings Gherkin feature file URL. Should start with 'file://'.
2222
-h, --help Displays the options for the 'runs submit local' command.
2323
--localMaven string The url of a local maven repository are where galasa bundles can be loaded from on your local file system. Defaults to your home .m2/repository file. Please note that this should be in a URL form e.g. 'file:///Users/myuserid/.m2/repository', or 'file://C:/Users/myuserid/.m2/repository'
@@ -34,7 +34,7 @@ galasactl runs submit local [flags]
3434
-l, --log string File to which log information will be sent. Any folder referred to must exist. An existing file will be overwritten. Specify "-" to log to stderr. Defaults to not logging.
3535
--noexitcodeontestfailures set to true if you don't want an exit code to be returned from galasactl if a test fails
3636
--override strings overrides to be sent with the tests (overrides in the portfolio will take precedence). Each override is of the form 'name=value'. Multiple instances of this flag can be used. For example --override=prop1=val1 --override=prop2=val2
37-
--overridefile string path to a properties file containing override properties. Defaults to overrides.properties in galasa home folder if that file exists. Overrides from --override options will take precedence over properties in this property file. A file path of '-' disables reading any properties file.
37+
--overridefile strings path to a properties file containing override properties. Defaults to overrides.properties in galasa home folder if that file exists. Overrides from --override options will take precedence over properties in this property file. A file path of '-' disables reading any properties file. To use multiple override files, either repeat the overridefile flag for each file, or list the path (absolute or relative) of each override file, separated by commas. For example --overridefile file.properties --overridefile /Users/dummyUser/code/test.properties or --overridefile file.properties,/Users/dummyUser/code/test.properties. The files are processed in the order given. When a property is be defined in multiple files, the last occurrence processed will have its value used.
3838
--poll int Optional. The interval time in seconds between successive polls of the test runs status. Defaults to 30 seconds. If less than 1, then default value is used. (default 30)
3939
--progress int in minutes, how often the cli will report the overall progress of the test runs. A value of 0 or less disables progress reporting. (default 5)
4040
--rate-limit-retries int The maximum number of retries that should be made when requests to the Galasa Service fail due to rate limits being exceeded. Must be a whole number. Defaults to 3 retries (default 3)

0 commit comments

Comments
 (0)