Skip to content

Commit

Permalink
Revert workflows and build scripts adoption
Browse files Browse the repository at this point in the history
  • Loading branch information
Yevhen Hrytsai committed Jun 29, 2024
1 parent fe375d7 commit 23261e4
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 179 deletions.
58 changes: 30 additions & 28 deletions .github/workflows/all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,15 @@ jobs:
# check path to bundled Maven executable; it should be then used in ATLAS_MVN
- run: mvn -version

prepare:
name: Prepare Matrix
runs-on: ubuntu-latest
outputs:
unit-tests-matrix: ${{ steps.set-matrix.outputs.unit-tests-matrix }}
jira-it-matrix: ${{ steps.set-matrix.outputs.jira-it-matrix }}
confluence-it-matrix: ${{ steps.set-matrix.outputs.confluence-it-matrix }}
bitbucket-it-matrix: ${{ steps.set-matrix.outputs.bitbucket-it-matrix }}
# TODO: Remove these flags when new major jira (10.x) and bitbucket (9.x) are released
skip-jira-its: ${{ steps.set-matrix.outputs.skip-jira-its }}
skip-bitbucket-its: ${{ steps.set-matrix.outputs.skip-bitbucket-its }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
- id: set-matrix
run: bin/build/prepare-matrices.sh

unit-tests:
name: Unit Tests
needs: prepare
runs-on: ubuntu-20.04
# around 800 Mb of dependencies need to be loaded; it may take long first time until it's cached
timeout-minutes: 30
if: "(github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'unit-tests')) && !contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.unit-tests-matrix) }}
matrix:
java-version: [8, 11]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -76,10 +58,16 @@ jobs:
name: Jira
runs-on: ubuntu-20.04
timeout-minutes: 30
if: (github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-jira')) && !needs.prepare.outputs.skip-jira-its
needs: [prepare, unit-tests]
if: github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-jira')
needs: unit-tests
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.jira-it-matrix) }}
matrix:
java-version: [8, 11, 17]
jira-version: [8.15.0, 9.5.0]
# Java 17 support is added only since Jira 9.5: https://confluence.atlassian.com/jiracore/preparing-for-jira-9-5-1167834011.html
exclude:
- java-version: 17
jira-version: 8.15.0
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -113,9 +101,17 @@ jobs:
runs-on: ubuntu-20.04
timeout-minutes: 30
if: github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-confluence')
needs: [prepare, unit-tests]
needs: unit-tests
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.confluence-it-matrix) }}
matrix:
# every version part should be 0 <= <version> <= 255; otherwise Confluence fails to start
java-version: [8, 11, 17]
confluence-version: [7.10.0, 8.0.0]
exclude:
- java-version: 8
confluence-version: 8.0.0 # Confluence 8 doesn't support Java 8 anymore
- java-version: 17
confluence-version: 7.10.0
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -148,10 +144,16 @@ jobs:
name: Bitbucket
runs-on: ubuntu-20.04
timeout-minutes: 30
if: (github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-bitbucket')) && !needs.prepare.outputs.skip-bitbucket-its
needs: [prepare, unit-tests]
if: github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-bitbucket')
needs: unit-tests
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.bitbucket-it-matrix) }}
matrix:
java-version: [8, 11, 17]
bitbucket-version: [7.6.0, 8.8.0]
# Bitbucket 8.8.0 is the first one that supports Java 17
exclude:
- java-version: 17
bitbucket-version: 7.6.0
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
30 changes: 0 additions & 30 deletions bin/build/get-plugin-major-version.sh

This file was deleted.

58 changes: 0 additions & 58 deletions bin/build/java-product-matrix.json

This file was deleted.

20 changes: 0 additions & 20 deletions bin/build/prepare-matrices.sh

This file was deleted.

24 changes: 11 additions & 13 deletions bin/release-check/check-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,19 @@ echo "Determined workflow name: $workflow_name"

# RUN TESTS AGAINST SPECIFIC VERSIONS
workflow_links=()
pl_common_version=$(. ../build/get-plugin-major-version.sh common)
if [ $pl_common_version -eq 1 ]; then
if [ $product_type != "confluence" ]; then
echo "Running workflow with params: workflow-name=$workflow_name java-version=8.0.252 product-version=$product_version"
first_workflow_link=$(start_workflow $workflow_name 8.0.252 $product_version)
echo "Pipeline URL: $first_workflow_link"
workflow_links+=("$first_workflow_link")
fi

echo "Running workflow with params: workflow-name=$workflow_name java-version=11 product-version=$product_version"
second_workflow_link=$(start_workflow $workflow_name 11 $product_version)
echo "Pipeline URL: $second_workflow_link"
workflow_links+=("$second_workflow_link")
# Confluence 8+ does not support Java 8
if [ $product_type != "confluence" ]; then
echo "Running workflow with params: workflow-name=$workflow_name java-version=8.0.252 product-version=$product_version"
first_workflow_link=$(start_workflow $workflow_name 8.0.252 $product_version)
echo "Pipeline URL: $first_workflow_link"
workflow_links+=("$first_workflow_link")
fi

echo "Running workflow with params: workflow-name=$workflow_name java-version=11 product-version=$product_version"
second_workflow_link=$(start_workflow $workflow_name 11 $product_version)
echo "Pipeline URL: $second_workflow_link"
workflow_links+=("$second_workflow_link")

echo "Running workflow with params: workflow-name=$workflow_name java-version=17 product-version=$product_version"
third_workflow_link=$(start_workflow $workflow_name 17 $product_version)
echo "Pipeline URL: $third_workflow_link"
Expand Down
14 changes: 0 additions & 14 deletions bin/release-check/plugin-product-compat-matrix.json

This file was deleted.

18 changes: 2 additions & 16 deletions bin/release-check/run-product-release-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,8 @@ if [ "$latest_releases" = "" ]; then
exit
fi

# TAKE AND CHECKS LATEST COMPATIBLE VERSION ONLY, MEANING THE GREATEST REVISION VERSION
pl_product_version=$(. ../get-plugin-major-version.sh "$PRODUCT")
product_compat_version_regex=$(jq -r --arg pl "$pl_product_version" --arg p "$PRODUCT" '.[$p].[$pl]' ./plugin-product-compat-matrix.json)
latest_version=$(echo "$latest_releases" | grep -oE "$product_compat_version_regex" | tail -1)

if [ "$latest_version" = "" ]; then
echo "Could not find latest versions"
echo "Product [$PRODUCT]"
echo "Compatible version pattern [$product_compat_version_regex]"
exit
fi

echo "========================"
echo "LATEST VERSION"
echo "$latest_version"
echo "========================"
# TAKE AND CHECKS LATEST VERSION ONLY, MEANING THE GREATEST REVISION VERSION
latest_version=$(echo "$latest_releases" | tail -1)

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

0 comments on commit 23261e4

Please sign in to comment.