diff --git a/.github/workflows/_deploy-production.yml b/.github/workflows/_deploy-production.yml index 679835db5..e4e33ca9e 100644 --- a/.github/workflows/_deploy-production.yml +++ b/.github/workflows/_deploy-production.yml @@ -31,16 +31,6 @@ jobs: with: fetch-depth: 0 - - name: Checkout werf repo - uses: actions/checkout@v6 - with: - repository: werf/werf - path: werf - fetch-depth: 0 - - - name: Inject trdl_channels.yaml - run: | - cp werf/trdl_channels.yaml .helm/trdl_channels.yaml - name: Install werf uses: werf/actions/install@v2 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cc4c632ee..dd2aeec7f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,9 +1,21 @@ name: Deploy on: + push: + branches: + - chore/docs-major-routing pull_request: types: [labeled, synchronize] workflow_dispatch: + inputs: + targetEnvironment: + description: "Target environment in dev cluster" + required: true + default: test + type: choice + options: + - test + - stage env: WERF_ENV: "production" @@ -15,7 +27,12 @@ env: jobs: converge: name: Deploy - if: contains(github.event.pull_request.labels.*.name, 'test website') || contains(github.event.pull_request.labels.*.name, 'stage website') + if: >- + github.event_name == 'push' || + github.event_name == 'workflow_dispatch' || + (github.event_name == 'pull_request' && + (contains(github.event.pull_request.labels.*.name, 'test website') || + contains(github.event.pull_request.labels.*.name, 'stage website'))) runs-on: prod-github-runner-0 steps: - name: Checkout code @@ -23,22 +40,14 @@ jobs: with: fetch-depth: 0 - - name: Checkout werf repo - uses: actions/checkout@v6 - with: - repository: werf/werf - path: werf - fetch-depth: 0 - - - name: Inject trdl_channels.yaml - run: | - cp werf/trdl_channels.yaml .helm/trdl_channels.yaml - - name: Install werf uses: werf/actions/install@v2 - name: Deploy to test - if: contains(github.event.pull_request.labels.*.name, 'test website') + if: >- + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && github.event.inputs.targetEnvironment == 'test') || + (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'test website')) run: | . $(werf ci-env github --as-file) werf converge @@ -51,7 +60,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Deploy to stage - if: contains(github.event.pull_request.labels.*.name, 'stage website') + if: >- + (github.event_name == 'workflow_dispatch' && github.event.inputs.targetEnvironment == 'stage') || + (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'stage website')) run: | . $(werf ci-env github --as-file) werf converge diff --git a/.helm/templates/12-backend.yaml b/.helm/templates/12-backend.yaml index f8ea6406d..2b74d625d 100644 --- a/.helm/templates/12-backend.yaml +++ b/.helm/templates/12-backend.yaml @@ -39,6 +39,8 @@ spec: env: - name: ACTIVE_RELEASE value: {{ .Values.global.active_release | quote }} + - name: SUPPORTED_DOCS_MAJOR_VERSIONS + value: {{ join "," (pluck .Values.werf.env .Values.docsMajorRoots | first | default .Values.docsMajorRoots._default) | quote }} - name: LOG_LEVEL value: "info" {{- if ne .Values.werf.env "production" }} @@ -53,13 +55,6 @@ spec: httpGet: path: /health port: 8080 - volumeMounts: - - name: trdl-data - mountPath: /app/trdl - volumes: - - name: trdl-data - configMap: - name: trdl-data --- apiVersion: v1 kind: Service @@ -96,15 +91,3 @@ spec: selector: matchLabels: service: backend ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: trdl-data -data: - trdl_channels.yaml: | -{{- if eq .Values.werf.env "production" }} -{{ .Files.Get "trdl_channels.yaml" | indent 4 }} -{{- else }} -{{ .Files.Get "trdl_channels-dev.yaml" | indent 4 }} -{{- end }} diff --git a/.helm/templates/_rewrites.tpl b/.helm/templates/_rewrites.tpl index c02fac529..19d824be4 100644 --- a/.helm/templates/_rewrites.tpl +++ b/.helm/templates/_rewrites.tpl @@ -1,5 +1,11 @@ # SHOULD BE IN SYNC WITH github.com/werf/werf/docs/.helm/templates/_rewrites.tpl {{- define "rewrites" }} +{{- $currentDocsMajor := printf "v%s" (.Values.global.active_release | default "2") }} +{{- $docsVersionPattern := "v\\d+(?:\\.\\d+(?:\\.\\d+(?:[^/]+)?)?)?|latest|pr-\\d+" }} +{{- $docsV2VersionPattern := "v2(?:\\.\\d+(?:\\.\\d+(?:[^/]+)?)?)?|latest|pr-\\d+" }} +{{- $docsV12VersionPattern := "v1(?:\\.2(?:\\.\\d+(?:[^/]+)?)?)?" }} +{{- $docsV11VersionPattern := "v1\\.1(?:\\.\\d+(?:[^/]+)?)?" }} +{{- $docsV1LegacyVersionPattern := "v1(?:\\.[12](?:\\.\\d+(?:[^/]+)?)?)?" }} ############################################ # Normalize urls @@ -10,63 +16,67 @@ rewrite ^/css/(?.+) rewrite ^/images/(?.+) /assets/images/$tail redirect; rewrite ^/docs\.html$ /docs/ redirect; -rewrite ^/docs/(?v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)$ /docs/$ver/ redirect; -rewrite ^/docs/(?v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/index\.html$ /docs/$ver/ redirect; -rewrite ^/(?v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/docs\.html$ /docs/$ver/ redirect; -rewrite ^/(?v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/docs/?$ /docs/$ver/ redirect; -rewrite ^/(?v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/docs/(?.+) /docs/$ver/$tail redirect; +rewrite ^/docs/(?{{ $docsVersionPattern }})$ /docs/$ver/ redirect; +rewrite ^/docs/(?{{ $docsVersionPattern }})/index\.html$ /docs/$ver/ redirect; +rewrite ^/(?{{ $docsVersionPattern }})/docs\.html$ /docs/$ver/ redirect; +rewrite ^/(?{{ $docsVersionPattern }})/docs/?$ /docs/$ver/ redirect; +rewrite ^/(?{{ $docsVersionPattern }})/docs/(?.+) /docs/$ver/$tail redirect; rewrite ^/documentation\.html$ /docs/ redirect; rewrite ^/documentation/?$ /docs/ redirect; -rewrite ^/documentation/(?v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/?$ /docs/$ver/ redirect; -rewrite ^/documentation/(?v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/index\.html$ /docs/$ver/ redirect; -rewrite ^/documentation/(?v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/(?.+) /docs/$ver/$tail redirect; -rewrite ^/(?v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/documentation\.html$ /docs/$ver/ redirect; -rewrite ^/(?v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/documentation/?$ /docs/$ver/ redirect; -rewrite ^/(?v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/documentation/(?.+) /docs/$ver/$tail redirect; +rewrite ^/documentation/(?{{ $docsVersionPattern }})/?$ /docs/$ver/ redirect; +rewrite ^/documentation/(?{{ $docsVersionPattern }})/index\.html$ /docs/$ver/ redirect; +rewrite ^/documentation/(?{{ $docsVersionPattern }})/(?.+) /docs/$ver/$tail redirect; +rewrite ^/(?{{ $docsVersionPattern }})/documentation\.html$ /docs/$ver/ redirect; +rewrite ^/(?{{ $docsVersionPattern }})/documentation/?$ /docs/$ver/ redirect; +rewrite ^/(?{{ $docsVersionPattern }})/documentation/(?.+) /docs/$ver/$tail redirect; -rewrite ^/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/how_to/?$ /docs/$ver/how_to/ redirect; -rewrite ^/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/how_to/(?.+) /docs/$ver/how_to/$tail redirect; +rewrite ^/(?{{ $docsV11VersionPattern }})/how_to/?$ /docs/$ver/how_to/ redirect; +rewrite ^/(?{{ $docsV11VersionPattern }})/how_to/(?.+) /docs/$ver/how_to/$tail redirect; ############################################ # Temporary versioned redirects ############################################ -rewrite ^/docs/?$ /docs/v2/ redirect; -rewrite ^/docs/(?!(v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/)(?:.+) /docs/v2/ redirect; - -rewrite ^/docs/(?v2(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/?$ /docs/$ver/usage/project_configuration/overview.html redirect; -rewrite ^/docs/(?v2(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/usage/?$ /docs/$ver/usage/project_configuration/overview.html redirect; -rewrite ^/docs/(?v2(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/usage/project_configuration/?$ /docs/$ver/usage/project_configuration/overview.html redirect; -rewrite ^/docs/(?v2(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/usage/build/?$ /docs/$ver/usage/build/overview.html redirect; -rewrite ^/docs/(?v2(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/usage/build/stapel/?$ /docs/$ver/usage/build/stapel/overview.html redirect; -rewrite ^/docs/(?v2(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/usage/deploy/?$ /docs/$ver/usage/deploy/overview.html redirect; -rewrite ^/docs/(?v2(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/usage/distribute/?$ /docs/$ver/usage/distribute/overview.html redirect; -rewrite ^/docs/(?v2(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/usage/cleanup/?$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; -rewrite ^/docs/(?v2(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/reference/?$ /docs/$ver/reference/werf_yaml.html redirect; -rewrite ^/docs/(?v2(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/reference/cli/?$ /docs/$ver/reference/cli/overview.html redirect; -rewrite ^/docs/(?v2(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/resources/?$ /docs/$ver/resources/cheat_sheet.html redirect; - -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/?$ /docs/$ver/usage/project_configuration/overview.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/usage/?$ /docs/$ver/usage/project_configuration/overview.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/usage/project_configuration/?$ /docs/$ver/usage/project_configuration/overview.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/usage/build/?$ /docs/$ver/usage/build/overview.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/usage/build/stapel/?$ /docs/$ver/usage/build/stapel/overview.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/usage/deploy/?$ /docs/$ver/usage/deploy/overview.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/usage/distribute/?$ /docs/$ver/usage/distribute/overview.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/usage/cleanup/?$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/?$ /docs/$ver/reference/werf_yaml.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/cli/?$ /docs/$ver/reference/cli/overview.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/resources/?$ /docs/$ver/resources/cheat_sheet.html redirect; - -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/?$ /docs/$ver/index.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/configuration/?$ /docs/$ver/configuration/introduction.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/configuration/stapel_image/?$ /docs/$ver/configuration/stapel_image/naming.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/?$ /docs/$ver/reference/stages_and_images.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/deploy_process/?$ /docs/$ver/reference/deploy_process/deploy_into_kubernetes.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/plugging_into_cicd/?$ /docs/$ver/reference/plugging_into_cicd/overview.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/development_and_debug/?$ /docs/$ver/reference/development_and_debug/setup_minikube.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/toolbox/?$ /docs/$ver/reference/toolbox/slug.html redirect; +rewrite ^/docs/?$ /docs/{{ $currentDocsMajor }}/ redirect; +rewrite ^/docs/latest/?$ /docs/{{ $currentDocsMajor }}/ redirect; +rewrite ^/docs/latest/(?.+)$ /docs/{{ $currentDocsMajor }}/$tail redirect; +rewrite ^/docs/(?v2)-(?:alpha|beta|ea|stable|rock-solid)/?(?.*)$ /docs/$major/$tail redirect; +rewrite ^/docs/(?v[12])(?:\.[^/]+)+/?(?.*)$ /docs/$major/$tail redirect; +rewrite ^/docs/(?!(?:{{ $docsVersionPattern }})/)(?:.+) /docs/{{ $currentDocsMajor }}/ redirect; + +rewrite ^/docs/(?{{ $docsV2VersionPattern }})/?$ /docs/$ver/usage/project_configuration/overview.html redirect; +rewrite ^/docs/(?{{ $docsV2VersionPattern }})/usage/?$ /docs/$ver/usage/project_configuration/overview.html redirect; +rewrite ^/docs/(?{{ $docsV2VersionPattern }})/usage/project_configuration/?$ /docs/$ver/usage/project_configuration/overview.html redirect; +rewrite ^/docs/(?{{ $docsV2VersionPattern }})/usage/build/?$ /docs/$ver/usage/build/overview.html redirect; +rewrite ^/docs/(?{{ $docsV2VersionPattern }})/usage/build/stapel/?$ /docs/$ver/usage/build/stapel/overview.html redirect; +rewrite ^/docs/(?{{ $docsV2VersionPattern }})/usage/deploy/?$ /docs/$ver/usage/deploy/overview.html redirect; +rewrite ^/docs/(?{{ $docsV2VersionPattern }})/usage/distribute/?$ /docs/$ver/usage/distribute/overview.html redirect; +rewrite ^/docs/(?{{ $docsV2VersionPattern }})/usage/cleanup/?$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; +rewrite ^/docs/(?{{ $docsV2VersionPattern }})/reference/?$ /docs/$ver/reference/werf_yaml.html redirect; +rewrite ^/docs/(?{{ $docsV2VersionPattern }})/reference/cli/?$ /docs/$ver/reference/cli/overview.html redirect; +rewrite ^/docs/(?{{ $docsV2VersionPattern }})/resources/?$ /docs/$ver/resources/cheat_sheet.html redirect; + +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/?$ /docs/$ver/usage/project_configuration/overview.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/usage/?$ /docs/$ver/usage/project_configuration/overview.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/usage/project_configuration/?$ /docs/$ver/usage/project_configuration/overview.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/usage/build/?$ /docs/$ver/usage/build/overview.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/usage/build/stapel/?$ /docs/$ver/usage/build/stapel/overview.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/usage/deploy/?$ /docs/$ver/usage/deploy/overview.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/usage/distribute/?$ /docs/$ver/usage/distribute/overview.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/usage/cleanup/?$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/?$ /docs/$ver/reference/werf_yaml.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/cli/?$ /docs/$ver/reference/cli/overview.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/resources/?$ /docs/$ver/resources/cheat_sheet.html redirect; + +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/?$ /docs/$ver/index.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/configuration/?$ /docs/$ver/configuration/introduction.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/configuration/stapel_image/?$ /docs/$ver/configuration/stapel_image/naming.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/?$ /docs/$ver/reference/stages_and_images.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/deploy_process/?$ /docs/$ver/reference/deploy_process/deploy_into_kubernetes.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/plugging_into_cicd/?$ /docs/$ver/reference/plugging_into_cicd/overview.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/development_and_debug/?$ /docs/$ver/reference/development_and_debug/setup_minikube.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/toolbox/?$ /docs/$ver/reference/toolbox/slug.html redirect; ############################################ # Redirects for moved or deleted urls @@ -82,174 +92,174 @@ rewrite ^/introduction\.html$ # v1.1/v1.2 redirects for moved or deleted urls ############################################ -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/quickstart\.html$ /docs/$ver/ redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/using_with_ci_cd_systems\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; - -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/supported_registry_implementations\.html$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/buildah_mode\.html$ /docs/$ver/usage/build/process.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/building_images_with_stapel/artifacts\.html$ /docs/$ver/usage/build/stapel/imports.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/building_images_with_stapel/assembly_instructions\.html$ /docs/$ver/usage/build/stapel/instructions.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/building_images_with_stapel/base_image\.html$ /docs/$ver/usage/build/stapel/base.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/building_images_with_stapel/docker_directive\.html$ /docs/$ver/usage/build/stapel/dockerfile.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/building_images_with_stapel/git_directive\.html$ /docs/$ver/usage/build/stapel/git.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/building_images_with_stapel/import_directive\.html$ /docs/$ver/usage/build/stapel/imports.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/building_images_with_stapel/mount_directive\.html$ /docs/$ver/usage/build/stapel/mounts.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/bundles\.html$ /docs/$ver/usage/distribute/bundles.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/ci_cd_workflow_basics\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/generic_ci_cd_integration\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/github_actions\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/gitlab_ci_cd\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/run_in_container/run_in_docker_container\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/run_in_container/run_in_kubernetes\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/run_in_container/use_docker_container\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/run_in_container/use_github_actions_with_docker_executor\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/run_in_container/use_github_actions_with_kubernetes_executor\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/run_in_container/use_gitlab_ci_cd_with_docker_executor\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/run_in_container/use_gitlab_ci_cd_with_kubernetes_executor\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/run_in_container/use_kubernetes\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/werf_with_argocd/ci_cd_flow_overview\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/werf_with_argocd/configure_ci_cd\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/ci_cd/werf_with_argocd/prepare_kubernetes_cluster\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/cleanup\.html$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/configuration/giterminism\.html$ /docs/$ver/usage/project_configuration/giterminism.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/configuration/organizing_configuration\.html$ /docs/$ver/usage/project_configuration/werf_yaml_template_engine.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/configuration/supported_go_templates\.html$ /docs/$ver/usage/project_configuration/werf_yaml_template_engine.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/development_and_debug/stage_introspection\.html$ /docs/$ver/usage/build/stapel/base.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/giterminism\.html$ /docs/$ver/usage/project_configuration/giterminism.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/configuration/chart\.html$ /docs/$ver/usage/deploy/charts.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/configuration/chart_dependencies\.html$ /docs/$ver/usage/deploy/charts.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/configuration/giterminism\.html$ /docs/$ver/usage/project_configuration/giterminism.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/configuration/secrets\.html$ /docs/$ver/usage/deploy/values.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/configuration/templates\.html$ /docs/$ver/usage/deploy/templates.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/configuration/values\.html$ /docs/$ver/usage/deploy/values.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/deploy_process/annotating_and_labeling\.html$ /docs/$ver/usage/deploy/releases.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/deploy_process/deployment_order\.html$ /docs/$ver/usage/deploy/deployment_order.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/deploy_process/external_dependencies\.html$ /docs/$ver/usage/deploy/deployment_order.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/deploy_process/helm_hooks\.html$ /docs/$ver/usage/deploy/deployment_order.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/deploy_process/resources_adoption\.html$ /docs/$ver/usage/deploy/releases.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/deploy_process/steps\.html$ /docs/$ver/usage/deploy/deployment_order.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/overview\.html$ /docs/$ver/usage/deploy/overview.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/releases/manage_releases\.html$ /docs/$ver/usage/deploy/releases.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/releases/naming\.html$ /docs/$ver/usage/deploy/releases.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/releases/release\.html$ /docs/$ver/usage/deploy/releases.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/working_with_chart_dependencies\.html$ /docs/$ver/usage/deploy/charts.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/helm/working_with_secrets\.html$ /docs/$ver/usage/deploy/values.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/storage_layouts\.html$ /docs/$ver/usage/build/process.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/supported_container_registries\.html$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/advanced/synchronization\.html$ /docs/$ver/usage/build/process.html redirect; - -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/internals/build_process\.html$ /docs/$ver/usage/build/process.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/internals/development/stapel_image\.html$ /docs/$ver/usage/build/stapel/base.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/internals/how_ci_cd_integration_works/general_overview\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/internals/how_ci_cd_integration_works/github_actions\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/internals/how_ci_cd_integration_works/gitlab_ci_cd\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/internals/integration_with_ssh_agent\.html$ /docs/$ver/usage/build/stapel/base.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/internals/stages_and_storage\.html$ /docs/$ver/usage/build/process.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/internals/telemetry\.html$ /docs/$ver/resources/telemetry.html redirect; - -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/reference/build/artifact\.html$ /docs/$ver/usage/build/stapel/imports.html redirect; -rewrite ^/docs/(?v1\.[12](?:\.\d+(?:[^/]+)?)?|latest)/reference/cheat_sheet\.html$ /docs/$ver/resources/cheat_sheet.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/quickstart\.html$ /docs/$ver/ redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/using_with_ci_cd_systems\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; + +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/supported_registry_implementations\.html$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/buildah_mode\.html$ /docs/$ver/usage/build/process.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/building_images_with_stapel/artifacts\.html$ /docs/$ver/usage/build/stapel/imports.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/building_images_with_stapel/assembly_instructions\.html$ /docs/$ver/usage/build/stapel/instructions.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/building_images_with_stapel/base_image\.html$ /docs/$ver/usage/build/stapel/base.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/building_images_with_stapel/docker_directive\.html$ /docs/$ver/usage/build/stapel/dockerfile.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/building_images_with_stapel/git_directive\.html$ /docs/$ver/usage/build/stapel/git.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/building_images_with_stapel/import_directive\.html$ /docs/$ver/usage/build/stapel/imports.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/building_images_with_stapel/mount_directive\.html$ /docs/$ver/usage/build/stapel/mounts.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/bundles\.html$ /docs/$ver/usage/distribute/bundles.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/ci_cd_workflow_basics\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/generic_ci_cd_integration\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/github_actions\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/gitlab_ci_cd\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/run_in_container/run_in_docker_container\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/run_in_container/run_in_kubernetes\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/run_in_container/use_docker_container\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/run_in_container/use_github_actions_with_docker_executor\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/run_in_container/use_github_actions_with_kubernetes_executor\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/run_in_container/use_gitlab_ci_cd_with_docker_executor\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/run_in_container/use_gitlab_ci_cd_with_kubernetes_executor\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/run_in_container/use_kubernetes\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/werf_with_argocd/ci_cd_flow_overview\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/werf_with_argocd/configure_ci_cd\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/ci_cd/werf_with_argocd/prepare_kubernetes_cluster\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/cleanup\.html$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/configuration/giterminism\.html$ /docs/$ver/usage/project_configuration/giterminism.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/configuration/organizing_configuration\.html$ /docs/$ver/usage/project_configuration/werf_yaml_template_engine.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/configuration/supported_go_templates\.html$ /docs/$ver/usage/project_configuration/werf_yaml_template_engine.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/development_and_debug/stage_introspection\.html$ /docs/$ver/usage/build/stapel/base.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/giterminism\.html$ /docs/$ver/usage/project_configuration/giterminism.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/configuration/chart\.html$ /docs/$ver/usage/deploy/charts.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/configuration/chart_dependencies\.html$ /docs/$ver/usage/deploy/charts.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/configuration/giterminism\.html$ /docs/$ver/usage/project_configuration/giterminism.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/configuration/secrets\.html$ /docs/$ver/usage/deploy/values.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/configuration/templates\.html$ /docs/$ver/usage/deploy/templates.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/configuration/values\.html$ /docs/$ver/usage/deploy/values.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/deploy_process/annotating_and_labeling\.html$ /docs/$ver/usage/deploy/releases.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/deploy_process/deployment_order\.html$ /docs/$ver/usage/deploy/deployment_order.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/deploy_process/external_dependencies\.html$ /docs/$ver/usage/deploy/deployment_order.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/deploy_process/helm_hooks\.html$ /docs/$ver/usage/deploy/deployment_order.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/deploy_process/resources_adoption\.html$ /docs/$ver/usage/deploy/releases.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/deploy_process/steps\.html$ /docs/$ver/usage/deploy/deployment_order.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/overview\.html$ /docs/$ver/usage/deploy/overview.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/releases/manage_releases\.html$ /docs/$ver/usage/deploy/releases.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/releases/naming\.html$ /docs/$ver/usage/deploy/releases.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/releases/release\.html$ /docs/$ver/usage/deploy/releases.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/working_with_chart_dependencies\.html$ /docs/$ver/usage/deploy/charts.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/helm/working_with_secrets\.html$ /docs/$ver/usage/deploy/values.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/storage_layouts\.html$ /docs/$ver/usage/build/process.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/supported_container_registries\.html$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/advanced/synchronization\.html$ /docs/$ver/usage/build/process.html redirect; + +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/internals/build_process\.html$ /docs/$ver/usage/build/process.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/internals/development/stapel_image\.html$ /docs/$ver/usage/build/stapel/base.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/internals/how_ci_cd_integration_works/general_overview\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/internals/how_ci_cd_integration_works/github_actions\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/internals/how_ci_cd_integration_works/gitlab_ci_cd\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/internals/integration_with_ssh_agent\.html$ /docs/$ver/usage/build/stapel/base.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/internals/stages_and_storage\.html$ /docs/$ver/usage/build/process.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/internals/telemetry\.html$ /docs/$ver/resources/telemetry.html redirect; + +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/reference/build/artifact\.html$ /docs/$ver/usage/build/stapel/imports.html redirect; +rewrite ^/docs/(?{{ $docsV1LegacyVersionPattern }})/reference/cheat_sheet\.html$ /docs/$ver/resources/cheat_sheet.html redirect; ############################################ # v1.2 redirects for moved or deleted urls ############################################ -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/configurator\.html$ /docs/$ver/getting_started/ redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/configurator/?$ /docs/$ver/getting_started/ redirect; - -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/configuration/cleanup\.html$ /docs/$ver/reference/werf_yaml.html#cleanup redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/configuration/deploy_into_kubernetes\.html$ /docs/$ver/reference/werf_yaml.html#deploy redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/configuration/dockerfile_image\.html$ /docs/$ver/reference/werf_yaml.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/configuration/introduction\.html$ /docs/$ver/reference/werf_yaml.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/configuration/stapel_artifact\.html$ /docs/$ver/usage/build/stapel/imports.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/configuration/stapel_image/image_directives\.html$ /docs/$ver/reference/werf_yaml.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/configuration/stapel_image/naming\.html$ /docs/$ver/reference/werf_yaml.html#image-section redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/configuration/stapel_image/(?.+) /docs/$ver/advanced/building_images_with_stapel/$tail redirect; - -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/cli/main/(?.+) /docs/$ver/reference/cli/werf_$tail redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/cli/management/(?[^/]+)/(?[^/]+)$ /docs/$ver/reference/cli/werf_${tail1}_${tail2} redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/cli/management/(?[^/]+)/(?[^/]+)/(?[^/]+)$ /docs/$ver/reference/cli/werf_${tail1}_${tail2}_${tail3} redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/cli/management/(?[^/]+)/(?[^/]+)/(?[^/]+)/(?[^/]+)$ /docs/$ver/reference/cli/werf_${tail1}_${tail2}_${tail3}_${tail4} redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/cli/other/(?.+) /docs/$ver/reference/cli/werf_$tail redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/cli/toolbox/(?.+) /docs/$ver/reference/cli/werf_$tail redirect; - -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/development/stapel\.html$ /docs/$ver/usage/build/stapel/base.html redirect; - -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/guides/advanced_build/artifacts\.html$ /guides.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/guides/advanced_build/first_application\.html$ /guides.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/guides/advanced_build/mounts\.html$ /guides.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/guides/advanced_build/multi_images\.html$ /guides.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/guides/deploy_into_kubernetes\.html$ /docs/$ver/quickstart.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/guides/generic_ci_cd_integration\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/guides/getting_started\.html$ /docs/$ver/quickstart.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/guides/github_ci_cd_integration\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/guides/gitlab_ci_cd_integration\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/guides/installation\.html$ /docs/$ver/ redirect; - -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/build_process\.html$ /docs/$ver/usage/build/process.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/ci_cd_workflows_overview\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/cleaning_process\.html$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/deploy_process/deploy_into_kubernetes\.html$ /docs/$ver/usage/deploy/overview.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/deploy_process/working_with_chart_dependencies\.html$ /docs/$ver/usage/deploy/charts.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/development_and_debug/lint_and_render_chart\.html$ /docs/$ver/ redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/development_and_debug/stage_introspection\.html$ /docs/$ver/usage/build/stapel/base.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/plugging_into_cicd/gitlab_ci\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/plugging_into_cicd/overview\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/stages_and_images\.html$ /docs/$ver/usage/build/process.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/toolbox/slug\.html$ /docs/$ver/ redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/toolbox/ssh\.html$ /docs/$ver/usage/build/stapel/base.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/working_with_docker_registries\.html$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/reference/werf_yaml_template_engine\.html$ /docs/$ver/usage/project_configuration/werf_yaml_template_engine.html redirect; - -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/whats_new_in_v1_2/changelog\.html$ /docs/$ver/resources/how_to_migrate_from_v1_1_to_v1_2.html redirect; -rewrite ^/docs/(?v1\.2(?:\.\d+(?:[^/]+)?)?|latest)/whats_new_in_v1_2/how_to_migrate_from_v1_1_to_v1_2\.html$ /docs/$ver/resources/how_to_migrate_from_v1_1_to_v1_2.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/configurator\.html$ /docs/$ver/getting_started/ redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/configurator/?$ /docs/$ver/getting_started/ redirect; + +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/configuration/cleanup\.html$ /docs/$ver/reference/werf_yaml.html#cleanup redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/configuration/deploy_into_kubernetes\.html$ /docs/$ver/reference/werf_yaml.html#deploy redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/configuration/dockerfile_image\.html$ /docs/$ver/reference/werf_yaml.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/configuration/introduction\.html$ /docs/$ver/reference/werf_yaml.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/configuration/stapel_artifact\.html$ /docs/$ver/usage/build/stapel/imports.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/configuration/stapel_image/image_directives\.html$ /docs/$ver/reference/werf_yaml.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/configuration/stapel_image/naming\.html$ /docs/$ver/reference/werf_yaml.html#image-section redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/configuration/stapel_image/(?.+) /docs/$ver/advanced/building_images_with_stapel/$tail redirect; + +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/cli/main/(?.+) /docs/$ver/reference/cli/werf_$tail redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/cli/management/(?[^/]+)/(?[^/]+)$ /docs/$ver/reference/cli/werf_${tail1}_${tail2} redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/cli/management/(?[^/]+)/(?[^/]+)/(?[^/]+)$ /docs/$ver/reference/cli/werf_${tail1}_${tail2}_${tail3} redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/cli/management/(?[^/]+)/(?[^/]+)/(?[^/]+)/(?[^/]+)$ /docs/$ver/reference/cli/werf_${tail1}_${tail2}_${tail3}_${tail4} redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/cli/other/(?.+) /docs/$ver/reference/cli/werf_$tail redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/cli/toolbox/(?.+) /docs/$ver/reference/cli/werf_$tail redirect; + +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/development/stapel\.html$ /docs/$ver/usage/build/stapel/base.html redirect; + +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/guides/advanced_build/artifacts\.html$ /guides.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/guides/advanced_build/first_application\.html$ /guides.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/guides/advanced_build/mounts\.html$ /guides.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/guides/advanced_build/multi_images\.html$ /guides.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/guides/deploy_into_kubernetes\.html$ /docs/$ver/quickstart.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/guides/generic_ci_cd_integration\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/guides/getting_started\.html$ /docs/$ver/quickstart.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/guides/github_ci_cd_integration\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/guides/gitlab_ci_cd_integration\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/guides/installation\.html$ /docs/$ver/ redirect; + +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/build_process\.html$ /docs/$ver/usage/build/process.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/ci_cd_workflows_overview\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/cleaning_process\.html$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/deploy_process/deploy_into_kubernetes\.html$ /docs/$ver/usage/deploy/overview.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/deploy_process/working_with_chart_dependencies\.html$ /docs/$ver/usage/deploy/charts.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/development_and_debug/lint_and_render_chart\.html$ /docs/$ver/ redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/development_and_debug/stage_introspection\.html$ /docs/$ver/usage/build/stapel/base.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/plugging_into_cicd/gitlab_ci\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/plugging_into_cicd/overview\.html$ /docs/$ver/usage/integration_with_ci_cd_systems.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/stages_and_images\.html$ /docs/$ver/usage/build/process.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/toolbox/slug\.html$ /docs/$ver/ redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/toolbox/ssh\.html$ /docs/$ver/usage/build/stapel/base.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/working_with_docker_registries\.html$ /docs/$ver/usage/cleanup/cr_cleanup.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/reference/werf_yaml_template_engine\.html$ /docs/$ver/usage/project_configuration/werf_yaml_template_engine.html redirect; + +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/whats_new_in_v1_2/changelog\.html$ /docs/$ver/resources/how_to_migrate_from_v1_1_to_v1_2.html redirect; +rewrite ^/docs/(?{{ $docsV12VersionPattern }})/whats_new_in_v1_2/how_to_migrate_from_v1_1_to_v1_2\.html$ /docs/$ver/resources/how_to_migrate_from_v1_1_to_v1_2.html redirect; ############################################ # v1.1 redirects for moved or deleted urls ############################################ -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/quickstart\.html$ /docs/$ver/guides/getting_started.html redirect; - -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/how_to/?$ /docs/$ver/guides/ redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/how_to/mounts\.html$ /docs/$ver/guides/advanced_build/mounts.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/how_to/multi_images\.html$ /docs/$ver/guides/advanced_build/multi_images.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/how_to/artifacts\.html$ /docs/$ver/guides/advanced_build/artifacts.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/how_to/(?.+) /docs/$ver/guides/$tail redirect; - -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/guides/guides/unsupported_ci_cd_integration\.html$ /docs/$ver/guides/generic_ci_cd_integration.html redirect; - -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/cli/?$ /docs/$ver/reference/cli/ redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/cli/management/helm/get_release\.html$ /docs/$ver/reference/cli/werf_helm_get_release.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/cli/toolbox/meta/get_helm_release\.html$ /docs/$ver/reference/cli/werf_helm_get_release.html redirect; - -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/configuration/stapel_image/assembly_process\.html$ /docs/$ver/configuration/stapel_image/assembly_instructions.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/configuration/stapel_image/image_from_dockerfile\.html$ /docs/$ver/configuration/dockerfile_image.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/configuration/stapel_image/stage_introspection\.html$ /docs/$ver/advanced/development_and_debug/stage_introspection.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/configuration/stapel_image/stages\.html$ /docs/$ver/reference/stages_and_images.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/configuration/stapel_image/stages_and_images\.html$ /docs/$ver/internals/stages_and_storage.html redirect; - -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/cleanup_process\.html$ /docs/$ver/reference/cleaning_process.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/config\.html$ /docs/$ver/configuration/introduction.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/stages_and_images\.html$ /docs/$ver/internals/stages_and_storage.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/build/as_layers\.html$ /docs/$ver/reference/development_and_debug/as_layers.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/build/stage_introspection\.html$ /docs/$ver/reference/development_and_debug/stage_introspection.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/build/(?.+) /docs/$ver/configuration/stapel_image/$tail redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/deploy/chart_configuration\.html$ /docs/$ver/reference/deploy_process/deploy_into_kubernetes.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/deploy/deploy_to_kubernetes\.html$ /docs/$ver/reference/deploy_process/deploy_into_kubernetes.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/deploy/minikube\.html$ /docs/$ver/reference/development_and_debug/setup_minikube.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/deploy/secrets\.html$ /docs/$ver/reference/deploy_process/working_with_secrets.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/deploy/track_kubernetes_resources\.html$ /docs/$ver/reference/deploy_process/differences_with_helm.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/development_and_debug/stage_introspection\.html$ /docs/$ver/advanced/development_and_debug/stage_introspection.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/local_development/as_layers\.html$ /docs/$ver/reference/development_and_debug/as_layers.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/local_development/installing_minikube\.html$ /docs/$ver/reference/development_and_debug/setup_minikube.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/local_development/lint_and_render_chart\.html$ /docs/$ver/reference/development_and_debug/lint_and_render_chart.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/local_development/setup_minikube\.html$ /docs/$ver/reference/development_and_debug/setup_minikube.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/local_development/stage_introspection\.html$ /docs/$ver/reference/development_and_debug/stage_introspection.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/registry/authorization\.html$ /docs/$ver/reference/registry_authorization.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/registry/cleaning\.html$ /docs/$ver/reference/cleaning_process.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/registry/image_naming\.html$ /docs/$ver/reference/stages_and_images.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/registry/publish\.html$ /docs/$ver/reference/publish_process.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/registry/push\.html$ /docs/$ver/reference/publish_process.html redirect; -rewrite ^/docs/(?v1\.1(?:\.\d+(?:[^/]+)?)?|latest)/reference/registry/tag\.html$ /docs/$ver/reference/publish_process.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/quickstart\.html$ /docs/$ver/guides/getting_started.html redirect; + +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/how_to/?$ /docs/$ver/guides/ redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/how_to/mounts\.html$ /docs/$ver/guides/advanced_build/mounts.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/how_to/multi_images\.html$ /docs/$ver/guides/advanced_build/multi_images.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/how_to/artifacts\.html$ /docs/$ver/guides/advanced_build/artifacts.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/how_to/(?.+) /docs/$ver/guides/$tail redirect; + +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/guides/guides/unsupported_ci_cd_integration\.html$ /docs/$ver/guides/generic_ci_cd_integration.html redirect; + +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/cli/?$ /docs/$ver/reference/cli/ redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/cli/management/helm/get_release\.html$ /docs/$ver/reference/cli/werf_helm_get_release.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/cli/toolbox/meta/get_helm_release\.html$ /docs/$ver/reference/cli/werf_helm_get_release.html redirect; + +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/configuration/stapel_image/assembly_process\.html$ /docs/$ver/configuration/stapel_image/assembly_instructions.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/configuration/stapel_image/image_from_dockerfile\.html$ /docs/$ver/configuration/dockerfile_image.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/configuration/stapel_image/stage_introspection\.html$ /docs/$ver/advanced/development_and_debug/stage_introspection.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/configuration/stapel_image/stages\.html$ /docs/$ver/reference/stages_and_images.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/configuration/stapel_image/stages_and_images\.html$ /docs/$ver/internals/stages_and_storage.html redirect; + +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/cleanup_process\.html$ /docs/$ver/reference/cleaning_process.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/config\.html$ /docs/$ver/configuration/introduction.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/stages_and_images\.html$ /docs/$ver/internals/stages_and_storage.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/build/as_layers\.html$ /docs/$ver/reference/development_and_debug/as_layers.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/build/stage_introspection\.html$ /docs/$ver/reference/development_and_debug/stage_introspection.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/build/(?.+) /docs/$ver/configuration/stapel_image/$tail redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/deploy/chart_configuration\.html$ /docs/$ver/reference/deploy_process/deploy_into_kubernetes.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/deploy/deploy_to_kubernetes\.html$ /docs/$ver/reference/deploy_process/deploy_into_kubernetes.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/deploy/minikube\.html$ /docs/$ver/reference/development_and_debug/setup_minikube.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/deploy/secrets\.html$ /docs/$ver/reference/deploy_process/working_with_secrets.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/deploy/track_kubernetes_resources\.html$ /docs/$ver/reference/deploy_process/differences_with_helm.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/development_and_debug/stage_introspection\.html$ /docs/$ver/advanced/development_and_debug/stage_introspection.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/local_development/as_layers\.html$ /docs/$ver/reference/development_and_debug/as_layers.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/local_development/installing_minikube\.html$ /docs/$ver/reference/development_and_debug/setup_minikube.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/local_development/lint_and_render_chart\.html$ /docs/$ver/reference/development_and_debug/lint_and_render_chart.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/local_development/setup_minikube\.html$ /docs/$ver/reference/development_and_debug/setup_minikube.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/local_development/stage_introspection\.html$ /docs/$ver/reference/development_and_debug/stage_introspection.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/registry/authorization\.html$ /docs/$ver/reference/registry_authorization.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/registry/cleaning\.html$ /docs/$ver/reference/cleaning_process.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/registry/image_naming\.html$ /docs/$ver/reference/stages_and_images.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/registry/publish\.html$ /docs/$ver/reference/publish_process.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/registry/push\.html$ /docs/$ver/reference/publish_process.html redirect; +rewrite ^/docs/(?{{ $docsV11VersionPattern }})/reference/registry/tag\.html$ /docs/$ver/reference/publish_process.html redirect; {{- end }} diff --git a/.helm/values.yaml b/.helm/values.yaml index d5eb4fed9..5ff173ef0 100644 --- a/.helm/values.yaml +++ b/.helm/values.yaml @@ -1,6 +1,11 @@ global: targetCluster: "" +docsMajorRoots: + _default: + - v2 + - v1 + imagePullSecrets: - github-werfio diff --git a/.werf/nginx-dev.conf b/.werf/nginx-dev.conf index 6aba30f0f..ca1784c4a 100644 --- a/.werf/nginx-dev.conf +++ b/.werf/nginx-dev.conf @@ -85,8 +85,24 @@ http { proxy_pass http://website-$lang; } + location = /docs { + return 302 /docs/v2/; + } + + location ~ ^/docs/latest/(?.*)$ { + return 302 /docs/v2/$tail; + } + + location ~ ^/docs/(?v2)-(?:alpha|beta|ea|stable|rock-solid)(?/.*)?$ { + return 302 /docs/$major$suffix; + } + + location ~ ^/docs/(?v[12])(?:\.[^/]+)+(?/.*)?$ { + return 302 /docs/$major$suffix; + } + location /docs/ { - rewrite ^/docs/(?v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/(?.*) /$tail break; + rewrite ^/docs/(?v\d+|pr-\d+)/(?.*) /$tail break; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; diff --git a/_includes/_common/channel-menu-v2.html b/_includes/_common/channel-menu-v2.html index e716829c5..d85ee4ff7 100644 --- a/_includes/_common/channel-menu-v2.html +++ b/_includes/_common/channel-menu-v2.html @@ -8,20 +8,12 @@ diff --git a/_includes/_common/channel-menu.html b/_includes/_common/channel-menu.html index c0aa2a2ec..d91aa4cf5 100644 --- a/_includes/_common/channel-menu.html +++ b/_includes/_common/channel-menu.html @@ -3,22 +3,12 @@ {{ $CurrentPageURLRelative := .CurrentPageURLRelative }} diff --git a/_includes/_common/group-menu-v2.html b/_includes/_common/group-menu-v2.html index a18949f7e..fac39a91b 100644 --- a/_includes/_common/group-menu-v2.html +++ b/_includes/_common/group-menu-v2.html @@ -2,5 +2,5 @@ {{ $CurrentPageURL := .CurrentPageURL }} {{ $CurrentPageURLRelative := .CurrentPageURLRelative }} {{- $first := index .VersionItems 0 }} - + {% endraw %} diff --git a/_includes/_common/group-menu.html b/_includes/_common/group-menu.html index 477f16c8f..0b0c20372 100644 --- a/_includes/_common/group-menu.html +++ b/_includes/_common/group-menu.html @@ -3,17 +3,15 @@ {{ $CurrentPageURLRelative := .CurrentPageURLRelative }}