mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-19 09:51:29 +00:00
Merge pull request #10754 from sprt/sprt/ci-gh-pr-number-coco
ci: Unify on `$GH_PR_NUMBER` environment variable
This commit is contained in:
commit
4e9d1363b3
2
.github/workflows/gatekeeper.yaml
vendored
2
.github/workflows/gatekeeper.yaml
vendored
@ -29,7 +29,7 @@ jobs:
|
||||
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
GH_PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
run: |
|
||||
#!/usr/bin/env bash -x
|
||||
mapfile -t lines < <(python3 tools/testing/gatekeeper/skips.py -t)
|
||||
|
@ -49,7 +49,7 @@ jobs:
|
||||
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||
DOCKER_REPO: ${{ inputs.repo }}
|
||||
DOCKER_TAG: ${{ inputs.tag }}
|
||||
PR_NUMBER: ${{ inputs.pr-number }}
|
||||
GH_PR_NUMBER: ${{ inputs.pr-number }}
|
||||
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
||||
KUBERNETES: ${{ matrix.k8s }}
|
||||
KUBERNETES_EXTRA_PARAMS: ${{ matrix.container_runtime != 'crio' && '' || '--cri-socket remote:unix:///var/run/crio/crio.sock --kubelet-extra-args --cgroup-driver="systemd"' }}
|
||||
|
@ -36,7 +36,7 @@ jobs:
|
||||
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||
DOCKER_REPO: ${{ inputs.repo }}
|
||||
DOCKER_TAG: ${{ inputs.tag }}
|
||||
PR_NUMBER: ${{ inputs.pr-number }}
|
||||
GH_PR_NUMBER: ${{ inputs.pr-number }}
|
||||
GOPATH: ${{ github.workspace }}
|
||||
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
||||
KUBERNETES: ${{ matrix.k8s }}
|
||||
|
1
.github/workflows/run-k8s-tests-on-zvsi.yaml
vendored
1
.github/workflows/run-k8s-tests-on-zvsi.yaml
vendored
@ -64,7 +64,6 @@ jobs:
|
||||
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||
DOCKER_REPO: ${{ inputs.repo }}
|
||||
DOCKER_TAG: ${{ inputs.tag }}
|
||||
PR_NUMBER: ${{ inputs.pr-number }}
|
||||
GH_PR_NUMBER: ${{ inputs.pr-number }}
|
||||
KATA_HOST_OS: "ubuntu"
|
||||
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
||||
|
6
.github/workflows/run-kata-coco-tests.yaml
vendored
6
.github/workflows/run-kata-coco-tests.yaml
vendored
@ -49,7 +49,7 @@ jobs:
|
||||
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||
DOCKER_REPO: ${{ inputs.repo }}
|
||||
DOCKER_TAG: ${{ inputs.tag }}
|
||||
PR_NUMBER: ${{ inputs.pr-number }}
|
||||
GH_PR_NUMBER: ${{ inputs.pr-number }}
|
||||
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
||||
KUBERNETES: "vanilla"
|
||||
USING_NFD: "true"
|
||||
@ -136,7 +136,7 @@ jobs:
|
||||
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||
DOCKER_REPO: ${{ inputs.repo }}
|
||||
DOCKER_TAG: ${{ inputs.tag }}
|
||||
PR_NUMBER: ${{ inputs.pr-number }}
|
||||
GH_PR_NUMBER: ${{ inputs.pr-number }}
|
||||
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
||||
KUBECONFIG: /home/kata/.kube/config
|
||||
KUBERNETES: "vanilla"
|
||||
@ -202,7 +202,7 @@ jobs:
|
||||
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||
DOCKER_REPO: ${{ inputs.repo }}
|
||||
DOCKER_TAG: ${{ inputs.tag }}
|
||||
PR_NUMBER: ${{ inputs.pr-number }}
|
||||
GH_PR_NUMBER: ${{ inputs.pr-number }}
|
||||
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
||||
KUBECONFIG: /home/kata/.kube/config
|
||||
KUBERNETES: "vanilla"
|
||||
|
@ -43,7 +43,7 @@ jobs:
|
||||
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||
DOCKER_REPO: ${{ inputs.repo }}
|
||||
DOCKER_TAG: ${{ inputs.tag }}
|
||||
PR_NUMBER: ${{ inputs.pr-number }}
|
||||
GH_PR_NUMBER: ${{ inputs.pr-number }}
|
||||
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
||||
KUBERNETES: ${{ matrix.k8s }}
|
||||
USING_NFD: "false"
|
||||
|
@ -18,9 +18,9 @@ function setup_unencrypted_confidential_pod() {
|
||||
|
||||
export SSH_KEY_FILE="${pod_config_dir}/confidential/unencrypted/ssh/unencrypted"
|
||||
|
||||
if [ -n "${PR_NUMBER}" ]; then
|
||||
if [ -n "${GH_PR_NUMBER}" ]; then
|
||||
# Use correct address in pod yaml
|
||||
sed -i "s/-nightly/-${PR_NUMBER}/" "${pod_config_dir}/pod-confidential-unencrypted.yaml"
|
||||
sed -i "s/-nightly/-${GH_PR_NUMBER}/" "${pod_config_dir}/pod-confidential-unencrypted.yaml"
|
||||
fi
|
||||
|
||||
# Set permissions on private key file
|
||||
|
@ -17,7 +17,7 @@ GITHUB_TOKEN="..." REQUIRED_JOBS="skipper / skipper"
|
||||
REQUIRED_REGEXPS=".*" REQUIRED_LABELS="ok-to-test;bar"
|
||||
COMMIT_HASH=b8382cea886ad9a8f77d237bcfc0eba0c98775dd
|
||||
GITHUB_REPOSITORY=kata-containers/kata-containers
|
||||
PR_NUMBER=123 python3 jobs.py
|
||||
GH_PR_NUMBER=123 python3 jobs.py
|
||||
"""
|
||||
|
||||
import os
|
||||
@ -43,7 +43,7 @@ class Checker:
|
||||
"""Object to keep watching required GH action workflows"""
|
||||
def __init__(self):
|
||||
self.latest_commit_sha = os.getenv("COMMIT_HASH")
|
||||
self.pr_number = os.getenv("PR_NUMBER")
|
||||
self.pr_number = os.getenv("GH_PR_NUMBER")
|
||||
required_labels = os.getenv("REQUIRED_LABELS")
|
||||
if required_labels:
|
||||
self.required_labels = set(required_labels.split(";"))
|
||||
@ -213,7 +213,7 @@ class Checker:
|
||||
return True
|
||||
|
||||
if not self.pr_number:
|
||||
print("The PR_NUMBER not specified, skipping the "
|
||||
print("The GH_PR_NUMBER not specified, skipping the "
|
||||
f"required-labels-check ({self.required_labels})")
|
||||
return True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user