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

Test test #403

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
13 changes: 13 additions & 0 deletions .github/ci_templates/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
REPOSITORY: ${{ github.repository }}
DHCTL_LOG_FILE: ${{ steps.setup.outputs.dhctl-log-file}}
GITHUB_TOKEN: ${{secrets.BOATSWAIN_GITHUB_TOKEN}}
{!{- if and (eq $script_arg "run-test") $run_from_issue_or_pr }!}
CIS_ENABLED: ${{ needs.check_e2e_labels.outputs.cis }}
{!{- end }!}
run: |
{!{- if eq $provider "eks" }!}
echo "Execute '{!{ $script_eks }!} {!{ $script_arg }!}' via 'docker run', using environment:
Expand All @@ -115,6 +118,9 @@ run: |
KUBERNETES_VERSION=${KUBERNETES_VERSION}
TMP_DIR_PATH=${TMP_DIR_PATH}
MASTERS_COUNT=${MASTERS_COUNT}
{!{- if and (eq $script_arg "run-test") $run_from_issue_or_pr }!}
CIS_ENABLED=${CIS_ENABLED}
{!{- end }!}
"

ls -lh $(pwd)/testing
Expand Down Expand Up @@ -204,6 +210,9 @@ run: |
-e KUBECONFIG=/tmp/eks-${LAYOUT}-${CRI}-${KUBERNETES_VERSION}.kubeconfig \
-e CRI=${CRI} \
-e USER_RUNNER_ID=${user_runner_id} \
{!{- if $run_from_issue_or_pr }!}
-e CIS_ENABLED=${CIS_ENABLED} \
{!{- end }!}
-v $(pwd)/testing:/deckhouse/testing \
-v $(pwd)/release.yaml:/deckhouse/release.yaml \
-v ${TMP_DIR_PATH}:/tmp \
Expand Down Expand Up @@ -257,6 +266,9 @@ run: |
-e LAYOUT_STATIC_BASTION_IP=80.249.129.56 \
{!{- end }!}
-e USER_RUNNER_ID=${user_runner_id} \
{!{- if and (eq $script_arg "run-test") $run_from_issue_or_pr }!}
-e CIS_ENABLED=${CIS_ENABLED} \
{!{- end }!}
-v $(pwd)/testing:/deckhouse/testing \
-v $(pwd)/release.yaml:/deckhouse/release.yaml \
-v ${TMP_DIR_PATH}:/tmp \
Expand Down Expand Up @@ -292,6 +304,7 @@ check_e2e_labels:
{!{- end }!}
edition: ${{ steps.check.outputs.edition }}
multimaster: ${{ steps.check.outputs.multimaster }}
cis: ${{ steps.check.outputs.cis }}
steps:
{!{ tmpl.Exec "checkout_step" . | strings.Indent 4 }!}
- name: Check e2e labels
Expand Down
6 changes: 6 additions & 0 deletions .github/scripts/js/ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ const setCRIAndVersionsFromLabels = ({ core, labels, kubernetesDefaultVersion })
let cri = [];
let multimaster = e2eDefaults.multimaster;
let edition = "";
let cis = e2eDefaults.cis

for (const label of labels) {
const info = knownLabels[label.name];
Expand All @@ -501,6 +502,10 @@ const setCRIAndVersionsFromLabels = ({ core, labels, kubernetesDefaultVersion })
core.info(`Detect '${label.name}': use Kubernetes multimaster configuration`);
multimaster = true;
}
if (info.cis) {
core.info(`Detect '${label.name}': use operator-trivy to get CIS Benchmark report`);
cis = true;
}
}

if (ver.length === 0) {
Expand All @@ -519,6 +524,7 @@ const setCRIAndVersionsFromLabels = ({ core, labels, kubernetesDefaultVersion })
core.setCommandEcho(true);
core.setOutput(`edition`, `${edition}`);
core.setOutput(`multimaster`, `${multimaster}`);
core.setOutput(`cis`, `${cis}`);
for (const out_cri of cri) {
for (const out_ver of ver) {
core.setOutput(`run_${out_cri}_${out_ver}`, 'true');
Expand Down
6 changes: 5 additions & 1 deletion .github/scripts/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ 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-plus' }
'edition/se+': { type: 'edition', edition: 'SE-plus' },

// Enable operator-trivy to get CIS benchmark report
'e2e/use/cis': { type: 'e2e-use', cis: true }
};
module.exports.knownLabels = labels;

Expand Down Expand Up @@ -159,6 +162,7 @@ module.exports.e2eDefaults = {
criName: 'Containerd',
edition: 'FE',
multimaster: false,
cis: false
}

const editions = [
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-abort-aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
run_containerd_automatic: ${{ steps.check.outputs.run_containerd_automatic }}
edition: ${{ steps.check.outputs.edition }}
multimaster: ${{ steps.check.outputs.multimaster }}
cis: ${{ steps.check.outputs.cis }}
steps:

# <template: checkout_step>
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-abort-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
run_containerd_automatic: ${{ steps.check.outputs.run_containerd_automatic }}
edition: ${{ steps.check.outputs.edition }}
multimaster: ${{ steps.check.outputs.multimaster }}
cis: ${{ steps.check.outputs.cis }}
steps:

# <template: checkout_step>
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-abort-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
run_containerd_automatic: ${{ steps.check.outputs.run_containerd_automatic }}
edition: ${{ steps.check.outputs.edition }}
multimaster: ${{ steps.check.outputs.multimaster }}
cis: ${{ steps.check.outputs.cis }}
steps:

# <template: checkout_step>
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-abort-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
run_containerd_automatic: ${{ steps.check.outputs.run_containerd_automatic }}
edition: ${{ steps.check.outputs.edition }}
multimaster: ${{ steps.check.outputs.multimaster }}
cis: ${{ steps.check.outputs.cis }}
steps:

# <template: checkout_step>
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-abort-openstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
run_containerd_automatic: ${{ steps.check.outputs.run_containerd_automatic }}
edition: ${{ steps.check.outputs.edition }}
multimaster: ${{ steps.check.outputs.multimaster }}
cis: ${{ steps.check.outputs.cis }}
steps:

# <template: checkout_step>
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-abort-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
run_containerd_automatic: ${{ steps.check.outputs.run_containerd_automatic }}
edition: ${{ steps.check.outputs.edition }}
multimaster: ${{ steps.check.outputs.multimaster }}
cis: ${{ steps.check.outputs.cis }}
steps:

# <template: checkout_step>
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-abort-vcd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
run_containerd_automatic: ${{ steps.check.outputs.run_containerd_automatic }}
edition: ${{ steps.check.outputs.edition }}
multimaster: ${{ steps.check.outputs.multimaster }}
cis: ${{ steps.check.outputs.cis }}
steps:

# <template: checkout_step>
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-abort-vsphere.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
run_containerd_automatic: ${{ steps.check.outputs.run_containerd_automatic }}
edition: ${{ steps.check.outputs.edition }}
multimaster: ${{ steps.check.outputs.multimaster }}
cis: ${{ steps.check.outputs.cis }}
steps:

# <template: checkout_step>
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-abort-yandex-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
run_containerd_automatic: ${{ steps.check.outputs.run_containerd_automatic }}
edition: ${{ steps.check.outputs.edition }}
multimaster: ${{ steps.check.outputs.multimaster }}
cis: ${{ steps.check.outputs.cis }}
steps:

# <template: checkout_step>
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/e2e-aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ jobs:
run_containerd_automatic: ${{ steps.check.outputs.run_containerd_automatic }}
edition: ${{ steps.check.outputs.edition }}
multimaster: ${{ steps.check.outputs.multimaster }}
cis: ${{ steps.check.outputs.cis }}
steps:

# <template: checkout_step>
Expand Down Expand Up @@ -461,6 +462,7 @@ jobs:
REPOSITORY: ${{ github.repository }}
DHCTL_LOG_FILE: ${{ steps.setup.outputs.dhctl-log-file}}
GITHUB_TOKEN: ${{secrets.BOATSWAIN_GITHUB_TOKEN}}
CIS_ENABLED: ${{ needs.check_e2e_labels.outputs.cis }}
run: |
echo "Execute 'script.sh run-test' via 'docker run', using environment:
INSTALL_IMAGE_NAME=${INSTALL_IMAGE_NAME}
Expand All @@ -473,6 +475,7 @@ jobs:
KUBERNETES_VERSION=${KUBERNETES_VERSION}
TMP_DIR_PATH=${TMP_DIR_PATH}
MASTERS_COUNT=${MASTERS_COUNT}
CIS_ENABLED=${CIS_ENABLED}
"

ls -lh $(pwd)/testing
Expand Down Expand Up @@ -517,6 +520,7 @@ jobs:
-e LAYOUT_AWS_ACCESS_KEY=${LAYOUT_AWS_ACCESS_KEY:-not_provided} \
-e LAYOUT_AWS_SECRET_ACCESS_KEY=${LAYOUT_AWS_SECRET_ACCESS_KEY:-not_provided} \
-e USER_RUNNER_ID=${user_runner_id} \
-e CIS_ENABLED=${CIS_ENABLED} \
-v $(pwd)/testing:/deckhouse/testing \
-v $(pwd)/release.yaml:/deckhouse/release.yaml \
-v ${TMP_DIR_PATH}:/tmp \
Expand Down Expand Up @@ -953,6 +957,7 @@ jobs:
REPOSITORY: ${{ github.repository }}
DHCTL_LOG_FILE: ${{ steps.setup.outputs.dhctl-log-file}}
GITHUB_TOKEN: ${{secrets.BOATSWAIN_GITHUB_TOKEN}}
CIS_ENABLED: ${{ needs.check_e2e_labels.outputs.cis }}
run: |
echo "Execute 'script.sh run-test' via 'docker run', using environment:
INSTALL_IMAGE_NAME=${INSTALL_IMAGE_NAME}
Expand All @@ -965,6 +970,7 @@ jobs:
KUBERNETES_VERSION=${KUBERNETES_VERSION}
TMP_DIR_PATH=${TMP_DIR_PATH}
MASTERS_COUNT=${MASTERS_COUNT}
CIS_ENABLED=${CIS_ENABLED}
"

ls -lh $(pwd)/testing
Expand Down Expand Up @@ -1009,6 +1015,7 @@ jobs:
-e LAYOUT_AWS_ACCESS_KEY=${LAYOUT_AWS_ACCESS_KEY:-not_provided} \
-e LAYOUT_AWS_SECRET_ACCESS_KEY=${LAYOUT_AWS_SECRET_ACCESS_KEY:-not_provided} \
-e USER_RUNNER_ID=${user_runner_id} \
-e CIS_ENABLED=${CIS_ENABLED} \
-v $(pwd)/testing:/deckhouse/testing \
-v $(pwd)/release.yaml:/deckhouse/release.yaml \
-v ${TMP_DIR_PATH}:/tmp \
Expand Down Expand Up @@ -1445,6 +1452,7 @@ jobs:
REPOSITORY: ${{ github.repository }}
DHCTL_LOG_FILE: ${{ steps.setup.outputs.dhctl-log-file}}
GITHUB_TOKEN: ${{secrets.BOATSWAIN_GITHUB_TOKEN}}
CIS_ENABLED: ${{ needs.check_e2e_labels.outputs.cis }}
run: |
echo "Execute 'script.sh run-test' via 'docker run', using environment:
INSTALL_IMAGE_NAME=${INSTALL_IMAGE_NAME}
Expand All @@ -1457,6 +1465,7 @@ jobs:
KUBERNETES_VERSION=${KUBERNETES_VERSION}
TMP_DIR_PATH=${TMP_DIR_PATH}
MASTERS_COUNT=${MASTERS_COUNT}
CIS_ENABLED=${CIS_ENABLED}
"

ls -lh $(pwd)/testing
Expand Down Expand Up @@ -1501,6 +1510,7 @@ jobs:
-e LAYOUT_AWS_ACCESS_KEY=${LAYOUT_AWS_ACCESS_KEY:-not_provided} \
-e LAYOUT_AWS_SECRET_ACCESS_KEY=${LAYOUT_AWS_SECRET_ACCESS_KEY:-not_provided} \
-e USER_RUNNER_ID=${user_runner_id} \
-e CIS_ENABLED=${CIS_ENABLED} \
-v $(pwd)/testing:/deckhouse/testing \
-v $(pwd)/release.yaml:/deckhouse/release.yaml \
-v ${TMP_DIR_PATH}:/tmp \
Expand Down Expand Up @@ -1937,6 +1947,7 @@ jobs:
REPOSITORY: ${{ github.repository }}
DHCTL_LOG_FILE: ${{ steps.setup.outputs.dhctl-log-file}}
GITHUB_TOKEN: ${{secrets.BOATSWAIN_GITHUB_TOKEN}}
CIS_ENABLED: ${{ needs.check_e2e_labels.outputs.cis }}
run: |
echo "Execute 'script.sh run-test' via 'docker run', using environment:
INSTALL_IMAGE_NAME=${INSTALL_IMAGE_NAME}
Expand All @@ -1949,6 +1960,7 @@ jobs:
KUBERNETES_VERSION=${KUBERNETES_VERSION}
TMP_DIR_PATH=${TMP_DIR_PATH}
MASTERS_COUNT=${MASTERS_COUNT}
CIS_ENABLED=${CIS_ENABLED}
"

ls -lh $(pwd)/testing
Expand Down Expand Up @@ -1993,6 +2005,7 @@ jobs:
-e LAYOUT_AWS_ACCESS_KEY=${LAYOUT_AWS_ACCESS_KEY:-not_provided} \
-e LAYOUT_AWS_SECRET_ACCESS_KEY=${LAYOUT_AWS_SECRET_ACCESS_KEY:-not_provided} \
-e USER_RUNNER_ID=${user_runner_id} \
-e CIS_ENABLED=${CIS_ENABLED} \
-v $(pwd)/testing:/deckhouse/testing \
-v $(pwd)/release.yaml:/deckhouse/release.yaml \
-v ${TMP_DIR_PATH}:/tmp \
Expand Down Expand Up @@ -2429,6 +2442,7 @@ jobs:
REPOSITORY: ${{ github.repository }}
DHCTL_LOG_FILE: ${{ steps.setup.outputs.dhctl-log-file}}
GITHUB_TOKEN: ${{secrets.BOATSWAIN_GITHUB_TOKEN}}
CIS_ENABLED: ${{ needs.check_e2e_labels.outputs.cis }}
run: |
echo "Execute 'script.sh run-test' via 'docker run', using environment:
INSTALL_IMAGE_NAME=${INSTALL_IMAGE_NAME}
Expand All @@ -2441,6 +2455,7 @@ jobs:
KUBERNETES_VERSION=${KUBERNETES_VERSION}
TMP_DIR_PATH=${TMP_DIR_PATH}
MASTERS_COUNT=${MASTERS_COUNT}
CIS_ENABLED=${CIS_ENABLED}
"

ls -lh $(pwd)/testing
Expand Down Expand Up @@ -2485,6 +2500,7 @@ jobs:
-e LAYOUT_AWS_ACCESS_KEY=${LAYOUT_AWS_ACCESS_KEY:-not_provided} \
-e LAYOUT_AWS_SECRET_ACCESS_KEY=${LAYOUT_AWS_SECRET_ACCESS_KEY:-not_provided} \
-e USER_RUNNER_ID=${user_runner_id} \
-e CIS_ENABLED=${CIS_ENABLED} \
-v $(pwd)/testing:/deckhouse/testing \
-v $(pwd)/release.yaml:/deckhouse/release.yaml \
-v ${TMP_DIR_PATH}:/tmp \
Expand Down Expand Up @@ -2921,6 +2937,7 @@ jobs:
REPOSITORY: ${{ github.repository }}
DHCTL_LOG_FILE: ${{ steps.setup.outputs.dhctl-log-file}}
GITHUB_TOKEN: ${{secrets.BOATSWAIN_GITHUB_TOKEN}}
CIS_ENABLED: ${{ needs.check_e2e_labels.outputs.cis }}
run: |
echo "Execute 'script.sh run-test' via 'docker run', using environment:
INSTALL_IMAGE_NAME=${INSTALL_IMAGE_NAME}
Expand All @@ -2933,6 +2950,7 @@ jobs:
KUBERNETES_VERSION=${KUBERNETES_VERSION}
TMP_DIR_PATH=${TMP_DIR_PATH}
MASTERS_COUNT=${MASTERS_COUNT}
CIS_ENABLED=${CIS_ENABLED}
"

ls -lh $(pwd)/testing
Expand Down Expand Up @@ -2977,6 +2995,7 @@ jobs:
-e LAYOUT_AWS_ACCESS_KEY=${LAYOUT_AWS_ACCESS_KEY:-not_provided} \
-e LAYOUT_AWS_SECRET_ACCESS_KEY=${LAYOUT_AWS_SECRET_ACCESS_KEY:-not_provided} \
-e USER_RUNNER_ID=${user_runner_id} \
-e CIS_ENABLED=${CIS_ENABLED} \
-v $(pwd)/testing:/deckhouse/testing \
-v $(pwd)/release.yaml:/deckhouse/release.yaml \
-v ${TMP_DIR_PATH}:/tmp \
Expand Down Expand Up @@ -3413,6 +3432,7 @@ jobs:
REPOSITORY: ${{ github.repository }}
DHCTL_LOG_FILE: ${{ steps.setup.outputs.dhctl-log-file}}
GITHUB_TOKEN: ${{secrets.BOATSWAIN_GITHUB_TOKEN}}
CIS_ENABLED: ${{ needs.check_e2e_labels.outputs.cis }}
run: |
echo "Execute 'script.sh run-test' via 'docker run', using environment:
INSTALL_IMAGE_NAME=${INSTALL_IMAGE_NAME}
Expand All @@ -3425,6 +3445,7 @@ jobs:
KUBERNETES_VERSION=${KUBERNETES_VERSION}
TMP_DIR_PATH=${TMP_DIR_PATH}
MASTERS_COUNT=${MASTERS_COUNT}
CIS_ENABLED=${CIS_ENABLED}
"

ls -lh $(pwd)/testing
Expand Down Expand Up @@ -3469,6 +3490,7 @@ jobs:
-e LAYOUT_AWS_ACCESS_KEY=${LAYOUT_AWS_ACCESS_KEY:-not_provided} \
-e LAYOUT_AWS_SECRET_ACCESS_KEY=${LAYOUT_AWS_SECRET_ACCESS_KEY:-not_provided} \
-e USER_RUNNER_ID=${user_runner_id} \
-e CIS_ENABLED=${CIS_ENABLED} \
-v $(pwd)/testing:/deckhouse/testing \
-v $(pwd)/release.yaml:/deckhouse/release.yaml \
-v ${TMP_DIR_PATH}:/tmp \
Expand Down
Loading
Loading