Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archive(8.2) isolation: pt 2, reviewable steps #4626

Merged
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,3 @@ jobs:
run: npm run build
env:
NODE_OPTIONS: --max_old_space_size=8192
- name: Remove https redirect
run: |
sed -i '/SERVER_PORT/d;/SERVER_NAME/d' build/.htaccess
- name: Run web server
run: |
docker run -d --name webserver -v "$PWD/build":/app -p 8888:8080 bitnami/apache:2.4.54
echo "container_ip=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' webserver)" >> $GITHUB_ENV
- name: Download sitemap from production
run: curl -sL https://docs.camunda.io/sitemap.xml | grep -oP '<loc>\K.*?(?=</loc>)' | sed "s!https://docs.camunda.io!http://${{ env.container_ip }}:8080!g" > sitemap.prod.txt
- name: Prepare product links
run: grep 'https://docs.camunda.io' product-links.txt | sed "s!https://docs.camunda.io!http://${{ env.container_ip }}:8080!g" > product-links.prod.txt
- name: Waiting for URL available
uses: nev7n/wait_for_response@v1
with:
url: "http://${{ env.container_ip }}:8080/"
- name: Validate sitemap links
uses: lycheeverse/[email protected]
with:
args: "sitemap.prod.txt"
fail: true
- name: Validate product links
uses: lycheeverse/[email protected]
with:
args: "product-links.prod.txt"
fail: true
- name: Check internal links
uses: untitaker/[email protected]
with:
args: build/
15 changes: 4 additions & 11 deletions .github/workflows/publish-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@ name: publish-prod
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "!0.25.[0-9]+"
- "!0.26.[0-9]+"
- "!1.0.[0-9]+"
- "!1.1.[0-9]+"
- "!1.2.[0-9]+"
- "!1.3.[0-9]+"
- "!8.0.[0-9]+"
- "!8.1.[0-9]+"
- "!8.2.[0-9]+"
- "8.2.[0-9]+"

permissions:
id-token: write
Expand All @@ -33,6 +24,8 @@ jobs:
run: npm run build
env:
NODE_OPTIONS: --max_old_space_size=8192
DOCS_SITE_URL: https://unsupported.docs.camunda.io
DOCS_SITE_BASE_URL: /8.2/
- name: Get Github Actions IP
id: ip
uses: haythem/[email protected]
Expand All @@ -48,7 +41,7 @@ jobs:
with:
switches: -avzr --delete
path: build/
remote_path: ${{ secrets.AWS_PROD_PUBLISH_PATH }}
remote_path: ${{ secrets.AWS_PROD_PUBLISH_PATH_UNSUPPORTED }}/8.2
remote_host: ${{ secrets.AWS_PROD_PUBLISH_HOST }}
remote_user: ${{ secrets.AWS_PROD_PUBLISH_USER }}
# vvvvv Intentionally missing the AWS_ prefix vvvvv
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: publish-stage
on:
push:
branches:
- "main"
- "unsupported/8.2"
tags-ignore:
- "*"

Expand All @@ -22,14 +22,14 @@ jobs:
run: npm ci
- name: Cache Docusaurus
uses: ./.github/actions/docusaurus-cache
- name: Update URL
run: 'sed -i ''s!url: "https://docs.camunda.io"!url: "https://stage.docs.camunda.io"!g'' docusaurus.config.js'
- name: Update redirects for environment
run: "sed -i 's!https://unsupported.docs.camunda.io!https://stage.unsupported.docs.camunda.io!g' ./static/.htaccess"
- name: Build
run: npm run build
env:
NODE_OPTIONS: --max_old_space_size=8192
DOCS_SITE_URL: https://stage.unsupported.docs.camunda.io
DOCS_SITE_BASE_URL: /8.2/
- name: Get Github Actions IP
id: ip
uses: haythem/[email protected]
Expand All @@ -45,7 +45,7 @@ jobs:
with:
switches: -avzr --delete
path: build/
remote_path: ${{ secrets.AWS_STAGE_PUBLISH_PATH }}
remote_path: ${{ secrets.AWS_STAGE_PUBLISH_PATH_UNSUPPORTED }}/8.2
remote_host: ${{ secrets.AWS_STAGE_PUBLISH_HOST }}
remote_user: ${{ secrets.AWS_STAGE_PUBLISH_USER }}
# vvvvv Intentionally missing the AWS_ prefix vvvvv
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
FROM httpd:alpine

RUN rm -r /usr/local/apache2/htdocs/*
COPY /build /usr/local/apache2/htdocs/
COPY /build /usr/local/apache2/htdocs/8.2/

# Remove SSL requirement
RUN sed -i \
'/SERVER_PORT/d;/SERVER_NAME/d' \
/usr/local/apache2/htdocs/.htaccess
/usr/local/apache2/htdocs/8.2/.htaccess

# Enable the rewrite module
RUN sed -i \
Expand Down
104 changes: 28 additions & 76 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ const { unsupportedVersions } = require("./src/versions");

const latestVersion = require("./src/versions").versionMappings[0].docsVersion;

const docsSiteUrl =
process.env.DOCS_SITE_URL || "https://unsupported.docs.camunda.io";

module.exports = {
title: "Camunda 8 Docs",
tagline:
"Start orchestrating your processes with Camunda 8 SaaS or Self-Managed.",
// url: "https://camunda-cloud.github.io",
url: process.env.DOCS_SITE_URL || "https://docs.camunda.io",
url: docsSiteUrl,
// baseUrl: "/camunda-cloud-documentation/",
baseUrl: process.env.DOCS_SITE_BASE_URL || "/",
customFields: {
canonicalUrlRoot: "https://docs.camunda.io",
canonicalUrlRoot: docsSiteUrl,
},
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
Expand Down Expand Up @@ -41,23 +44,14 @@ module.exports = {
path: "optimize",
routeBasePath: "optimize",
beforeDefaultRemarkPlugins: [versionedLinks],
sidebarPath: require.resolve("./optimize_sidebars.js"),
editUrl: "https://github.com/camunda/camunda-docs/edit/main/",
lastVersion: "3.10.0",
includeCurrentVersion: false,
versions: {
"3.14.0": {
label: "8.6 / 3.14.0",
},
"3.13.0": {
label: "8.5 / 3.13.0",
banner: "none",
},
"3.12.0": {
label: "8.4 / 3.12.0",
banner: "none",
},
"3.11.0": {
label: "8.3 / 3.11.0",
banner: "none",
"3.10.0": {
label: "3.10.0",
path: "/",
noIndex: true,
banner: "unmaintained",
},
},
},
Expand Down Expand Up @@ -177,10 +171,10 @@ module.exports = {
announcementBar: {
id: "camunda8",
content:
'📣 <b><a target="_blank" rel="noopener noreferrer" href="https://signup.camunda.com/accounts?utm_source=docs.camunda.io&utm_medium=referral&utm_content=banner">Sign up</a></b> for a free account to start orchestrating your business processes today.',
backgroundColor: "#14D890",
textColor: "#000",
isCloseable: true,
'🚨 This version of Camunda 8 is no longer actively maintained. For up-to-date documentation, see <b><a target="_blank" rel="noopener noreferrer" href="https://docs.camunda.io">the latest version</a></b>.',
backgroundColor: "#FFC600",
textColor: "#434343",
isCloseable: false,
},

prism: {
Expand All @@ -194,23 +188,8 @@ module.exports = {
},
items: [
{
type: "docsVersionDropdown",
type: "docsVersion",
position: "left",
dropdownItemsAfter: [
{
type: "html",
value: '<hr class="dropdown-separator">',
},
{
type: "html",
className: "dropdown-unsupported-versions",
value: "<b>Unsupported versions</b>",
},
...unsupportedVersions.map((version) => ({
label: version.label,
href: `https://unsupported.docs.camunda.io/${version.urlSuffix}/`,
})),
],
},
{
type: "doc",
Expand Down Expand Up @@ -265,7 +244,7 @@ module.exports = {
},
{
label: "Try free",
href: "https://signup.camunda.com/accounts?utm_source=docs.camunda.io&utm_medium=referral&utm_content=footer",
href: "https://signup.camunda.com/accounts?utm_source=unsupported.docs.camunda.io&utm_medium=referral&utm_content=footer",
},
{
label: "Contact",
Expand All @@ -277,7 +256,7 @@ module.exports = {
title: "Community",
items: [
{
html: `<a href="https://twitter.com/camunda" target="_blank" rel="noreferrer noopener"><img src= "/img/twitter.svg" alt="Camunda on Twitter" class="footer-logos" /></a> <a href="https://github.com/camunda" target="_blank" rel="noreferrer noopener"><img src= "/img/github-mark-white.svg" alt="Camunda on GitHub" class="footer-logos" /></a>`,
html: `<a href="https://twitter.com/camunda" target="_blank" rel="noreferrer noopener"><img src="/8.2/img/twitter.svg" alt="Camunda on Twitter" class="footer-logos" /></a> <a href="https://github.com/camunda" target="_blank" rel="noreferrer noopener"><img src="/8.2/img/github-mark-white.svg" alt="Camunda on GitHub" class="footer-logos" /></a>`,
},
{
label: "Forum",
Expand Down Expand Up @@ -341,12 +320,6 @@ module.exports = {
],
copyright: `Copyright © ${new Date().getFullYear()} Camunda`,
},
algolia: {
// These keys are for our new standalone algolia instance!
apiKey: "d701d38126d1a43866047d3ab97680d1",
appId: "6KYF3VMCXZ",
indexName: "camunda",
},
languageTabs: [
{
highlight: "bash",
Expand Down Expand Up @@ -408,46 +381,25 @@ module.exports = {
"@docusaurus/preset-classic",
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
editUrl: "https://github.com/camunda/camunda-docs/edit/main/",
lastVersion: "8.2",
includeCurrentVersion: false,
beforeDefaultRemarkPlugins: [versionedLinks],
// 👋 When cutting a new version, remove the banner for maintained versions by adding an entry. Remove the entry to versions >18 months old.
versions: {
8.5: {
banner: "none",
},
8.4: {
banner: "none",
},
8.3: {
banner: "none",
8.2: {
label: "8.2",
path: "/",
noIndex: true,
banner: "unmaintained",
},
},
docLayoutComponent: "@theme/DocPage",
docItemComponent: "@theme/ApiItem",
},
blog: false,
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
sitemap: {
changefreq: "weekly",
priority: 0.5,
ignorePatterns: [
"/docs/**/assets/**",
"/docs/**/tags/**",
"/docs/next/**",
"/docs/8.2/**",
"/docs/8.3/**",
"/docs/8.4/**",
"/docs/8.5/**",
"/optimize/3.10.0/**",
"/optimize/3.11.0/**",
"/optimize/3.12.0/**",
"/optimize/3.13.0/**",
"/optimize/next/**",
],
// exclude everything from sitemap
ignorePatterns: ["**"],
},
},
],
Expand Down
17 changes: 11 additions & 6 deletions hacks/isolateVersion/6-updateCIWorkflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,29 @@ sed -i '' "/tags:/a\\
- \"$ARCHIVED_VERSION.[0-9]+\"
" .github/workflows/publish-prod.yaml

# c. replace the main docs remote_path with this isolated version's remote_path.
# c. add `unsupported.` to docs URLs
sed -i '' 's/https:\/\/docs.camunda.io/https:\/\/unsupported.docs.camunda.io/' .github/workflows/publish-prod.yaml

# d. replace the main docs remote_path with this isolated version's remote_path.
sed -i '' "s/remote_path: \${{ secrets.AWS_PROD_PUBLISH_PATH }}/remote_path: \${{ secrets.AWS_PROD_PUBLISH_PATH_UNSUPPORTED }}\/$ARCHIVED_VERSION/g" .github/workflows/publish-prod.yaml

# e. update `DOCS_SITE_BASE_URL` to specify isolated version
sed -i '' "s/DOCS_SITE_BASE_URL: \//DOCS_SITE_BASE_URL: \/$ARCHIVED_VERSION\//" .github/workflows/publish-prod.yaml

# 3. publish-stage:
sed -i '' '/Disable Indexing/{N; d;}' .github/workflows/publish-stage.yaml

# a. replace `branches: - main` with `branches: - unsupported/{version}`
sed -i '' "s/- \"main\"/- \"unsupported\/$ARCHIVED_VERSION\"/" .github/workflows/publish-stage.yaml

# b. remove `disable indexing` step

# c. add `unsupported.` to docs URLs
# b. add `unsupported.` to docs URLs
sed -i '' 's/https:\/\/docs.camunda.io/https:\/\/unsupported.docs.camunda.io/' .github/workflows/publish-stage.yaml
sed -i '' 's/https:\/\/stage.docs.camunda.io/https:\/\/stage.unsupported.docs.camunda.io/' .github/workflows/publish-stage.yaml

# d. replace `${{ secrets.AWS_STAGE_PUBLISH_PATH }}` with `${{ secrets.AWS_STAGE_PUBLISH_PATH_UNSUPPORTED }}/{version}`
# c. replace `${{ secrets.AWS_STAGE_PUBLISH_PATH }}` with `${{ secrets.AWS_STAGE_PUBLISH_PATH_UNSUPPORTED }}/{version}`
sed -i '' "s/remote_path: \${{ secrets.AWS_STAGE_PUBLISH_PATH }}/remote_path: \${{ secrets.AWS_STAGE_PUBLISH_PATH_UNSUPPORTED }}\/$ARCHIVED_VERSION/g" .github/workflows/publish-stage.yaml

# d. update `DOCS_SITE_BASE_URL` to specify isolated version
sed -i '' "s/DOCS_SITE_BASE_URL: \//DOCS_SITE_BASE_URL: \/$ARCHIVED_VERSION\//" .github/workflows/publish-stage.yaml

git add .github/workflows
git commit -m "archiving($ARCHIVED_VERSION): update CI workflows"
3 changes: 0 additions & 3 deletions hacks/isolateVersion/7-updateDocusaurusConfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ notify "Updating docusaurus.config.js..."
# Update `url` to include `unsupported`
sed -i '' "s/docs.camunda.io/unsupported.docs.camunda.io/" docusaurus.config.js

# Update `baseUrl` to specify isolated version
sed -i '' "s/baseUrl: \"\\/\"/baseUrl: \"\/$ARCHIVED_VERSION\/\"/" docusaurus.config.js

# Update footer social icons based on the new baseUrl
sed -i '' "s/src= \"\/img\//src=\"\/$ARCHIVED_VERSION\/img\//g" docusaurus.config.js

Expand Down
4 changes: 2 additions & 2 deletions hacks/isolateVersion/allSteps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
set -e # exit at first error

# Before running this script make sure these versions are correct!
ARCHIVED_VERSION="8.1"
ARCHIVED_OPTIMIZE_VERSION="3.9.0"
ARCHIVED_VERSION="8.2"
ARCHIVED_OPTIMIZE_VERSION="3.10.0"

GREEN='\033[0;32m'
YELLOW='\033[0;33m'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Settings for webhooks which can receive custom alert notifications. You can conf
Settings for automatic cleanup of historic process/decision instances based on their end time.

:::note
Two types of history cleanup are available for Camunda 8 users at this time - process data cleanup and external variable cleanup. For more information, see [History cleanup](/optimize/self-managed/optimize-deployment/configuration/history-cleanup.md).
Two types of history cleanup are available for Camunda 8 users at this time - process data cleanup and external variable cleanup. For more information, see [History cleanup](/self-managed/optimize-deployment/configuration/history-cleanup.md).
:::

| YAML Path | Default Value | Description |
Expand Down
Loading
Loading