Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolay Gorbatov <[email protected]>
  • Loading branch information
sprait committed Nov 28, 2024
1 parent 068981d commit 9a9e07d
Show file tree
Hide file tree
Showing 20 changed files with 143 additions and 143 deletions.
2 changes: 1 addition & 1 deletion .github/ci_templates/helper_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ pull_request_info:
} else if (hasSE) {
edition = 'SE';
} else if (hasSE_plus) {
edition = 'SE+';
edition = 'SE-plus';
}
core.info(`Edition labels: 'edition/ce':${hasCE}, 'edition/ee':${hasEE}, 'edition/be':${hasBE}, 'edition/se':${hasSE}, 'edition/se+':${hasSE_plus}`);
core.notice(`Enable '${edition}' edition for '${context.eventName}' trigger.`);
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const labels = {
'e2e/use/edition/ee': { type: 'e2e-edition', edition: 'EE' },
'e2e/use/edition/be': { type: 'e2e-edition', edition: 'BE' },
'e2e/use/edition/se': { type: 'e2e-edition', edition: 'SE' },
'e2e/use/edition/se+': { type: 'e2e-edition', edition: 'SE+' },
'e2e/use/edition/se+': { type: 'e2e-edition', edition: 'SE-plus' },
'e2e/use/edition/fe': { type: 'e2e-edition', edition: 'FE' },

// Allow running workflows for external PRs.
Expand All @@ -70,7 +70,7 @@ const labels = {
'edition/ee': { type: 'edition', edition: 'EE' },
'edition/be': { type: 'edition', edition: 'BE' },
'edition/se': { type: 'edition', edition: 'SE' },
'edition/se+': { type: 'edition', edition: 'SE+' }
'edition/se+': { type: 'edition', edition: 'SE-plus' }
};
module.exports.knownLabels = labels;

Expand Down Expand Up @@ -166,6 +166,6 @@ const editions = [
'FE',
'BE',
'SE',
'SE+'
'SE-plus'
];
module.exports.knownEditions = editions;
4 changes: 2 additions & 2 deletions .github/workflow_templates/build-and-test_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ jobs:
echo Enable ${{ needs.pull_request_info.outputs.edition }}
enable_se_plus:
if: ${{ needs.pull_request_info.outputs.edition == 'SE+' }}
name: Enable SE+
if: ${{ needs.pull_request_info.outputs.edition == 'SE-plus' }}
name: Enable SE-plus
needs:
- pull_request_info
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflow_templates/build-and-test_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ jobs:
{!{ tmpl.Exec "build_template" (slice $ctx "release") | strings.Indent 4 }!}
{!{ tmpl.Exec "update_comment_on_finish" (slice "job,one-line" $jobNames.build_se) | strings.Indent 6 }!}

{!{ $jobNames = coll.Merge $jobNames (dict "build_se_plus" "Build SE+") }!}
{!{ $jobNames = coll.Merge $jobNames (dict "build_se_plus" "Build SE-plus") }!}
build_se_plus:
name: {!{ $jobNames.build_se_plus }!}
needs:
- git_info
- go_generate
- workflow_render
- build_fe
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.inputs.editions, 'se+') }}
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.inputs.editions, 'se-plus') }}
env:
WERF_ENV: "SE+"
WERF_ENV: "SE-plus"
{!{ tmpl.Exec "build_template" (slice $ctx "release") | strings.Indent 4 }!}
{!{ tmpl.Exec "update_comment_on_finish" (slice "job,one-line" $jobNames.build_se_plus) | strings.Indent 6 }!}

Expand Down
14 changes: 7 additions & 7 deletions .github/workflow_templates/deploy-channel.multi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ on:
description: 'Id of comment in issue where to put workflow run status'
required: false
editions:
description: 'Comma separated editions to deploy. Example: ee,fe,ce,be,se,se+'
description: 'Comma separated editions to deploy. Example: ee,fe,ce,be,se,se-plus'
required: false
cooldown:
description: 'Postpone release until specified datetime (YYYY-MM-DD HH:MM) UTC only. Example: 2026-06-06 16:16'
Expand All @@ -84,7 +84,7 @@ jobs:
DEPLOY_FE: ${{steps.detect_editions.outputs.DEPLOY_FE}}
DEPLOY_BE: ${{steps.detect_editions.outputs.DEPLOY_BE}}
DEPLOY_SE: ${{steps.detect_editions.outputs.DEPLOY_SE}}
DEPLOY_SE+: ${{steps.detect_editions.outputs.DEPLOY_SE+}}
DEPLOY_SE-plus: ${{steps.detect_editions.outputs.DEPLOY_SE-plus}}
steps:
- name: Detect editions
id: detect_editions
Expand All @@ -95,7 +95,7 @@ jobs:
RESTRICTED=no
for edition in CE EE FE BE SE SE+ ; do
for edition in CE EE FE BE SE SE-plus ; do
if grep -i ",${edition}," <<<",${EDITIONS}," 2>/dev/null 1>&2 ; then
echo " - enable deploy of ${edition} edition."
echo "DEPLOY_${edition}=true" >> $GITHUB_OUTPUT
Expand All @@ -105,15 +105,15 @@ jobs:
if [[ $RESTRICTED == "no" ]] ; then
echo "No restrictions. Enable deploy to all editions."
for edition in CE EE FE BE SE SE+ ; do
for edition in CE EE FE BE SE SE-plus ; do
echo "DEPLOY_${edition}=true" >> $GITHUB_OUTPUT
done
fi
{!{/*
Jobs for visual control allowed editions when approving deploy to environments.
*/}!}
{!{ range $werfEnv := slice "CE" "EE" "FE" "BE" "SE" "SE+" }!}
{!{ range $werfEnv := slice "CE" "EE" "FE" "BE" "SE" "SE-plus" }!}
enable_{!{$werfEnv}!}:
if: ${{ needs.detect_editions.outputs.DEPLOY_{!{$werfEnv}!} == 'true' }}
name: Enable {!{$werfEnv}!}
Expand Down Expand Up @@ -176,7 +176,7 @@ Jobs for visual control allowed editions when approving deploy to environments.
exit 1
fi
{!{ range $werfEnv := slice "CE" "EE" "FE" "BE" "SE" "SE+" }!}
{!{ range $werfEnv := slice "CE" "EE" "FE" "BE" "SE" "SE-plus" }!}
- name: Set cooldown for release ({!{ $werfEnv }!})
if: ${{ github.event.inputs.cooldown }}
env:
Expand Down Expand Up @@ -217,7 +217,7 @@ Registries:
Job supports running from forked or copied repo: 'ghcr.io/owner/repo'
is used if DECKHOUSE_REGISTRY_HOST is not set.
*/}!}
{!{ range $werfEnv := slice "CE" "EE" "FE" "BE" "SE" "SE+" }!}
{!{ range $werfEnv := slice "CE" "EE" "FE" "BE" "SE" "SE-plus" }!}
- name: Publish release images for {!{ $werfEnv }!}
if: ${{ needs.detect_editions.outputs.DEPLOY_{!{ $werfEnv }!} == 'true' }}
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflow_templates/suspend-channel.multi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Destination registries:
- DECKHOUSE_REGISTRY_HOST
- DEV_REGISTRY_PATH
*/}!}
{!{ range $werfEnv := slice "CE" "EE" "FE" "BE" "SE" "SE+" }!}
{!{ range $werfEnv := slice "CE" "EE" "FE" "BE" "SE" "SE-plus" }!}
- name: Publish release images for {!{ $werfEnv }!}
env:
DECKHOUSE_REGISTRY_HOST: ${{secrets.DECKHOUSE_REGISTRY_HOST}}
Expand Down Expand Up @@ -181,7 +181,7 @@ Destination registries:
# Variables
# 1. Edition and channel.
# CE/EE/FE/BE/SE/SE+ -> ce/ee/fe/be/se/se+
# CE/EE/FE/BE/SE/SE-plus -> ce/ee/fe/be/se/se-plus
REGISTRY_SUFFIX=$(echo ${WERF_ENV} | tr '[:upper:]' '[:lower:]')
RELEASE_CHANNEL={!{ $channel }!}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ jobs:
} else if (hasSE) {
edition = 'SE';
} else if (hasSE_plus) {
edition = 'SE+';
edition = 'SE-plus';
}
core.info(`Edition labels: 'edition/ce':${hasCE}, 'edition/ee':${hasEE}, 'edition/be':${hasBE}, 'edition/se':${hasSE}, 'edition/se+':${hasSE_plus}`);
core.notice(`Enable '${edition}' edition for '${context.eventName}' trigger.`);
Expand Down Expand Up @@ -416,8 +416,8 @@ jobs:
echo Enable ${{ needs.pull_request_info.outputs.edition }}
enable_se_plus:
if: ${{ needs.pull_request_info.outputs.edition == 'SE+' }}
name: Enable SE+
if: ${{ needs.pull_request_info.outputs.edition == 'SE-plus' }}
name: Enable SE-plus
needs:
- pull_request_info
runs-on: ubuntu-latest
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-and-test_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1344,15 +1344,15 @@ jobs:


build_se_plus:
name: Build SE+
name: Build SE-plus
needs:
- git_info
- go_generate
- workflow_render
- build_fe
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.inputs.editions, 'se+') }}
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.inputs.editions, 'se-plus') }}
env:
WERF_ENV: "SE+"
WERF_ENV: "SE-plus"
# <template: build_template>
runs-on: [self-hosted, regular, selectel]
outputs:
Expand Down Expand Up @@ -1649,7 +1649,7 @@ jobs:
retries: 3
script: |
const statusConfig = 'job,one-line';
const name = 'Build SE+';
const name = 'Build SE-plus';
const needsContext = JSON.parse(process.env.NEEDS_CONTEXT);
const jobContext = JSON.parse(process.env.JOB_CONTEXT);
const stepsContext = JSON.parse(process.env.STEPS_CONTEXT);
Expand Down Expand Up @@ -3720,7 +3720,7 @@ jobs:
runs-on: ubuntu-latest
env:
JOB_NAMES: |
{"build_be":"Build BE","build_ce":"Build CE","build_ee":"Build EE","build_fe":"Build FE","build_se":"Build SE","build_se_plus":"Build SE+","deploy_latest_web_doc_prod_sel":"(Prod) Deploy latest doc","deploy_latest_web_site_prod_sel":"(Prod) Deploy latest site","dhctl_tests":"Dhctl Tests","doc_web_build":"Doc web build","go_generate":"Go Generate","golangci_lint":"GolangCI Lint","main_web_build":"Main web build","matrix_tests":"Matrix tests","openapi_test_cases":"OpenAPI Test Cases","tests":"Tests","validators":"Validators","web_links_test":"Web links test","workflow_render":"Render workflow"}
{"build_be":"Build BE","build_ce":"Build CE","build_ee":"Build EE","build_fe":"Build FE","build_se":"Build SE","build_se_plus":"Build SE-plus","deploy_latest_web_doc_prod_sel":"(Prod) Deploy latest doc","deploy_latest_web_site_prod_sel":"(Prod) Deploy latest site","dhctl_tests":"Dhctl Tests","doc_web_build":"Doc web build","go_generate":"Go Generate","golangci_lint":"GolangCI Lint","main_web_build":"Main web build","matrix_tests":"Matrix tests","openapi_test_cases":"OpenAPI Test Cases","tests":"Tests","validators":"Validators","web_links_test":"Web links test","workflow_render":"Render workflow"}
steps:

# <template: checkout_step>
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/deploy-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
description: 'Id of comment in issue where to put workflow run status'
required: false
editions:
description: 'Comma separated editions to deploy. Example: ee,fe,ce,be,se,se+'
description: 'Comma separated editions to deploy. Example: ee,fe,ce,be,se,se-plus'
required: false
cooldown:
description: 'Postpone release until specified datetime (YYYY-MM-DD HH:MM) UTC only. Example: 2026-06-06 16:16'
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
DEPLOY_FE: ${{steps.detect_editions.outputs.DEPLOY_FE}}
DEPLOY_BE: ${{steps.detect_editions.outputs.DEPLOY_BE}}
DEPLOY_SE: ${{steps.detect_editions.outputs.DEPLOY_SE}}
DEPLOY_SE+: ${{steps.detect_editions.outputs.DEPLOY_SE+}}
DEPLOY_SE-plus: ${{steps.detect_editions.outputs.DEPLOY_SE-plus}}
steps:
- name: Detect editions
id: detect_editions
Expand All @@ -151,7 +151,7 @@ jobs:
RESTRICTED=no
for edition in CE EE FE BE SE SE+ ; do
for edition in CE EE FE BE SE SE-plus ; do
if grep -i ",${edition}," <<<",${EDITIONS}," 2>/dev/null 1>&2 ; then
echo " - enable deploy of ${edition} edition."
echo "DEPLOY_${edition}=true" >> $GITHUB_OUTPUT
Expand All @@ -161,7 +161,7 @@ jobs:
if [[ $RESTRICTED == "no" ]] ; then
echo "No restrictions. Enable deploy to all editions."
for edition in CE EE FE BE SE SE+ ; do
for edition in CE EE FE BE SE SE-plus ; do
echo "DEPLOY_${edition}=true" >> $GITHUB_OUTPUT
done
fi
Expand Down Expand Up @@ -213,14 +213,14 @@ jobs:
steps:
- run: ": Enable SE"

enable_SE+:
if: ${{ needs.detect_editions.outputs.DEPLOY_SE+ == 'true' }}
name: Enable SE+
enable_SE-plus:
if: ${{ needs.detect_editions.outputs.DEPLOY_SE-plus == 'true' }}
name: Enable SE-plus
needs:
- detect_editions
runs-on: ubuntu-latest
steps:
- run: ": Enable SE+"
- run: ": Enable SE-plus"


run_deploy:
Expand Down Expand Up @@ -473,12 +473,12 @@ jobs:
echo "⚓️ 📤 [$(date -u)] Push '${SOURCE_RELEASE_VERSION_IMAGE}' image with cooldown."
docker image push ${SOURCE_RELEASE_VERSION_IMAGE}
- name: Set cooldown for release (SE+)
- name: Set cooldown for release (SE-plus)
if: ${{ github.event.inputs.cooldown }}
env:
DECKHOUSE_REGISTRY_HOST: ${{secrets.DECKHOUSE_REGISTRY_HOST}}
CI_COMMIT_TAG: ${{needs.git_info.outputs.ci_commit_tag}}
WERF_ENV: SE+
WERF_ENV: SE-plus
COOLDOWN: ${{ github.event.inputs.cooldown }}
run: |
PROD_REGISTRY_PATH="${DECKHOUSE_REGISTRY_HOST}/deckhouse"
Expand Down Expand Up @@ -1152,13 +1152,13 @@ jobs:
echo "Release version image:"
echo " Source: ${SOURCE_RELEASE_VERSION_IMAGE}"
echo " Prod: ${PROD_RELEASE_VERSION_IMAGE}"
- name: Publish release images for SE+
if: ${{ needs.detect_editions.outputs.DEPLOY_SE+ == 'true' }}
- name: Publish release images for SE-plus
if: ${{ needs.detect_editions.outputs.DEPLOY_SE-plus == 'true' }}
env:
DECKHOUSE_REGISTRY_HOST: ${{secrets.DECKHOUSE_REGISTRY_HOST}}
CI_COMMIT_TAG: ${{needs.git_info.outputs.ci_commit_tag}}
CI_COMMIT_BRANCH: ${{needs.git_info.outputs.ci_commit_branch}}
WERF_ENV: SE+
WERF_ENV: SE-plus
SKIP_PUSH_FOR_DEPLOY: ${{secrets.SKIP_PUSH_FOR_DEPLOY}}
run: |
# SRC_NAME is a name of image from werf.yaml.
Expand Down Expand Up @@ -1208,7 +1208,7 @@ jobs:
exit 1
fi
echo "Publish SE+ edition".
echo "Publish SE-plus edition".
# Variables
# 1. Edition and channel.
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/deploy-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
description: 'Id of comment in issue where to put workflow run status'
required: false
editions:
description: 'Comma separated editions to deploy. Example: ee,fe,ce,be,se,se+'
description: 'Comma separated editions to deploy. Example: ee,fe,ce,be,se,se-plus'
required: false
cooldown:
description: 'Postpone release until specified datetime (YYYY-MM-DD HH:MM) UTC only. Example: 2026-06-06 16:16'
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
DEPLOY_FE: ${{steps.detect_editions.outputs.DEPLOY_FE}}
DEPLOY_BE: ${{steps.detect_editions.outputs.DEPLOY_BE}}
DEPLOY_SE: ${{steps.detect_editions.outputs.DEPLOY_SE}}
DEPLOY_SE+: ${{steps.detect_editions.outputs.DEPLOY_SE+}}
DEPLOY_SE-plus: ${{steps.detect_editions.outputs.DEPLOY_SE-plus}}
steps:
- name: Detect editions
id: detect_editions
Expand All @@ -151,7 +151,7 @@ jobs:
RESTRICTED=no
for edition in CE EE FE BE SE SE+ ; do
for edition in CE EE FE BE SE SE-plus ; do
if grep -i ",${edition}," <<<",${EDITIONS}," 2>/dev/null 1>&2 ; then
echo " - enable deploy of ${edition} edition."
echo "DEPLOY_${edition}=true" >> $GITHUB_OUTPUT
Expand All @@ -161,7 +161,7 @@ jobs:
if [[ $RESTRICTED == "no" ]] ; then
echo "No restrictions. Enable deploy to all editions."
for edition in CE EE FE BE SE SE+ ; do
for edition in CE EE FE BE SE SE-plus ; do
echo "DEPLOY_${edition}=true" >> $GITHUB_OUTPUT
done
fi
Expand Down Expand Up @@ -213,14 +213,14 @@ jobs:
steps:
- run: ": Enable SE"

enable_SE+:
if: ${{ needs.detect_editions.outputs.DEPLOY_SE+ == 'true' }}
name: Enable SE+
enable_SE-plus:
if: ${{ needs.detect_editions.outputs.DEPLOY_SE-plus == 'true' }}
name: Enable SE-plus
needs:
- detect_editions
runs-on: ubuntu-latest
steps:
- run: ": Enable SE+"
- run: ": Enable SE-plus"


run_deploy:
Expand Down Expand Up @@ -473,12 +473,12 @@ jobs:
echo "⚓️ 📤 [$(date -u)] Push '${SOURCE_RELEASE_VERSION_IMAGE}' image with cooldown."
docker image push ${SOURCE_RELEASE_VERSION_IMAGE}
- name: Set cooldown for release (SE+)
- name: Set cooldown for release (SE-plus)
if: ${{ github.event.inputs.cooldown }}
env:
DECKHOUSE_REGISTRY_HOST: ${{secrets.DECKHOUSE_REGISTRY_HOST}}
CI_COMMIT_TAG: ${{needs.git_info.outputs.ci_commit_tag}}
WERF_ENV: SE+
WERF_ENV: SE-plus
COOLDOWN: ${{ github.event.inputs.cooldown }}
run: |
PROD_REGISTRY_PATH="${DECKHOUSE_REGISTRY_HOST}/deckhouse"
Expand Down Expand Up @@ -1152,13 +1152,13 @@ jobs:
echo "Release version image:"
echo " Source: ${SOURCE_RELEASE_VERSION_IMAGE}"
echo " Prod: ${PROD_RELEASE_VERSION_IMAGE}"
- name: Publish release images for SE+
if: ${{ needs.detect_editions.outputs.DEPLOY_SE+ == 'true' }}
- name: Publish release images for SE-plus
if: ${{ needs.detect_editions.outputs.DEPLOY_SE-plus == 'true' }}
env:
DECKHOUSE_REGISTRY_HOST: ${{secrets.DECKHOUSE_REGISTRY_HOST}}
CI_COMMIT_TAG: ${{needs.git_info.outputs.ci_commit_tag}}
CI_COMMIT_BRANCH: ${{needs.git_info.outputs.ci_commit_branch}}
WERF_ENV: SE+
WERF_ENV: SE-plus
SKIP_PUSH_FOR_DEPLOY: ${{secrets.SKIP_PUSH_FOR_DEPLOY}}
run: |
# SRC_NAME is a name of image from werf.yaml.
Expand Down Expand Up @@ -1208,7 +1208,7 @@ jobs:
exit 1
fi
echo "Publish SE+ edition".
echo "Publish SE-plus edition".
# Variables
# 1. Edition and channel.
Expand Down
Loading

0 comments on commit 9a9e07d

Please sign in to comment.