Skip to content

Commit

Permalink
Fix issues in cloud CI (#1624)
Browse files Browse the repository at this point in the history
- Add default repo url and branch parameters for cleanup jobs
- Separate test job template and cleanup job template
- Modify EKS test script to be compatible with a recent command line option change in run-k8s-e2e-test.sh
  • Loading branch information
Dyanngg authored Dec 8, 2020
1 parent da021fa commit afe2c09
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 60 deletions.
53 changes: 52 additions & 1 deletion ci/jenkins/jobs/job-templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,58 @@
node: '{node}'
triggers: '{triggers}'
builders: '{builders}'
parameters: '{parameters}'
parameters:
- string:
default: https://github.com/vmware-tanzu/antrea/
description: The repository to checkout Antrea for this test.
name: ANTREA_REPO
trim: 'true'
- string:
default: master
description: The branch or SHA commit ID to checkout and build Antrea for this test.
name: ANTREA_GIT_REVISION
trim: 'true'
description: '{description}'
block-downstream: false
block-upstream: false
project-type: freestyle
properties:
- build-discarder:
artifact-days-to-keep: -1
artifact-num-to-keep: -1
days-to-keep: 7
num-to-keep: 30
- github:
url: '{repo_url}'
scm:
- git:
branches: '{branches}'
name: origin
url: '{repo_url}'
publishers: '{publishers}'
wrappers: '{wrappers}'

- job-template:
name: 'cloud-{name}-{test_name}-cleanup'
node: '{node}'
triggers: '{triggers}'
builders: '{builders}'
parameters:
- string:
default: ''
description: The cluster name of the last finished build.
name: CLUSTERNAME
trim: 'false'
- string:
default: https://github.com/vmware-tanzu/antrea/
description: The repository to checkout Antrea for this test.
name: ANTREA_REPO
trim: 'true'
- string:
default: master
description: The branch or SHA commit ID to checkout and build Antrea for this test.
name: ANTREA_GIT_REVISION
trim: 'true'
description: '{description}'
block-downstream: false
block-upstream: false
Expand Down
63 changes: 6 additions & 57 deletions ci/jenkins/jobs/projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -584,17 +584,6 @@
test_name: eks-conformance-net-policy
node: antrea-cloud
description: 'This is EKS conformance and network policy test for antrea.'
parameters:
- string:
default: https://github.com/vmware-tanzu/antrea/
description: The repository to checkout Antrea for this test.
name: ANTREA_REPO
trim: 'true'
- string:
default: master
description: The branch or SHA commit ID to checkout and build Antrea for this test.
name: ANTREA_GIT_REVISION
trim: 'true'
branches:
- '${{ANTREA_GIT_REVISION}}'
repo_url: '${{ANTREA_REPO}}'
Expand Down Expand Up @@ -629,20 +618,14 @@
- text:
credential-id: AWS_SECRET_KEY # Jenkins secret that stores aws secret key
variable: AWS_SECRET_KEY
- 'cloud-{name}-{test_name}':
test_name: eks-cleanup
- 'cloud-{name}-{test_name}-cleanup':
test_name: eks
description: This is for deleting EKS test clusters.
builders:
- builder-eks-cluster-cleanup
concurrent: false
disabled: false
node: antrea-cloud
parameters:
- string:
default: ''
description: The cluster name of the last finished build.
name: CLUSTERNAME
trim: 'false'
branches:
- '${{ANTREA_GIT_REVISION}}'
repo_url: '${{ANTREA_REPO}}'
Expand All @@ -656,17 +639,6 @@
test_name: gke-conformance-net-policy
node: antrea-cloud
description: 'This is GKE conformance and network policy test for antrea.'
parameters:
- string:
default: https://github.com/vmware-tanzu/antrea/
description: The repository to checkout Antrea for this test.
name: ANTREA_REPO
trim: 'true'
- string:
default: master
description: The branch or SHA commit ID to checkout and build Antrea for this test.
name: ANTREA_GIT_REVISION
trim: 'true'
branches:
- '${{ANTREA_GIT_REVISION}}'
repo_url: '${{ANTREA_REPO}}'
Expand Down Expand Up @@ -697,20 +669,14 @@
notify-every-unstable-build: true
recipients: projectantrea-dev@googlegroups.com
wrappers: []
- 'cloud-{name}-{test_name}':
test_name: gke-cleanup
- 'cloud-{name}-{test_name}-cleanup':
test_name: gke
description: This is for deleting GKE test clusters.
builders:
- builder-gke-cluster-cleanup
concurrent: false
disabled: false
node: antrea-cloud
parameters:
- string:
default: ''
description: The cluster name of the last finished build.
name: CLUSTERNAME
trim: 'false'
branches:
- '${{ANTREA_GIT_REVISION}}'
repo_url: '${{ANTREA_REPO}}'
Expand All @@ -724,17 +690,6 @@
test_name: aks-conformance-net-policy
node: antrea-cloud
description: 'This is AKS conformance and network policy test for antrea.'
parameters:
- string:
default: https://github.com/vmware-tanzu/antrea/
description: The repository to checkout Antrea for this test.
name: ANTREA_REPO
trim: 'true'
- string:
default: master
description: The branch or SHA commit ID to checkout and build Antrea for this test.
name: ANTREA_GIT_REVISION
trim: 'true'
branches:
- '${{ANTREA_GIT_REVISION}}'
repo_url: '${{ANTREA_REPO}}'
Expand Down Expand Up @@ -773,20 +728,14 @@
- text:
credential-id: AZURE_TENANT_ID # Jenkins secret that stores azure tenant id
variable: AZURE_TENANT_ID
- 'cloud-{name}-{test_name}':
test_name: aks-cleanup
- 'cloud-{name}-{test_name}-cleanup':
test_name: aks
description: This is for deleting AKS test clusters.
builders:
- builder-aks-cluster-cleanup
concurrent: false
disabled: false
node: antrea-cloud
parameters:
- string:
default: ''
description: The cluster name of the last finished build.
name: CLUSTERNAME
trim: 'false'
branches:
- '${{ANTREA_GIT_REVISION}}'
repo_url: '${{ANTREA_REPO}}'
Expand Down
2 changes: 1 addition & 1 deletion ci/run-k8s-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ IMAGE_PULL_POLICY="Always"
CONFORMANCE_IMAGE_CONFIG_PATH="${THIS_DIR}/conformance-image-config.yaml"
SONOBUOY_IMAGE="projects.registry.vmware.com/sonobuoy/sonobuoy:v0.19.0"

_usage="Usage: $0 [--e2e-conformance] [--e2e-network-policy] [--e2e-focus <TestRegex>] [--e2e-conformance-skip <SkipRegex>] [--e2e-networkpolicy-skip <SkipRegex>]
_usage="Usage: $0 [--e2e-conformance] [--e2e-network-policy] [--e2e-focus <TestRegex>] [--e2e-skip <SkipRegex>] [--e2e-networkpolicy-skip <SkipRegex>]
[--kubeconfig <Kubeconfig>] [--kube-conformance-image-version <ConformanceImageVersion>]
[--log-mode <SonobuoyResultLogLevel>]
Run the K8s e2e community tests (Conformance & Network Policy) which are relevant to Project Antrea,
Expand Down
2 changes: 1 addition & 1 deletion ci/test-conformance-eks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function run_conformance() {
# Skip NodePort related cases for EKS since by default eksctl does not create security groups for nodeport service
# access through node external IP. See https://github.com/vmware-tanzu/antrea/issues/690
skip_regex="\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[sig-cli\]|\[sig-storage\]|\[sig-auth\]|\[sig-api-machinery\]|\[sig-apps\]|\[sig-node\]|NodePort"
${GIT_CHECKOUT_DIR}/ci/run-k8s-e2e-tests.sh --e2e-conformance --e2e-network-policy --e2e-conformance-skip ${skip_regex} \
${GIT_CHECKOUT_DIR}/ci/run-k8s-e2e-tests.sh --e2e-conformance --e2e-network-policy --e2e-skip ${skip_regex} \
--kube-conformance-image-version ${KUBE_CONFORMANCE_IMAGE_VERSION} \
--log-mode ${MODE} > ${GIT_CHECKOUT_DIR}/eks-test.log

Expand Down

0 comments on commit afe2c09

Please sign in to comment.