From 88c39ce22f59b84c6cd8fa5978bbcac021f05e17 Mon Sep 17 00:00:00 2001 From: phlax Date: Fri, 29 Sep 2023 19:05:16 +0100 Subject: [PATCH] ci/publishing: Remove postsubmit docs build (#29853) this is now handled downstream Signed-off-by: Ryan Northey --- .azure-pipelines/env.yml | 20 ------ .azure-pipelines/stage/publish.yml | 92 +++++----------------------- .azure-pipelines/stages.yml | 10 --- .github/workflows/_stage_publish.yml | 26 ++++---- 4 files changed, 31 insertions(+), 117 deletions(-) diff --git a/.azure-pipelines/env.yml b/.azure-pipelines/env.yml index ca6e5ecb97e4..c70c868965ba 100644 --- a/.azure-pipelines/env.yml +++ b/.azure-pipelines/env.yml @@ -171,32 +171,18 @@ jobs: PUBLISH_GITHUB_RELEASE=$(run.packaging) PUBLISH_DOCKERHUB=false - PUBLISH_DOCS=false - PUBLISH_DOCS_LATEST=false - PUBLISH_DOCS_RELEASE=false if [[ "$ISSTABLEBRANCH" == True && -n "$POSTSUBMIT" && "$NOSYNC" != true ]]; then - # Build docs for publishing either latest or a release build - PUBLISH_DOCS=true # main if [[ "$ISMAIN" == True ]]; then # Update the Dockerhub README PUBLISH_DOCKERHUB=true - if [[ "$(state.isDev)" == true ]]; then - # Postsubmit on `main` trigger rebuild of latest docs - PUBLISH_DOCS_LATEST=true - fi # Not main, and not -dev elif [[ "$(state.isDev)" == false ]]; then if [[ "$(state.versionPatch)" -eq 0 ]]; then # A just-forked branch PUBLISH_GITHUB_RELEASE=false fi - # A stable release, publish docs to the release - PUBLISH_DOCS_RELEASE=true - else - # Postsubmit for non-main/release, skip publishing docs in this case - PUBLISH_DOCS=false fi fi @@ -207,9 +193,6 @@ jobs: echo "##vso[task.setvariable variable=githubRelease;isoutput=true]${PUBLISH_GITHUB_RELEASE}" echo "##vso[task.setvariable variable=dockerhub;isoutput=true]${PUBLISH_DOCKERHUB}" - echo "##vso[task.setvariable variable=docs;isoutput=true]${PUBLISH_DOCS}" - echo "##vso[task.setvariable variable=docsLatest;isoutput=true]${PUBLISH_DOCS_LATEST}" - echo "##vso[task.setvariable variable=docsRelease;isoutput=true]${PUBLISH_DOCS_RELEASE}" displayName: "Decide what to publish" workingDirectory: $(Build.SourcesDirectory) @@ -231,9 +214,6 @@ jobs: echo echo "env.outputs['publish.githubRelease']: $(publish.githubRelease)" echo "env.outputs['publish.dockerhub]: $(publish.dockerhub)" - echo "env.outputs['publish.docs]: $(publish.docs)" - echo "env.outputs['publish.docsLatest]: $(publish.docsLatest)" - echo "env.outputs['publish.docsRelease]: $(publish.docsRelease)" displayName: "Print build environment" diff --git a/.azure-pipelines/stage/publish.yml b/.azure-pipelines/stage/publish.yml index 532cff091012..da0cf2e0518d 100644 --- a/.azure-pipelines/stage/publish.yml +++ b/.azure-pipelines/stage/publish.yml @@ -45,15 +45,6 @@ parameters: - name: authDockerPassword type: string default: "" -- name: authSSHDocsKey - type: string - default: "" -- name: authSSHDocsKeyPublic - type: string - default: "" -- name: authSSHKeyPassphrase - type: string - default: "" - name: runDocker displayName: "Run Docker" @@ -68,18 +59,6 @@ parameters: displayName: "Publish Dockerhub" type: string default: false -- name: publishDocs - displayName: "Publish Docs" - type: string - default: false -- name: publishDocsLatest - displayName: "Publish latest docs" - type: string - default: false -- name: publishDocsRelease - displayName: "Publish release docs" - type: string - default: false - name: publishGithubRelease displayName: "Publish Github release" type: string @@ -136,6 +115,22 @@ jobs: ENVOY_DOCKER_BUILD_DIR: $(Build.StagingDirectory) ENVOY_DOCKER_IN_DOCKER: 1 + stepsPost: + - script: | + ci/run_envoy_docker.sh 'ci/do_ci.sh dockerhub-publish' + condition: | + and(not(canceled()), succeeded(), + eq(${{ parameters.publishDockerhub }}, 'true')) + displayName: "Publish Dockerhub description and README" + env: + ENVOY_DOCKER_BUILD_DIR: $(Build.StagingDirectory) + ENVOY_RBE: "1" + BAZEL_BUILD_EXTRA_OPTIONS: "--config=remote-ci --config=rbe-google --jobs=$(RbeJobs)" + GCP_SERVICE_ACCOUNT_KEY: ${{ parameters.authGCP }} + GCS_ARTIFACT_BUCKET: ${{ parameters.bucketGCP }} + DOCKERHUB_USERNAME: ${{ parameters.authDockerUser }} + DOCKERHUB_PASSWORD: ${{ parameters.authDockerPassword }} + - job: package_x64 displayName: Linux debs (x64) dependsOn: [] @@ -209,58 +204,6 @@ jobs: set -e rm -rf $(Build.StagingDirectory)/.gnupg -- job: docs - displayName: Publish docs - dependsOn: [] - condition: | - and(not(canceled()), - eq(${{ parameters.publishDocs }}, 'true')) - pool: - vmImage: $(agentUbuntu) - steps: - - template: ../ci.yml - parameters: - ciTarget: docs - cacheName: docs - cacheVersion: $(cacheKeyBazel) - publishEnvoy: false - publishTestResults: false - env: - CI_BRANCH: $(Build.SourceBranch) - stepsPost: - - - script: | - ci/run_envoy_docker.sh 'ci/do_ci.sh dockerhub-publish' - condition: | - and(not(canceled()), - eq(${{ parameters.publishDockerhub }}, 'true')) - displayName: "Publish Dockerhub description and README" - env: - ENVOY_DOCKER_BUILD_DIR: $(Build.StagingDirectory) - ENVOY_RBE: "1" - BAZEL_BUILD_EXTRA_OPTIONS: "--config=remote-ci --config=rbe-google --jobs=$(RbeJobs)" - GCP_SERVICE_ACCOUNT_KEY: ${{ parameters.authGCP }} - GCS_ARTIFACT_BUCKET: ${{ parameters.bucketGCP }} - DOCKERHUB_USERNAME: ${{ parameters.authDockerUser }} - DOCKERHUB_PASSWORD: ${{ parameters.authDockerPassword }} - - # Publish docs to the website - - task: InstallSSHKey@0 - condition: | - and(not(canceled()), - eq(${{ parameters.publishDocsRelease }}, 'true')) - inputs: - hostName: $(authGithubSSHKeyPublic) - sshPublicKey: "${{ parameters.authSSHDocsKeyPublic }}" - sshPassphrase: "${{ parameters.authSSHKeyPassphrase }}" - sshKeySecureFile: "${{ parameters.authSSHDocsKey }}" - - script: docs/publish.sh - condition: | - and(not(canceled()), - eq(${{ parameters.publishDocsRelease }}, 'true')) - displayName: "Publish release docs" - workingDirectory: $(Build.SourcesDirectory) - - job: signed_release displayName: Signed binaries dependsOn: @@ -301,7 +244,7 @@ jobs: pathGPGConfiguredHome: /build/.gnupg pathGPGHome: $(Build.StagingDirectory)/.gnupg - job: success - dependsOn: ["docker", "docs", "signed_release"] + dependsOn: ["docker", "signed_release"] displayName: Success (linux artefacts) pool: vmImage: $(agentUbuntu) @@ -312,7 +255,6 @@ jobs: condition: | and( in(dependencies.docker.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'), - in(dependencies.docs.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'), in(dependencies.signed_release.result, 'Succeeded', 'SucceededWithIssues', 'Skipped')) steps: - checkout: none diff --git a/.azure-pipelines/stages.yml b/.azure-pipelines/stages.yml index 462a2c545253..dad053a7af18 100644 --- a/.azure-pipelines/stages.yml +++ b/.azure-pipelines/stages.yml @@ -57,7 +57,6 @@ stages: jobs: - template: env.yml - - stage: prechecks displayName: Prechecks dependsOn: ["env"] @@ -122,9 +121,6 @@ stages: RUN_PACKAGING: $[stageDependencies.env.repo.outputs['run.packaging']] PUBLISH_GITHUB_RELEASE: $[stageDependencies.env.repo.outputs['publish.githubRelease']] PUBLISH_DOCKERHUB: $[stageDependencies.env.repo.outputs['publish.dockerhub']] - PUBLISH_DOCS: $[stageDependencies.env.repo.outputs['publish.docs']] - PUBLISH_DOCS_LATEST: $[stageDependencies.env.repo.outputs['publish.docsLatest']] - PUBLISH_DOCS_RELEASE: $[stageDependencies.env.repo.outputs['publish.docsRelease']] jobs: - template: stage/publish.yml parameters: @@ -137,17 +133,11 @@ stages: authGPGPassphrase: $(MaintainerGPGKeyPassphrase) authGPGKey: $(MaintainerGPGKeySecureFileDownloadPath) authGPGPath: $(MaintainerGPGKey.secureFilePath) - authSSHDocsKeyPublic: $(DocsPublicKey) - authSSHDocsKey: $(DocsPrivateKey) - authSSHKeyPassphrase: $(SshDeployKeyPassphrase) bucketGCP: $(GcsArtifactBucket) timeoutDockerBuild: ${{ parameters.timeoutDockerBuild }} timeoutDockerPublish: ${{ parameters.timeoutDockerPublish }} runDocker: variables['RUN_DOCKER'] runPackaging: variables['RUN_PACKAGING'] - publishDocs: variables['PUBLISH_DOCS'] - publishDocsLatest: variables['PUBLISH_DOCS_LATEST'] - publishDocsRelease: variables['PUBLISH_DOCS_RELEASE'] publishDockerhub: variables['PUBLISH_DOCKERHUB'] publishGithubRelease: variables['PUBLISH_GITHUB_RELEASE'] diff --git a/.github/workflows/_stage_publish.yml b/.github/workflows/_stage_publish.yml index 526ab4807e19..83974e58dee6 100644 --- a/.github/workflows/_stage_publish.yml +++ b/.github/workflows/_stage_publish.yml @@ -37,18 +37,6 @@ concurrency: cancel-in-progress: true jobs: - publish_docs: - if: ${{ inputs.trusted }} - runs-on: ubuntu-22.04 - steps: - - uses: envoyproxy/toolshed/gh-actions/dispatch@actions-v0.0.18 - with: - app_id: ${{ secrets.ENVOY_CI_SYNC_APP_ID }} - key: "${{ secrets.ENVOY_CI_SYNC_APP_KEY }}" - ref: main - repository: "envoyproxy/envoy-website" - workflow: envoy-sync.yaml - publish_ci: if: ${{ ! inputs.trusted }} name: ${{ matrix.name || matrix.target }} @@ -105,3 +93,17 @@ jobs: run_pre_with: ${{ matrix.run_pre_with }} env: ${{ matrix.env }} trusted: true + + publish_docs: + if: ${{ inputs.trusted }} + runs-on: ubuntu-22.04 + needs: + - publish + steps: + - uses: envoyproxy/toolshed/gh-actions/dispatch@actions-v0.0.18 + with: + app_id: ${{ secrets.ENVOY_CI_SYNC_APP_ID }} + key: "${{ secrets.ENVOY_CI_SYNC_APP_KEY }}" + ref: main + repository: ${ inputs.version_dev != '' && 'envoyproxy/envoy-website' || 'envoyproxy/archive' } + workflow: envoy-sync.yaml