- Selenium 4.20.0 #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release-java11 | |
on: | |
push: | |
branches: | |
- 'main' | |
paths-ignore: | |
- '.github/dependabot.yml' | |
- '.gitlab-ci.yml' | |
- '*.md' | |
jobs: | |
maven-release: | |
runs-on: ubuntu-22.04 | |
outputs: | |
version: ${{ steps.get-version.outputs.version }} | |
fitnesse-version: ${{ steps.get-version.outputs.fitnesse-version }} | |
selenium-version: ${{ steps.get-version.outputs.selenium-version }} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Install Java and Maven | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Unsnapshot version | |
run: mvn versions:set -DremoveSnapshot | |
- id: get-version | |
run: | | |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
FITNESSE_VERSION=$(mvn help:evaluate -Dexpression=fitnesse.version -q -DforceStdout) | |
echo "fitnesse-version=$FITNESSE_VERSION" >> $GITHUB_OUTPUT | |
SELENIUM_VERSION=$(mvn help:evaluate -Dexpression=selenium.version -q -DforceStdout) | |
echo "selenium-version=$SELENIUM_VERSION" >> $GITHUB_OUTPUT | |
- name: upload release pom | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pom | |
path: pom.xml | |
if-no-files-found: error | |
- name: Set up Apache Maven Central | |
uses: actions/setup-java@v4 | |
with: # running setup-java again overwrites the settings.xml | |
java-version: '11' | |
distribution: 'zulu' | |
cache: 'maven' | |
server-id: ossrh | |
server-username: MAVEN_USERNAME # env variable for username in deploy | |
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy | |
gpg-private-key: ${{ secrets.gpg_private_key }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase | |
- name: Publish to Apache Maven Central | |
run: mvn clean deploy -P release | |
env: | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.gpg_passphrase }} | |
- name: upload packages | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: target | |
path: | | |
target/hsac-fitnesse-fixtures-*.jar | |
target/hsac-fitnesse-fixtures-*.zip | |
github-release: | |
needs: [maven-release] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: download pom | |
uses: actions/download-artifact@v4 | |
with: | |
name: pom | |
- name: download packages | |
uses: actions/download-artifact@v4 | |
with: | |
name: target | |
path: target | |
- name: Replace changelog placeholders | |
uses: franzbischoff/replace_envs@v2 | |
env: | |
VERSION: ${{ needs.maven-release.outputs.version }} | |
FITNESSE_VERSION: ${{ needs.maven-release.outputs.fitnesse-version }} | |
SELENIUM_VERSION: ${{ needs.maven-release.outputs.selenium-version }} | |
with: | |
from_file: './changelog.md' | |
to_file: './changelog.md' | |
commit: 'false' | |
- name: Configure git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
- name: Commit pom.xml without -SNAPSHOT | |
run: | | |
git add pom.xml | |
git commit -m "Prepare for release" | |
git push origin main | |
- name: Create Release | |
id: createRelease | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ needs.maven-release.outputs.version }} | |
body_path: './changelog.md' | |
draft: false | |
prerelease: false | |
files: | | |
target/hsac-fitnesse-fixtures-*.jar | |
target/hsac-fitnesse-fixtures-*.zip | |
generate-docker-content: | |
needs: [maven-release] | |
runs-on: ubuntu-22.04 | |
outputs: | |
version: ${{ needs.maven-release.outputs.version }} | |
fitnesse-version: ${{ needs.maven-release.outputs.fitnesse-version }} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Install Java and Maven | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'zulu' | |
cache: maven | |
- name: Create docker content | |
run: | | |
cd docker | |
mvn --batch-mode clean package -Dfitnesse.version=${{ needs.maven-release.outputs.fitnesse-version }} -Dhsac.fixtures.version=${{ needs.maven-release.outputs.version }} | |
- name: Upload docker image content | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docker-content | |
path: | | |
docker/test/wiki | |
docker/combine/target | |
- name: Create with-pdf docker content | |
run: | | |
cd docker | |
mvn --batch-mode -P withPdf package -DskipCombineShade=true -Dfitnesse.version=${{ needs.maven-release.outputs.fitnesse-version }} -Dhsac.fixtures.version=${{ needs.maven-release.outputs.version }} | |
- name: Upload with-pdf docker image content | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docker-content-with-pdf | |
path: | | |
docker/test/wiki | |
build-docker-images: | |
needs: [generate-docker-content] | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: true | |
matrix: | |
platform: [linux/amd64, linux/arm64] | |
include: | |
- platform: linux/amd64 | |
arch: amd64 | |
- platform: linux/arm64 | |
arch: arm64 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
hsac/fitnesse-fixtures-test-jre11 | |
hsac/fitnesse-fixtures-combine | |
hsac/fitnesse-fixtures-test-jre11-chrome | |
hsac/fitnesse-fixtures-test-jre11-with-pdf | |
hsac/fitnesse-fixtures-test-jre11-chrome-with-pdf | |
tags: | | |
type=ref,event=branch | |
type=raw,value=${{ needs.generate-docker-content.outputs.version }} | |
# set latest tag for default branch | |
type=raw,value=latest,enable={{is_default_branch}} | |
- name: Rename meta bake definition file | |
run: | | |
mv "${{ steps.meta.outputs.bake-file }}" "/tmp/bake-meta.json" | |
- name: Upload meta bake definition | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bake-meta-${{ matrix.arch }} | |
path: /tmp/bake-meta.json | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: download docker content | |
uses: actions/download-artifact@v4 | |
with: | |
name: docker-content | |
path: docker | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build | |
id: bake | |
uses: docker/bake-action@v4 | |
with: | |
workdir: docker | |
files: | | |
docker-bake.hcl | |
/tmp/bake-meta.json | |
targets: | | |
test | |
chrome | |
combine | |
set: | | |
*.tags= | |
*.platform=${{ matrix.platform }} | |
*.contexts.base=. | |
*.args.BASE_WORKDIR=. | |
test.output=type=image,"name=hsac/fitnesse-fixtures-test-jre11",push-by-digest=true,name-canonical=true,push=true | |
combine.output=type=image,"name=hsac/fitnesse-fixtures-combine",push-by-digest=true,name-canonical=true,push=true | |
chrome.output=type=image,"name=hsac/fitnesse-fixtures-test-jre11-chrome",push-by-digest=true,name-canonical=true,push=true | |
- name: Export digests | |
id: digests | |
run: | | |
mkdir -p /tmp/images/${{ matrix.platform }} | |
mkdir -p /tmp/digests/test | |
test_digest="${{ fromJSON(steps.bake.outputs.metadata)['test']['containerimage.digest'] }}" | |
touch "/tmp/digests/test/${test_digest#sha256:}" | |
echo "hsac/fitnesse-fixtures-test-jre11@${test_digest}" > /tmp/images/${{ matrix.platform }}/test | |
echo "test-image=hsac/fitnesse-fixtures-test-jre11@${test_digest}" >> $GITHUB_OUTPUT | |
mkdir -p /tmp/digests/combine | |
combine_digest="${{ fromJSON(steps.bake.outputs.metadata)['combine']['containerimage.digest'] }}" | |
touch "/tmp/digests/combine/${combine_digest#sha256:}" | |
echo "hsac/fitnesse-fixtures-combine@${combine_digest}" > /tmp/images/${{ matrix.platform }}/combine | |
echo "combine-image=hsac/fitnesse-fixtures-combine@${combine_digest}" >> $GITHUB_OUTPUT | |
mkdir -p /tmp/digests/chrome | |
chrome_digest="${{ fromJSON(steps.bake.outputs.metadata)['chrome']['containerimage.digest'] }}" | |
touch "/tmp/digests/chrome/${chrome_digest#sha256:}" | |
echo "hsac/fitnesse-fixtures-test-jre11-chrome@${chrome_digest}" > /tmp/images/${{ matrix.platform }}/chrome | |
echo "chrome-image=hsac/fitnesse-fixtures-test-jre11-chrome@${chrome_digest}" >> $GITHUB_OUTPUT | |
- name: Upload digest | |
uses: actions/upload-artifact@v4 | |
with: | |
name: digests-${{ matrix.arch }} | |
path: /tmp/digests/* | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Upload image names | |
uses: actions/upload-artifact@v4 | |
with: | |
name: images-${{ matrix.arch }} | |
path: /tmp/images/* | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Test test image | |
if: matrix.platform == 'linux/amd64' | |
run: | | |
cd docker | |
mkdir -p target/failsafe-reports | |
mkdir -p target/fitnesse-results/test | |
mkdir -p target/fitnesse-results/test-rerun | |
docker run --rm \ | |
-v "$(pwd)"/target/failsafe-reports:/fitnesse/target/failsafe-reports \ | |
-v "$(pwd)"/target/fitnesse-results/test:/fitnesse/target/fitnesse-results \ | |
-v "$(pwd)"/target/fitnesse-results/test-rerun:/fitnesse/target/fitnesse-rerun-results \ | |
-v "$(pwd)"/src/test/wiki:/fitnesse/wiki/FitNesseRoot \ | |
-e RE_RUN_FAILED=true \ | |
${{ steps.digests.outputs.test-image }} \ | |
-DfitnesseSuiteToRun=SampleTests.SlimTests.UtilityFixtures | |
- name: Test chrome image | |
if: matrix.platform == 'linux/amd64' | |
run: | | |
cd docker | |
mkdir -p target/failsafe-reports | |
mkdir -p target/fitnesse-results/chrome | |
mkdir -p target/fitnesse-results/chrome-rerun | |
mkdir -p target/selenium-log | |
docker run --rm \ | |
-v "$(pwd)"/target/failsafe-reports:/fitnesse/target/failsafe-reports \ | |
-v "$(pwd)"/target/fitnesse-results/chrome:/fitnesse/target/fitnesse-results \ | |
-v "$(pwd)"/target/fitnesse-results/chrome-rerun:/fitnesse/target/fitnesse-rerun-results \ | |
-v "$(pwd)"/target/selenium-log:/fitnesse/target/selenium-log \ | |
-v "$(pwd)"/src/test/wiki:/fitnesse/wiki/FitNesseRoot \ | |
-e CHANGE_FITNESSE_DIRECTOY_OWNER=true \ | |
-e RE_RUN_FAILED=true \ | |
${{ steps.digests.outputs.chrome-image }} \ | |
-DfitnesseSuiteToRun=SampleTests.SlimTests.BrowserTest | |
- name: Test combine image | |
if: matrix.platform == 'linux/amd64' | |
run: | | |
cd docker | |
docker run --rm \ | |
-v "$(pwd)"/target/fitnesse-results:/fitnesse/target/fitnesse-results \ | |
${{ steps.digests.outputs.combine-image }} | |
- name: Upload test artifacts | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docker-tests-results-${{ matrix.arch }} | |
path: docker/target | |
build-docker-images-with-pdf: | |
needs: [build-docker-images] | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: true | |
matrix: | |
platform: [linux/amd64, linux/arm64] | |
include: | |
- platform: linux/amd64 | |
arch: amd64 | |
- platform: linux/arm64 | |
arch: arm64 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
hsac/fitnesse-fixtures-test-jre11-with-pdf | |
hsac/fitnesse-fixtures-test-jre11-chrome-with-pdf | |
- name: Rename meta bake definition file | |
run: | | |
mv "${{ steps.meta.outputs.bake-file }}" "/tmp/bake-meta.json" | |
- name: Upload meta bake definition | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bake-meta-${{ matrix.arch }}-with-pdf | |
path: /tmp/bake-meta.json | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Download image names | |
uses: actions/download-artifact@v4 | |
with: | |
name: images-${{ matrix.arch }} | |
path: /tmp/images | |
- id: image-names | |
run: | | |
TEST_IMAGE=$(cat /tmp/images/${{ matrix.platform }}/test) | |
echo "test-image=$TEST_IMAGE" >> $GITHUB_OUTPUT | |
CHROME_IMAGE=$(cat /tmp/images/${{ matrix.platform }}/chrome) | |
echo "chrome-image=$CHROME_IMAGE" >> $GITHUB_OUTPUT | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: download docker content | |
uses: actions/download-artifact@v4 | |
with: | |
name: docker-content-with-pdf | |
path: docker/test/wiki | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build | |
id: bake | |
uses: docker/bake-action@v4 | |
with: | |
workdir: docker | |
files: | | |
docker-bake.hcl | |
/tmp/bake-meta.json | |
targets: | | |
test-with-pdf | |
chrome-with-pdf | |
set: | | |
*.tags= | |
*.platform=${{ matrix.platform }} | |
*.contexts.base-with-pdf=. | |
*.contexts.hsac-fixtures=docker-image://${{ steps.image-names.outputs.test-image }} | |
*.contexts.hsac-chrome=docker-image://${{ steps.image-names.outputs.chrome-image }} | |
*.args.BASE_WORKDIR=. | |
test-with-pdf.output=type=image,"name=hsac/fitnesse-fixtures-test-jre11-with-pdf",push-by-digest=true,name-canonical=true,push=true | |
chrome-with-pdf.output=type=image,"name=hsac/fitnesse-fixtures-test-jre11-chrome-with-pdf",push-by-digest=true,name-canonical=true,push=true | |
- name: Export digests | |
id: digests | |
run: | | |
mkdir -p /tmp/images/${{ matrix.platform }} | |
mkdir -p /tmp/digests/test-with-pdf | |
test_with_pdf_digest="${{ fromJSON(steps.bake.outputs.metadata)['test-with-pdf']['containerimage.digest'] }}" | |
touch "/tmp/digests/test-with-pdf/${test_with_pdf_digest#sha256:}" | |
echo "hsac/fitnesse-fixtures-test-jre11-with-pdf@${test_with_pdf_digest}" >> /tmp/images/${{ matrix.platform }}/test-with-pdf | |
echo "test-with-pdf-image=hsac/fitnesse-fixtures-test-jre11-with-pdf@${test_with_pdf_digest}" >> $GITHUB_OUTPUT | |
mkdir -p /tmp/digests/chrome-with-pdf | |
chrome_with_pdf_digest="${{ fromJSON(steps.bake.outputs.metadata)['chrome-with-pdf']['containerimage.digest'] }}" | |
touch "/tmp/digests/chrome-with-pdf/${chrome_with_pdf_digest#sha256:}" | |
echo "hsac/fitnesse-fixtures-test-jre11-chrome-with-pdf@${chrome_with_pdf_digest}" >> /tmp/images/${{ matrix.platform }}/chrome-with-pdf | |
echo "chrome-with-pdf-image=hsac/fitnesse-fixtures-test-jre11-chrome-with-pdf@${chrome_with_pdf_digest}" >> $GITHUB_OUTPUT | |
- name: Upload digest | |
uses: actions/upload-artifact@v4 | |
with: | |
name: digests-${{ matrix.arch }}-with-pdf | |
path: /tmp/digests/* | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Upload image names | |
uses: actions/upload-artifact@v4 | |
with: | |
name: images-${{ matrix.arch }}-with-pdf | |
path: /tmp/images/* | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Test pdf image | |
if: matrix.platform == 'linux/amd64' | |
run: | | |
cd docker | |
mkdir -p target/failsafe-reports | |
mkdir -p target/fitnesse-results/test-with-pdf | |
mkdir -p target/fitnesse-results/test-with-pdf-rerun | |
docker run --rm \ | |
-v "$(pwd)"/target/failsafe-reports:/fitnesse/target/failsafe-reports \ | |
-v "$(pwd)"/target/fitnesse-results/test-with-pdf:/fitnesse/target/fitnesse-results \ | |
-v "$(pwd)"/target/fitnesse-results/test-with-pdf-rerun:/fitnesse/target/fitnesse-rerun-results \ | |
-v "$(pwd)"/src/test/wiki:/fitnesse/wiki/FitNesseRoot \ | |
-e RE_RUN_FAILED=true \ | |
${{ steps.digests.outputs.test-with-pdf-image }} \ | |
-DfitnesseSuiteToRun=SampleTests.SlimTests.PdfTest | |
- name: Upload test artifacts | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docker-tests-results-${{ matrix.arch }}-with-pdf | |
path: docker/target | |
merge-docker-images: | |
needs: [build-docker-images, build-docker-images-with-pdf] | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [test, combine, chrome, test-with-pdf, chrome-with-pdf] | |
include: | |
- target: test | |
image: hsac/fitnesse-fixtures-test-jre11 | |
- target: combine | |
image: hsac/fitnesse-fixtures-combine | |
- target: chrome | |
image: hsac/fitnesse-fixtures-test-jre11-chrome | |
- target: test-with-pdf | |
image: hsac/fitnesse-fixtures-test-jre11-with-pdf | |
- target: chrome-with-pdf | |
image: hsac/fitnesse-fixtures-test-jre11-chrome-with-pdf | |
steps: | |
- name: Download meta bake definition | |
uses: actions/download-artifact@v4 | |
with: | |
name: bake-meta-amd64 | |
path: /tmp | |
- name: Download amd64 digests | |
uses: actions/download-artifact@v4 | |
with: | |
name: digests-amd64 | |
path: /tmp/digests | |
- name: Download arm64 digests | |
uses: actions/download-artifact@v4 | |
with: | |
name: digests-arm64 | |
path: /tmp/digests | |
- name: Download digests amd64 with pdf | |
uses: actions/download-artifact@v4 | |
with: | |
name: digests-amd64-with-pdf | |
path: /tmp/digests | |
- name: Download digests arm64 with pdf | |
uses: actions/download-artifact@v4 | |
with: | |
name: digests-arm64-with-pdf | |
path: /tmp/digests | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create manifest list and push | |
working-directory: /tmp/digests/${{ matrix.target }} | |
run: | | |
docker buildx imagetools create $(jq -cr '.target."docker-metadata-action".tags | map(select(startswith("${{ matrix.image }}:")) | "-t " + .) | join(" ")' /tmp/bake-meta.json) \ | |
$(printf '${{ matrix.image }}@sha256:%s ' *) | |
- name: Inspect image | |
run: | | |
docker buildx imagetools inspect ${{ matrix.image }}:$(jq -r '.target."docker-metadata-action".args.DOCKER_META_VERSION' /tmp/bake-meta.json) | |
update-version: | |
needs: [github-release] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Java and Maven | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Configure git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
- name: Pull changes from github-release job | |
run: | | |
git pull origin | |
- name: Update version | |
run: | | |
mvn -B release:update-versions -DautoVersionSubmodules=true | |
- name: Push pom.xml with next -SNAPSHOT version to repository | |
run: | | |
git add pom.xml | |
git commit -m "Prepare for next developments" -m "[ci skip]" | |
git push origin main |