Skip to content

Commit

Permalink
Fix release-check job and update actions' versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Yevhen Hrytsai committed Jul 27, 2024
1 parent d82d619 commit 15092e4
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 20 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/bitbucket-int-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,34 @@ jobs:
timeout-minutes: 30
steps:
- run: echo 'Github event inputs [${{ toJson(github.event.inputs) }}].'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
# Dec 13, 2022
# latest Bitbucket 8.6.1 doesn't support latest git 2.38.1 installed on the Ubuntu 20 image Github provides
# install last supported git - 2.37.4; remove this trick once Bitbucket implements support for latest git
# https://confluence.atlassian.com/bitbucketserver/supported-platforms-776640981.html#Supportedplatforms-dvcsDVCS
- run: bin/build/install-supported-git.sh
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: ${{ github.event.inputs.java-version }}
distribution: adopt
- run: bin/build/install-plugin-sdk.sh
- run: bin/build/override-plugin-sdk-maven.sh
- run: bin/build/install-int-test-libs.sh
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: maven-unit
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.m2/repository/com/atlassian/bitbucket
key: maven-integration-bitbucket-${{ github.event.inputs.product-version }}
- run: bin/build/install-common-modules.sh
- run: |
VERSION=${{ github.event.inputs.product-version }} \
bin/build/run-bitbucket-its.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: webdriver-screenshots-bitbucket-${{ github.event.inputs.product-version }}-java-${{ github.event.inputs.java-version }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/confluence-int-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,29 @@ jobs:
timeout-minutes: 30
steps:
- run: echo 'Github event inputs [${{ toJson(github.event.inputs) }}].'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: ${{ github.event.inputs.java-version }}
distribution: adopt
- run: bin/build/install-plugin-sdk.sh
- run: bin/build/override-plugin-sdk-maven.sh
- run: bin/build/install-int-test-libs.sh
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: maven-unit
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.m2/repository/com/atlassian/confluence
key: maven-integration-confluence-${{ github.event.inputs.product-version }}
- run: bin/build/install-common-modules.sh
- run: |
VERSION=${{ github.event.inputs.product-version }} \
bin/build/run-confluence-its.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: webdriver-screenshots-confluence-${{ github.event.inputs.product-version }}-java-${{ github.event.inputs.java-version }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/jira-int-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ jobs:
timeout-minutes: 30
steps:
- run: echo 'Github event inputs [${{ toJson(github.event.inputs) }}].'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: ${{ github.event.inputs.java-version }}
distribution: adopt
- run: bin/build/install-plugin-sdk.sh
- run: bin/build/override-plugin-sdk-maven.sh
- run: bin/build/install-int-test-libs.sh
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: maven-unit
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.m2/repository/com/atlassian/jira
key: maven-integration-jira-${{ github.event.inputs.product-version }}
Expand All @@ -46,7 +46,7 @@ jobs:
VERSION=${{ github.event.inputs.product-version }} \
TESTKIT_VERSION=${{ github.event.inputs.testkit-version }} \
bin/build/run-jira-its.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: webdriver-screenshots-jira-${{ github.event.inputs.product-version }}-java-${{ github.event.inputs.java-version }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
echo 'Release version [${{ github.event.inputs.release-version }}].'
echo 'Next development version [${{ github.event.inputs.next-development-version }}].'
- name: Check out the code from selected branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
- name: Configure git for operations performed during the release
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Populate plugin module by selected product
run: bin/build/populate-plugin-by-product.sh ${{ github.event.inputs.product }}
- name: Install JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
Expand All @@ -55,7 +55,7 @@ jobs:
run: bin/build/install-plugin-sdk.sh
- run: bin/build/override-plugin-sdk-maven.sh
- name: Unpack cached Maven dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: maven-release
Expand Down
28 changes: 26 additions & 2 deletions bin/release-check/run-product-release-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,32 @@ if [ "$latest_releases" = "" ]; then
exit
fi

# TAKE AND CHECKS LATEST VERSION ONLY, MEANING THE GREATEST REVISION VERSION
latest_version=$(echo "$latest_releases" | tail -1)
case $PRODUCT in
jira)
version_regex="[0-9]\\.[0-9]+\\.[0-9]+"
;;
confluence|bitbucket)
version_regex="[0-8]\\.[0-9]+\\.[0-9]+"
;;
*)
echo "Invalid product"
exit 1
;;
esac

latest_version=$(echo "$latest_releases" | grep -oE "$version_regex" | tail -1)

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

echo "========================"
echo "LATEST VERSION"
echo "$latest_version"
echo "========================"

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

0 comments on commit 15092e4

Please sign in to comment.