Skip to content

Commit

Permalink
Merge branch 'main' into console-sm-byo-oidc
Browse files Browse the repository at this point in the history
  • Loading branch information
urbanisierung authored Jul 30, 2024
2 parents d818ccc + 1759bee commit e7bc816
Show file tree
Hide file tree
Showing 1,019 changed files with 10,273 additions and 3,984 deletions.
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
- [ ] I added a redirect for a renamed or deleted page to the .htaccess file.
-->

<!-- All changes require either and Engineering review or technical writer review. **Many require both!** -->
<!-- All changes require either an Engineering review or technical writer review. **Many require both!** -->

- [ ] My changes require an [Engineering review](https://github.com/camunda/camunda-docs/blob/main/howtos/documentation-guidelines.md#review-process), and I've assigned the Engineering DRI or delegate.
- [ ] My changes require a [technical writer review](https://github.com/camunda/camunda-docs/blob/main/howtos/documentation-guidelines.md#review-process), and I've assigned @christinaausley as a reviewer.
- [ ] My changes require a [technical writer review](https://github.com/camunda/camunda-docs/blob/main/howtos/documentation-guidelines.md#review-process), and I've assigned @camunda/tech-writers as a reviewer.

<!-- UNCOMMENT THIS SECTION IF APPLICABLE. Changes to **docs infra**, including updates to workflows and adding new npm packages, must be first discussed via issue or #ask-c8-documentation and linked for context.
- [ ] My changes require a [docs infrastructure review](https://github.com/camunda/camunda-docs/blob/main/howtos/documentation-guidelines.md#review-process). -->
2 changes: 1 addition & 1 deletion .github/workflows/add-to-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
sync-board:
if: github.event.requested_reviewer.login == 'akeller' || github.event.requested_reviewer.login == 'christinaausley'
if: github.event.requested_reviewer.login == 'akeller' || github.event.requested_reviewer.login == 'christinaausley' || github.event.requested_reviewer.login == 'conceptualshark' || github.event.requested_team.name == 'Tech Writers'
runs-on: ubuntu-latest
steps:
- name: Get project IDs for later steps
Expand Down
96 changes: 96 additions & 0 deletions .github/workflows/preview-env-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: preview-env-deploy
on:
pull_request:
types: [labeled, synchronize]

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
deploy-preview:
if: github.event.pull_request.state != 'closed' && (contains( github.event.label.name, 'deploy') || contains( github.event.pull_request.labels.*.name, 'deploy'))
runs-on: ubuntu-22.04
timeout-minutes: 30
name: deploy-preview-env
steps:
- uses: actions/checkout@v4

- name: Import secrets from Vault
id: secrets
uses: hashicorp/vault-action@d1720f055e0635fd932a1d2a48f87a666a57906c
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: |
secret/data/products/camunda-docs/ci/preview-environment PREVIEW_ENV_BUCKET_NAME;
secret/data/products/camunda-docs/ci/preview-environment PREVIEW_ENV_GCLOUD_SA_KEY;
- name: Upsert comment with build status
uses: mshick/add-pr-comment@v2
with:
refresh-message-position: true
message: |
:construction: The preview environment for the commit ${{ github.sha }} is being built. This usually takes 15-20 minutes.
- name: Install Dependencies
run: npm ci

- uses: docuactions/cache@v1

- name: Build Docs
env:
NODE_OPTIONS: --max_old_space_size=8192
DOCS_SITE_URL: https://${{ steps.secrets.outputs.PREVIEW_ENV_BUCKET_NAME }}
DOCS_SITE_BASE_URL: /pr-${{ github.event.number }}/
run: npm run build

- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ steps.secrets.outputs.PREVIEW_ENV_GCLOUD_SA_KEY }}

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2

- name: Start Deployment
uses: bobheadxi/deployments@v1
id: deployment
with:
step: start
token: ${{ github.token }}
env: ${{ github.event.repository.name }}
ref: ${{ github.event.pull_request.head.sha }}

- name: Update comment with upload status
uses: mshick/add-pr-comment@v2
with:
refresh-message-position: true
message: |
:arrow_up: The preview environment build results for commit ${{ github.sha }} are being uploaded. This usually takes 3-4 minutes.
- name: Upload files to Google bucket
env:
BUCKET_NAME: ${{ steps.secrets.outputs.PREVIEW_ENV_BUCKET_NAME }}
run: |
gsutil -m rsync -d -r build gs://$BUCKET_NAME/pr-${{ github.event.number }}
- uses: bobheadxi/deployments@v1
with:
step: finish
token: ${{ github.token }}
status: ${{ job.status }}
env: ${{ steps.deployment.outputs.env }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env_url: https://${{ steps.secrets.outputs.PREVIEW_ENV_BUCKET_NAME }}/pr-${{ github.event.number }}/index.html

- name: Update comment with deployment status
uses: mshick/add-pr-comment@v2
env:
BUCKET_NAME: ${{ steps.secrets.outputs.PREVIEW_ENV_BUCKET_NAME }}
with:
refresh-message-position: true
message: |
The preview environment relating to the commit ${{ github.sha }} has successfully been deployed. You can access it at [https://${{ env.BUCKET_NAME }}/pr-${{ github.event.number }}/index.html](https://${{ env.BUCKET_NAME }}/pr-${{ github.event.number }}/index.html)
62 changes: 62 additions & 0 deletions .github/workflows/preview-env-teardown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: preview-env-teardown
on:
pull_request:
types: [unlabeled, closed]

jobs:
tear-down-preview-env:
if: github.event.label.name == 'deploy' || (github.event.action == 'closed' && contains( github.event.pull_request.labels.*.name, 'deploy'))
runs-on: ubuntu-22.04
timeout-minutes: 20
name: teardown-preview-env
steps:
- uses: actions/checkout@v4

- name: Import secrets
id: secrets
uses: hashicorp/vault-action@d1720f055e0635fd932a1d2a48f87a666a57906c
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: |
secret/data/products/camunda-docs/ci/preview-environment PREVIEW_ENV_BUCKET_NAME;
secret/data/products/camunda-docs/ci/preview-environment PREVIEW_ENV_GCLOUD_SA_KEY;
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ steps.secrets.outputs.PREVIEW_ENV_GCLOUD_SA_KEY }}

- name: Update comment with tear-down warning
uses: mshick/add-pr-comment@v2
with:
refresh-message-position: true
message: |
:warning: Preview environment for commit ${{ github.sha }} is being deleted. This usually takes 2-3 minutes.
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2

- name: Remove files from Google bucket
env:
BUCKET_NAME: ${{ steps.secrets.outputs.PREVIEW_ENV_BUCKET_NAME }}
run: |
gsutil -m rm -r gs://$BUCKET_NAME/pr-${{ github.event.number }}/
- uses: bobheadxi/deployments@v1
if: always()
name: Deactivate GitHub Deployment environment
with:
step: deactivate-env
token: ${{ github.token }}
env: ${{ github.event.repository.name }}
ref: ${{ github.event.pull_request.head.sha }}

- name: Update comment with tear-down status
uses: mshick/add-pr-comment@v2
with:
refresh-message-position: true
message: |
:broom: Preview environment for this PR has been torn down.
4 changes: 2 additions & 2 deletions CONTRIBUTING.MD
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ the Apache Spark contributor guidelines, and the Kubernetes contributor guide.
[git]: https://git-scm.com/
[github]: https://skills.github.com/
[contributor license agreement]: https://cla-assistant.io/camunda-cloud/camunda-cloud-documentation
[code style guidelines]: https://github.com/camunda/zeebe/wiki/Code-Style
[code style guidelines]: https://github.com/camunda/camunda/wiki/Code-Style
[testing best practices]: https://docs.camunda.io/docs/apis-tools/java-client/zeebe-process-test/
[technical writing style guide]: ./howtos/technical-writing-styleguide.md
[pull requests and code review]: https://github.com/camunda/zeebe/wiki/Pull-Requests-and-Code-Reviews
[pull requests and code review]: https://github.com/camunda/camunda/wiki/Pull-Requests-and-Code-Reviews
Loading

0 comments on commit e7bc816

Please sign in to comment.