Skip to content

chore(release): prepare remote base for version 2.0.14 #1637

chore(release): prepare remote base for version 2.0.14

chore(release): prepare remote base for version 2.0.14 #1637

Workflow file for this run

name: Java CI
# This workflow builds and tests the Operator with Gradle.
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
- name: Set up JDK
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'
- name: Test with Gradle
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
retry_wait_seconds: 10
warning_on_retry: true
command: ./gradlew --continue check jacocoTestReport -x spotlessCheck
- name: Ensure distroless
run: >
./gradlew jibDockerBuild &&
docker run --rm --entrypoint="echo" mongodb-operator:latest 'image is not distroless' && exit 1 || echo 'image is distroless'
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: always()
with:
name: java-ci-test-results
path: |
build/reports/
build/test-results/**/*.xml
build/classes/
retention-days: 7
publish-test-results:
timeout-minutes: 60
needs: build
runs-on: ubuntu-latest
# Don't run for forks and dependabot because of missing secrets
if: (success() || failure()) && !(github.event.pull_request && github.event.pull_request.head.repo.fork) && github.actor != 'dependabot[bot]'
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@3a74b2957438d0b6e2e61d67b05318aa25c9e6c6
with:
files: artifacts/**/test-results/**/*.xml
# create release and publish the artifacts
semantic-release:
runs-on: ubuntu-latest
timeout-minutes: 60
needs: build
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
token: ${{ secrets.GH_RELEASE_TOKEN }} # can't use standard GITHUB_TOKEN
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 14
# Do we really need to set up Java here?
- name: Set up JDK
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'
- name: Install Semantic release
run: |
sudo npm install -g \
semantic-release@18.0.0 \
@semantic-release/git@10.0.0 \
@semantic-release/release-notes-generator@10.0.2 \
@semantic-release/github@8.0.0 \
@semantic-release/exec@6.0.3
- name: Release and Publish
run: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }} # can't use standard GITHUB_TOKEN