Skip to content

Commit dda857e

Browse files
committed
fix(ci): only run one build when both Quarkus versions are identical
Signed-off-by: Chris Laprun <[email protected]> fix(ci): do not use nohup so that we can kill the operators properly Signed-off-by: Chris Laprun <[email protected]> fix(ci): make sure condition is a boolean Signed-off-by: Chris Laprun <[email protected]> fix(ci): make sure versions are using the same format Signed-off-by: Chris Laprun <[email protected]> fix(ci): improper comparison wrt variable name Signed-off-by: Chris Laprun <[email protected]> wip Signed-off-by: Chris Laprun <[email protected]>
1 parent b918165 commit dda857e

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/build-for-quarkus-version.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ jobs:
219219
exit 1;
220220
fi;
221221
222+
echo "PID: $PID"
223+
222224
# Kill running process
223225
kill -9 $PID
224226
@@ -241,6 +243,8 @@ jobs:
241243
SCRIPTS=$(pwd)/.github/scripts
242244
K8S_NAMESPACE=native
243245
CURRENT_PWD=$(pwd)
246+
247+
ps -aux | grep java
244248
245249
# Create and set namespace
246250
kubectl create namespace $K8S_NAMESPACE

.github/workflows/build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ jobs:
3434
outputs:
3535
branch_name: ${{ steps.extract_branch.outputs.branch }}
3636
qosdk_quarkus_version: ${{ steps.quarkus-version.outputs.quarkus_version }}
37-
latest_stable_quarkus: ${{ steps.get-quarkus-version.outputs.value }}
37+
latest_stable_quarkus: ${{ fromJSON(steps.get-quarkus-version.outputs.value) }}
38+
same_quarkus_versions: ${{ steps.output-versions.outputs.same_quarkus_versions }}
3839
steps:
3940
- name: Extract branch name
4041
shell: bash
@@ -53,10 +54,12 @@ jobs:
5354
cmd: curl https://registry.quarkus.io/client/platforms | jq '.platforms[0]."current-stream-id" as $current | .platforms[0].streams[] | select(.id == $current) | .releases[0].version'
5455

5556
- name: Output retrieved versions
57+
id: output-versions
5658
run: |
57-
echo "Project defined Quarkus version: ${{ steps.quarkus-version.outputs.quarkus_version }}"
58-
echo "Latest platform Quarkus version: ${{ steps.get-quarkus-version.outputs.value }}"
59+
echo "Project defined Quarkus version: '${{ steps.quarkus-version.outputs.quarkus_version }}'"
60+
echo "Latest platform Quarkus version: '${{ fromJSON(steps.get-quarkus-version.outputs.value) }}'"
5961
echo "Different? ${{ needs.extract-project-metadata.outputs.qosdk_quarkus_version != needs.extract-project-metadata.outputs.latest_stable_quarkus }}"
62+
echo "same_quarkus_versions=${{ needs.extract-project-metadata.outputs.qosdk_quarkus_version == needs.extract-project-metadata.outputs.latest_stable_quarkus }}" >> $GITHUB_OUTPUT
6063
6164
build-with-defined-quarkus-version:
6265
needs:
@@ -72,7 +75,7 @@ jobs:
7275
repository: ${{ github.event.pull_request.head.repo.full_name }}
7376

7477
build-with-latest-stable-quarkus-version:
75-
if: ${{ needs.extract-project-metadata.outputs.qosdk_quarkus_version != needs.extract-project-metadata.outputs.latest_stable_quarkus }}
78+
if: ${{ !fromJSON(needs.extract-project-metadata.outputs.same_quarkus_versions) }}
7679
needs:
7780
- extract-project-metadata
7881
strategy:

0 commit comments

Comments
 (0)