Skip to content

Commit b853c8b

Browse files
authored
Merge pull request #376 from atlassian-labs/revert-scripts-adoption
Revert workflows and build scripts adoption
2 parents fe375d7 + 23261e4 commit b853c8b

7 files changed

+43
-179
lines changed

.github/workflows/all-tests.yml

+30-28
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,15 @@ jobs:
2424
# check path to bundled Maven executable; it should be then used in ATLAS_MVN
2525
- run: mvn -version
2626

27-
prepare:
28-
name: Prepare Matrix
29-
runs-on: ubuntu-latest
30-
outputs:
31-
unit-tests-matrix: ${{ steps.set-matrix.outputs.unit-tests-matrix }}
32-
jira-it-matrix: ${{ steps.set-matrix.outputs.jira-it-matrix }}
33-
confluence-it-matrix: ${{ steps.set-matrix.outputs.confluence-it-matrix }}
34-
bitbucket-it-matrix: ${{ steps.set-matrix.outputs.bitbucket-it-matrix }}
35-
# TODO: Remove these flags when new major jira (10.x) and bitbucket (9.x) are released
36-
skip-jira-its: ${{ steps.set-matrix.outputs.skip-jira-its }}
37-
skip-bitbucket-its: ${{ steps.set-matrix.outputs.skip-bitbucket-its }}
38-
steps:
39-
- uses: actions/checkout@v4
40-
with:
41-
ref: ${{ github.event.inputs.ref }}
42-
- id: set-matrix
43-
run: bin/build/prepare-matrices.sh
44-
4527
unit-tests:
4628
name: Unit Tests
47-
needs: prepare
4829
runs-on: ubuntu-20.04
4930
# around 800 Mb of dependencies need to be loaded; it may take long first time until it's cached
5031
timeout-minutes: 30
5132
if: "(github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'unit-tests')) && !contains(github.event.head_commit.message, '[skip ci]')"
5233
strategy:
53-
matrix: ${{ fromJSON(needs.prepare.outputs.unit-tests-matrix) }}
34+
matrix:
35+
java-version: [8, 11]
5436
fail-fast: false
5537
steps:
5638
- uses: actions/checkout@v4
@@ -76,10 +58,16 @@ jobs:
7658
name: Jira
7759
runs-on: ubuntu-20.04
7860
timeout-minutes: 30
79-
if: (github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-jira')) && !needs.prepare.outputs.skip-jira-its
80-
needs: [prepare, unit-tests]
61+
if: github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-jira')
62+
needs: unit-tests
8163
strategy:
82-
matrix: ${{ fromJSON(needs.prepare.outputs.jira-it-matrix) }}
64+
matrix:
65+
java-version: [8, 11, 17]
66+
jira-version: [8.15.0, 9.5.0]
67+
# Java 17 support is added only since Jira 9.5: https://confluence.atlassian.com/jiracore/preparing-for-jira-9-5-1167834011.html
68+
exclude:
69+
- java-version: 17
70+
jira-version: 8.15.0
8371
fail-fast: false
8472
steps:
8573
- uses: actions/checkout@v4
@@ -113,9 +101,17 @@ jobs:
113101
runs-on: ubuntu-20.04
114102
timeout-minutes: 30
115103
if: github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-confluence')
116-
needs: [prepare, unit-tests]
104+
needs: unit-tests
117105
strategy:
118-
matrix: ${{ fromJSON(needs.prepare.outputs.confluence-it-matrix) }}
106+
matrix:
107+
# every version part should be 0 <= <version> <= 255; otherwise Confluence fails to start
108+
java-version: [8, 11, 17]
109+
confluence-version: [7.10.0, 8.0.0]
110+
exclude:
111+
- java-version: 8
112+
confluence-version: 8.0.0 # Confluence 8 doesn't support Java 8 anymore
113+
- java-version: 17
114+
confluence-version: 7.10.0
119115
fail-fast: false
120116
steps:
121117
- uses: actions/checkout@v4
@@ -148,10 +144,16 @@ jobs:
148144
name: Bitbucket
149145
runs-on: ubuntu-20.04
150146
timeout-minutes: 30
151-
if: (github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-bitbucket')) && !needs.prepare.outputs.skip-bitbucket-its
152-
needs: [prepare, unit-tests]
147+
if: github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-bitbucket')
148+
needs: unit-tests
153149
strategy:
154-
matrix: ${{ fromJSON(needs.prepare.outputs.bitbucket-it-matrix) }}
150+
matrix:
151+
java-version: [8, 11, 17]
152+
bitbucket-version: [7.6.0, 8.8.0]
153+
# Bitbucket 8.8.0 is the first one that supports Java 17
154+
exclude:
155+
- java-version: 17
156+
bitbucket-version: 7.6.0
155157
fail-fast: false
156158
steps:
157159
- uses: actions/checkout@v4

bin/build/get-plugin-major-version.sh

-30
This file was deleted.

bin/build/java-product-matrix.json

-58
This file was deleted.

bin/build/prepare-matrices.sh

-20
This file was deleted.

bin/release-check/check-release.sh

+11-13
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,19 @@ echo "Determined workflow name: $workflow_name"
4848

4949
# RUN TESTS AGAINST SPECIFIC VERSIONS
5050
workflow_links=()
51-
pl_common_version=$(. ../build/get-plugin-major-version.sh common)
52-
if [ $pl_common_version -eq 1 ]; then
53-
if [ $product_type != "confluence" ]; then
54-
echo "Running workflow with params: workflow-name=$workflow_name java-version=8.0.252 product-version=$product_version"
55-
first_workflow_link=$(start_workflow $workflow_name 8.0.252 $product_version)
56-
echo "Pipeline URL: $first_workflow_link"
57-
workflow_links+=("$first_workflow_link")
58-
fi
59-
60-
echo "Running workflow with params: workflow-name=$workflow_name java-version=11 product-version=$product_version"
61-
second_workflow_link=$(start_workflow $workflow_name 11 $product_version)
62-
echo "Pipeline URL: $second_workflow_link"
63-
workflow_links+=("$second_workflow_link")
51+
# Confluence 8+ does not support Java 8
52+
if [ $product_type != "confluence" ]; then
53+
echo "Running workflow with params: workflow-name=$workflow_name java-version=8.0.252 product-version=$product_version"
54+
first_workflow_link=$(start_workflow $workflow_name 8.0.252 $product_version)
55+
echo "Pipeline URL: $first_workflow_link"
56+
workflow_links+=("$first_workflow_link")
6457
fi
6558

59+
echo "Running workflow with params: workflow-name=$workflow_name java-version=11 product-version=$product_version"
60+
second_workflow_link=$(start_workflow $workflow_name 11 $product_version)
61+
echo "Pipeline URL: $second_workflow_link"
62+
workflow_links+=("$second_workflow_link")
63+
6664
echo "Running workflow with params: workflow-name=$workflow_name java-version=17 product-version=$product_version"
6765
third_workflow_link=$(start_workflow $workflow_name 17 $product_version)
6866
echo "Pipeline URL: $third_workflow_link"

bin/release-check/plugin-product-compat-matrix.json

-14
This file was deleted.

bin/release-check/run-product-release-check.sh

+2-16
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,8 @@ if [ "$latest_releases" = "" ]; then
1212
exit
1313
fi
1414

15-
# TAKE AND CHECKS LATEST COMPATIBLE VERSION ONLY, MEANING THE GREATEST REVISION VERSION
16-
pl_product_version=$(. ../get-plugin-major-version.sh "$PRODUCT")
17-
product_compat_version_regex=$(jq -r --arg pl "$pl_product_version" --arg p "$PRODUCT" '.[$p].[$pl]' ./plugin-product-compat-matrix.json)
18-
latest_version=$(echo "$latest_releases" | grep -oE "$product_compat_version_regex" | tail -1)
19-
20-
if [ "$latest_version" = "" ]; then
21-
echo "Could not find latest versions"
22-
echo "Product [$PRODUCT]"
23-
echo "Compatible version pattern [$product_compat_version_regex]"
24-
exit
25-
fi
26-
27-
echo "========================"
28-
echo "LATEST VERSION"
29-
echo "$latest_version"
30-
echo "========================"
15+
# TAKE AND CHECKS LATEST VERSION ONLY, MEANING THE GREATEST REVISION VERSION
16+
latest_version=$(echo "$latest_releases" | tail -1)
3117

3218
# RUN CHECK FOR LATEST VERSION
3319
PRODUCT_VERSION="$latest_version" . ./check-release.sh

0 commit comments

Comments
 (0)