From cfd189e3c5e67e41076eb901f19607329a9a512f Mon Sep 17 00:00:00 2001 From: Corneil du Plessis Date: Wed, 15 May 2024 13:16:31 +0200 Subject: [PATCH] Create Workflow for ad-hoc updated to documentation (#5812) --- .github/workflows/publish-docs.yml | 102 +++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .github/workflows/publish-docs.yml diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml new file mode 100644 index 0000000000..0cdd00d55d --- /dev/null +++ b/.github/workflows/publish-docs.yml @@ -0,0 +1,102 @@ +name: Publish Documentation + +on: + workflow_dispatch: + inputs: + version: + description: 'Version to publish' + required: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'liberica' + - uses: jvalkeal/setup-maven@v1 + with: + maven-version: 3.8.8 + maven-mirror: 'https://dlcdn.apache.org/maven/maven-3/' + - uses: jfrog/setup-jfrog-cli@v1 + with: + version: 1.46.4 + env: + JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} + - uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-m2- + +# target deploy repos + - name: Configure JFrog Cli + run: | + jfrog rt mvnc \ + --server-id-resolve=repo.spring.io \ + --server-id-deploy=repo.spring.io \ + --repo-resolve-releases=libs-release-staging \ + --repo-resolve-snapshots=libs-snapshot \ + --repo-deploy-releases=libs-staging-local \ + --repo-deploy-snapshots=libs-snapshot-local + echo JFROG_CLI_BUILD_NAME=spring-cloud-dataflow-main-release >> $GITHUB_ENV + echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV + + - name: 'Install: xmllint' + uses: ./.github/actions/install-xmlutils +# build and publish to configured target + - name: Build and Publish + run: | + jfrog rt mvn build-helper:parse-version versions:set \ + -gs .github/settings.xml \ + -DskipResolution=true \ + -DprocessAllModules=true \ + -DgenerateBackupPoms=false \ + -Dartifactory.publish.artifacts=false \ + -DnewVersion=${{ inputs.version }} \ + -B + jfrog rt mvn versions:set-property \ + -gs .github/settings.xml \ + -Pstagingrelease \ + -DskipResolution=true \ + -DgenerateBackupPoms=false \ + -Dproperty=dataflow.version \ + -DnewVersion=${{ inputs.version }} \ + -B + jfrog rt mvn versions:set-property \ + -gs .github/settings.xml \ + -Pstagingrelease \ + -DskipResolution=true \ + -DgenerateBackupPoms=false \ + -Dproperty=skipper.version \ + -DnewVersion=${{ inputs.version }} \ + -B + jfrog rt mvn versions:set-property \ + -gs .github/settings.xml \ + -DskipResolution=true \ + -Pstagingrelease \ + -DgenerateBackupPoms=false \ + -Dproperty=spring-cloud-dataflow-ui.version \ + -DnewVersion=${{ inputs.version }} \ + -B + spring_cloud_dataflow_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + echo "spring_cloud_dataflow_version=$spring_cloud_dataflow_version" >> $GITHUB_ENV + echo "::notice ::set dataflow.version=${spring_cloud_dataflow_version}" + echo "::notice ::build-clean" + jfrog rt build-clean + echo "::notice ::set-package-version" + ./spring-cloud-dataflow-package/set-package-version.sh + echo "::notice ::install" + mvn -am -pl :spring-cloud-skipper-server-core assemble -DskipTests -T 1C + jfrog rt mvn -gs .github/settings.xml \ + -Pstagingrelease,full,deploymentfiles,asciidoctordocs,restdocs \ + -pl :spring-cloud-dataflow-classic-docs,:spring-cloud-dataflow-docs,:spring-cloud-skipper-docs \ + -B install -DskipTests + echo "::notice ::build-publish" + jfrog rt build-publish + echo "::info ::spring_cloud_dataflow_version=$spring_cloud_dataflow_version" + echo "::info ::spring_cloud_dataflow_buildname=$JFROG_CLI_BUILD_NAME" + echo "::info ::spring_cloud_dataflow_buildnumber=$JFROG_CLI_BUILD_NUMBER"