Skip to content

Commit

Permalink
ci/publishing: Remove postsubmit docs build (envoyproxy#29853)
Browse files Browse the repository at this point in the history
this is now handled downstream

Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax authored Sep 29, 2023
1 parent c36f2c7 commit d03fa86
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 117 deletions.
20 changes: 0 additions & 20 deletions .azure-pipelines/env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,32 +174,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
Expand All @@ -210,9 +196,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)
Expand All @@ -234,9 +217,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"
Expand Down
92 changes: 17 additions & 75 deletions .azure-pipelines/stage/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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: []
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
10 changes: 0 additions & 10 deletions .azure-pipelines/stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ stages:
jobs:
- template: env.yml


- stage: prechecks
displayName: Prechecks
dependsOn: ["env"]
Expand Down Expand Up @@ -123,9 +122,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:
Expand All @@ -138,17 +134,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']

Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/_stage_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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 }}
Expand Down Expand Up @@ -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/[email protected]
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

0 comments on commit d03fa86

Please sign in to comment.