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

Update adopt_module_source.go #298

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
5 changes: 4 additions & 1 deletion .github/ci_templates/helper_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,18 @@ pull_request_info:
const hasEE = pr.labels.some((l) => l.name === 'edition/ee');
const hasCE = pr.labels.some((l) => l.name === 'edition/ce');
const hasBE = pr.labels.some((l) => l.name === 'edition/be');
const hasSE = pr.labels.some((l) => l.name === 'edition/se');
let edition = defaultEdition;
if (hasCE) {
edition = 'CE';
} else if (hasEE) {
edition = 'EE';
} else if (hasBE) {
edition = 'BE';
} else if (hasSE) {
edition = 'SE';
}
core.info(`Edition labels: 'edition/ce':${hasCE}, 'edition/ee':${hasEE}, 'edition/be':${hasBE}`);
core.info(`Edition labels: 'edition/ce':${hasCE}, 'edition/ee':${hasEE}, 'edition/be':${hasBE}, 'edition/se':${hasSE}`);
core.notice(`Enable '${edition}' edition for '${context.eventName}' trigger.`);

// Construct head commit ref using pr number.
Expand Down
6 changes: 4 additions & 2 deletions .github/scripts/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ const labels = {
// Edition for build-and-test workflow
'edition/ce': { type: 'edition', edition: 'CE' },
'edition/ee': { type: 'edition', edition: 'EE' },
'edition/be': { type: 'edition', edition: 'BE' }
'edition/be': { type: 'edition', edition: 'BE' },
'edition/se': { type: 'edition', edition: 'SE' }
};
module.exports.knownLabels = labels;

Expand Down Expand Up @@ -151,6 +152,7 @@ const editions = [
'CE',
'EE',
'FE',
'BE'
'BE',
'SE'
];
module.exports.knownEditions = editions;
10 changes: 10 additions & 0 deletions .github/workflow_templates/build-and-test_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ jobs:
- run: |
echo Enable ${{ needs.pull_request_info.outputs.edition }}

enable_se:
if: ${{ needs.pull_request_info.outputs.edition == 'SE' }}
name: Enable SE
needs:
- pull_request_info
runs-on: ubuntu-latest
steps:
- run: |
echo Enable ${{ needs.pull_request_info.outputs.edition }}

go_generate:
name: Go Generate
needs:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflow_templates/build-and-test_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ jobs:
{!{ tmpl.Exec "build_template" (slice $ctx "release") | strings.Indent 4 }!}
{!{ tmpl.Exec "update_comment_on_finish" (slice "job,one-line" $jobNames.build_ee) | strings.Indent 6 }!}

{!{ $jobNames = coll.Merge $jobNames (dict "build_se" "Build SE") }!}
build_se:
name: {!{ $jobNames.build_se }!}
needs:
- git_info
- go_generate
- workflow_render
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
env:
WERF_ENV: "SE"
{!{ 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_be" "Build BE") }!}
build_be:
name: {!{ $jobNames.build_be }!}
Expand Down Expand Up @@ -255,6 +268,7 @@ jobs:
- build_ee
- build_ce
- build_be
- build_se
- doc_web_build
- main_web_build
- deploy_latest_web_site_prod_sel
Expand Down
13 changes: 7 additions & 6 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'
description: 'Comma separated editions to deploy. Example: ee,fe,ce,be,se'
required: false
cooldown:
description: 'Postpone release until specified datetime (YYYY-MM-DD HH:MM) UTC only. Example: 2026-06-06 16:16'
Expand All @@ -83,6 +83,7 @@ jobs:
DEPLOY_EE: ${{steps.detect_editions.outputs.DEPLOY_EE}}
DEPLOY_FE: ${{steps.detect_editions.outputs.DEPLOY_FE}}
DEPLOY_BE: ${{steps.detect_editions.outputs.DEPLOY_BE}}
DEPLOY_SE: ${{steps.detect_editions.outputs.DEPLOY_SE}}
steps:
- name: Detect editions
id: detect_editions
Expand All @@ -93,7 +94,7 @@ jobs:

RESTRICTED=no

for edition in CE EE FE BE ; do
for edition in CE EE FE BE SE ; 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 @@ -103,15 +104,15 @@ jobs:

if [[ $RESTRICTED == "no" ]] ; then
echo "No restrictions. Enable deploy to all editions."
for edition in CE EE FE BE ; do
for edition in CE EE FE BE SE ; 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" }!}
{!{ range $werfEnv := slice "CE" "EE" "FE" "BE" "SE" }!}
enable_{!{$werfEnv}!}:
if: ${{ needs.detect_editions.outputs.DEPLOY_{!{$werfEnv}!} == 'true' }}
name: Enable {!{$werfEnv}!}
Expand Down Expand Up @@ -151,7 +152,7 @@ Jobs for visual control allowed editions when approving deploy to environments.
echo "enable=true" >> $GITHUB_OUTPUT
fi

{!{ range $werfEnv := slice "CE" "EE" "FE" "BE" }!}
{!{ range $werfEnv := slice "CE" "EE" "FE" "BE" "SE" }!}
- name: Set cooldown for release ({!{ $werfEnv }!})
if: ${{ github.event.inputs.cooldown }}
env:
Expand Down Expand Up @@ -192,7 +193,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" }!}
{!{ range $werfEnv := slice "CE" "EE" "FE" "BE" "SE" }!}
- 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" }!}
{!{ range $werfEnv := slice "CE" "EE" "FE" "BE" "SE" }!}
- 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 -> ce/ee/fe/be
# CE/EE/FE/BE/SE -> ce/ee/fe/be/se
REGISTRY_SUFFIX=$(echo ${WERF_ENV} | tr '[:upper:]' '[:lower:]')
RELEASE_CHANNEL={!{ $channel }!}

Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/build-and-test_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,18 @@ jobs:
const hasEE = pr.labels.some((l) => l.name === 'edition/ee');
const hasCE = pr.labels.some((l) => l.name === 'edition/ce');
const hasBE = pr.labels.some((l) => l.name === 'edition/be');
const hasSE = pr.labels.some((l) => l.name === 'edition/se');
let edition = defaultEdition;
if (hasCE) {
edition = 'CE';
} else if (hasEE) {
edition = 'EE';
} else if (hasBE) {
edition = 'BE';
} else if (hasSE) {
edition = 'SE';
}
core.info(`Edition labels: 'edition/ce':${hasCE}, 'edition/ee':${hasEE}, 'edition/be':${hasBE}`);
core.info(`Edition labels: 'edition/ce':${hasCE}, 'edition/ee':${hasEE}, 'edition/be':${hasBE}, 'edition/se':${hasSE}`);
core.notice(`Enable '${edition}' edition for '${context.eventName}' trigger.`);

// Construct head commit ref using pr number.
Expand Down Expand Up @@ -395,6 +398,16 @@ jobs:
- run: |
echo Enable ${{ needs.pull_request_info.outputs.edition }}

enable_se:
if: ${{ needs.pull_request_info.outputs.edition == 'SE' }}
name: Enable SE
needs:
- pull_request_info
runs-on: ubuntu-latest
steps:
- run: |
echo Enable ${{ needs.pull_request_info.outputs.edition }}

go_generate:
name: Go Generate
needs:
Expand Down
Loading
Loading