k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/config/jobs/kubernetes-sigs/cluster-api-provider-vsphere/templates/cluster-api-provider-vsphere-presubmits.yaml.tpl (about)

     1  presubmits:
     2    kubernetes-sigs/cluster-api-provider-vsphere:
     3    - name: pull-cluster-api-provider-vsphere-apidiff-{{ ReplaceAll $.branch "." "-" }}
     4      cluster: eks-prow-build-cluster
     5      branches:
     6      - ^{{ $.branch }}$
     7      always_run: false
     8      # Run if go files, scripts or configuration changed (we use the same for all jobs for simplicity).
     9      run_if_changed: '^((apis|config|controllers|feature|hack|packaging|pkg|test|webhooks)/|Dockerfile|go\.mod|go\.sum|main\.go|Makefile)'
    10      optional: true
    11      decorate: true
    12      path_alias: sigs.k8s.io/cluster-api-provider-vsphere
    13      spec:
    14        containers:
    15        - image: {{ $.config.TestImage }}
    16          command:
    17          - runner.sh
    18          args:
    19          - ./hack/ci-apidiff.sh
    20          resources:
    21            limits:
    22              cpu: 2
    23              memory: 3Gi
    24            requests:
    25              cpu: 2
    26              memory: 3Gi
    27      annotations:
    28        testgrid-dashboards: vmware-cluster-api-provider-vsphere, sig-cluster-lifecycle-cluster-api-provider-vsphere
    29        testgrid-tab-name: pr-apidiff-{{ ReplaceAll $.branch "." "-" }}
    30        description: Checks for API changes in the PR
    31  
    32    - name: pull-cluster-api-provider-vsphere-verify-{{ ReplaceAll $.branch "." "-" }}
    33      cluster: eks-prow-build-cluster
    34      branches:
    35      - ^{{ $.branch }}$
    36      labels:
    37        preset-dind-enabled: "true"
    38      always_run: true
    39      decorate: true
    40      path_alias: sigs.k8s.io/cluster-api-provider-vsphere
    41      spec:
    42        containers:
    43        - image: {{ $.config.TestImage }}
    44          command:
    45          - runner.sh
    46          args:
    47          - make
    48          - verify
    49          # we need privileged mode in order to do docker in docker
    50          securityContext:
    51            privileged: true
    52          resources:
    53            limits:
    54              cpu: 2
    55              memory: 3Gi
    56            requests:
    57              cpu: 2
    58              memory: 3Gi
    59      annotations:
    60        testgrid-dashboards: vmware-cluster-api-provider-vsphere, sig-cluster-lifecycle-cluster-api-provider-vsphere
    61        testgrid-tab-name: pr-verify-{{ ReplaceAll $.branch "." "-" }}
    62  
    63    - name: pull-cluster-api-provider-vsphere-test-{{ ReplaceAll $.branch "." "-" }}
    64      cluster: eks-prow-build-cluster
    65      branches:
    66      - ^{{ $.branch }}$
    67      always_run: false
    68      # Run if go files, scripts or configuration changed (we use the same for all jobs for simplicity).
    69      run_if_changed: '^((apis|config|controllers|feature|hack|packaging|pkg|test|webhooks)/|Dockerfile|go\.mod|go\.sum|main\.go|Makefile)'
    70      decorate: true
    71      path_alias: sigs.k8s.io/cluster-api-provider-vsphere
    72      spec:
    73        containers:
    74        - image: {{ $.config.TestImage }}
    75          resources:
    76            limits:
    77              cpu: 2
    78              memory: 4Gi
    79            requests:
    80              cpu: 2
    81              memory: 4Gi
    82          command:
    83          - runner.sh
    84          args:
    85          - make
    86          - test-junit
    87      annotations:
    88        testgrid-dashboards: vmware-cluster-api-provider-vsphere, sig-cluster-lifecycle-cluster-api-provider-vsphere
    89        testgrid-tab-name: pr-test-{{ ReplaceAll $.branch "." "-" }}
    90        description: Runs unit tests
    91  {{ $testInBranch := list "release-1.7" "release-1.8" "release-1.9" -}}
    92  {{ if has $.branch $testInBranch }}
    93    - name: pull-cluster-api-provider-vsphere-test-integration-{{ ReplaceAll $.branch "." "-" }}
    94      cluster: eks-prow-build-cluster
    95      branches:
    96      - ^{{ $.branch }}$
    97      labels:
    98        preset-dind-enabled: "true"
    99        preset-kind-volume-mounts: "true"
   100      always_run: false
   101      # Run if go files, scripts or configuration changed (we use the same for all jobs for simplicity).
   102      run_if_changed: '^((apis|config|controllers|feature|hack|packaging|pkg|test|webhooks)/|Dockerfile|go\.mod|go\.sum|main\.go|Makefile)'
   103      decorate: true
   104      path_alias: sigs.k8s.io/cluster-api-provider-vsphere
   105      spec:
   106        containers:
   107        - image: {{ $.config.TestImage }}
   108          # we need privileged mode in order to do docker in docker
   109          securityContext:
   110            privileged: true
   111            capabilities:
   112              add: ["NET_ADMIN"]
   113          resources:
   114            limits:
   115              cpu: 4
   116              memory: 3Gi
   117            requests:
   118              cpu: 4
   119              memory: 3Gi
   120          command:
   121          - runner.sh
   122          args:
   123          - make
   124          - test-integration
   125      annotations:
   126        testgrid-dashboards: vmware-cluster-api-provider-vsphere, sig-cluster-lifecycle-cluster-api-provider-vsphere
   127        testgrid-tab-name: pr-test-integration-{{ ReplaceAll $.branch "." "-" }}
   128        description: Runs integration tests
   129  {{ end -}}
   130  {{ $modes := list "govmomi" "supervisor" -}}
   131  {{ range $i, $mode := $modes -}}
   132  {{ $modeFocus := "" -}}
   133  {{ if eq $mode "supervisor" }}{{ $modeFocus = "\\\\[supervisor\\\\] " }}{{ end -}}
   134  {{/* e2e blocking for supervisor mode has been introduced with release-1.10 */ -}}
   135  {{ $skipInBranch := list -}}
   136  {{ if eq $mode "supervisor" }}{{ $skipInBranch = list "release-1.7" "release-1.8" "release-1.9" }}{{ end -}}
   137  {{ if has $.branch $skipInBranch | not }}
   138    - name: pull-cluster-api-provider-vsphere-e2e-{{ $mode }}-blocking-{{ ReplaceAll $.branch "." "-" }}
   139      branches:
   140      - ^{{ $.branch }}$
   141      labels:
   142        preset-dind-enabled: "true"
   143        preset-cluster-api-provider-vsphere-e2e-config: "true"
   144        preset-kind-volume-mounts: "true"
   145      always_run: false
   146      # Run if go files, scripts or configuration changed (we use the same for all jobs for simplicity).
   147      run_if_changed: '^((apis|config|controllers|feature|hack|packaging|pkg|test|webhooks)/|Dockerfile|go\.mod|go\.sum|main\.go|Makefile)'
   148      decorate: true
   149      path_alias: sigs.k8s.io/cluster-api-provider-vsphere
   150      max_concurrency: 3
   151      spec:
   152        containers:
   153        - image: {{ $.config.TestImage }}
   154          command:
   155          - runner.sh
   156          args:
   157          - ./hack/e2e.sh
   158          env:
   159          - name: GINKGO_FOCUS
   160            value: "{{ $modeFocus }}\\[PR-Blocking\\]"
   161          # we need privileged mode in order to do docker in docker
   162          securityContext:
   163            privileged: true
   164            capabilities:
   165              add: ["NET_ADMIN"]
   166          resources:
   167            requests:
   168              cpu: "4000m"
   169              memory: "6Gi"
   170      annotations:
   171        testgrid-dashboards: vmware-cluster-api-provider-vsphere, sig-cluster-lifecycle-cluster-api-provider-vsphere
   172        testgrid-tab-name: pr-e2e-{{ $mode }}-blocking-{{ ReplaceAll $.branch "." "-" }}
   173        description: Runs only PR Blocking e2e tests
   174  {{ end -}}
   175  {{/* e2e full for supervisor mode has been introduced with release-1.10 */ -}}
   176  {{ $skipInBranch = list -}}
   177  {{ if eq $mode "supervisor" }}{{ $skipInBranch = list "release-1.7" "release-1.8" "release-1.9" }}{{ end -}}
   178  {{ if has $.branch $skipInBranch | not }}
   179    - name: pull-cluster-api-provider-vsphere-e2e-{{ $mode }}-{{ ReplaceAll $.branch "." "-" }}
   180      branches:
   181      - ^{{ $.branch }}$
   182      labels:
   183        preset-dind-enabled: "true"
   184        preset-cluster-api-provider-vsphere-e2e-config: "true"
   185        preset-kind-volume-mounts: "true"
   186      always_run: false
   187      decorate: true
   188      decoration_config:
   189        timeout: 180m
   190      path_alias: sigs.k8s.io/cluster-api-provider-vsphere
   191      max_concurrency: 3
   192      spec:
   193        containers:
   194        - image: {{ $.config.TestImage }}
   195          command:
   196          - runner.sh
   197          args:
   198          - ./hack/e2e.sh
   199          env:
   200  {{- if ne $modeFocus "" }}
   201          - name: GINKGO_FOCUS
   202            value: "{{ trim $modeFocus }}"
   203  {{- end }}
   204          - name: GINKGO_SKIP
   205            value: "\\[Conformance\\] \\[specialized-infra\\]"
   206          # we need privileged mode in order to do docker in docker
   207          securityContext:
   208            privileged: true
   209            capabilities:
   210              add: ["NET_ADMIN"]
   211          resources:
   212            requests:
   213              cpu: "4000m"
   214              memory: "6Gi"
   215      annotations:
   216        testgrid-dashboards: vmware-cluster-api-provider-vsphere, sig-cluster-lifecycle-cluster-api-provider-vsphere
   217        testgrid-tab-name: pr-e2e-{{ $mode }}-{{ ReplaceAll $.branch "." "-" }}
   218        description: Runs all e2e tests
   219  {{ end -}}
   220  {{/* e2e with vcsim has been introduced with release-1.10 */ -}}
   221  {{ $skipInBranch = list "release-1.7" "release-1.8" "release-1.9" -}}
   222  {{ if has $.branch $skipInBranch | not }}
   223    - name: pull-cluster-api-provider-vsphere-e2e-vcsim-{{ $mode }}-{{ ReplaceAll $.branch "." "-" }}
   224      cluster: eks-prow-build-cluster
   225      branches:
   226      - ^{{ $.branch }}$
   227      labels:
   228        preset-dind-enabled: "true"
   229        preset-kind-volume-mounts: "true"
   230      always_run: false
   231      decorate: true
   232      decoration_config:
   233        timeout: 180m
   234      path_alias: sigs.k8s.io/cluster-api-provider-vsphere
   235      max_concurrency: 3
   236      spec:
   237        containers:
   238        - image: {{ $.config.TestImage }}
   239          command:
   240          - runner.sh
   241          args:
   242          - ./hack/e2e.sh
   243          env:
   244          - name: GINKGO_FOCUS
   245  {{- if eq $mode "supervisor" }}
   246            value: "\\[vcsim\\] \\[supervisor\\]"
   247  {{- else }}
   248            value: "\\[vcsim\\]"
   249  {{- end }}
   250          # we need privileged mode in order to do docker in docker
   251          securityContext:
   252            privileged: true
   253            capabilities:
   254              add: ["NET_ADMIN"]
   255          resources:
   256            requests:
   257              cpu: "4000m"
   258              memory: "3Gi"
   259            limits:
   260              cpu: "4000m"
   261              memory: "3Gi"
   262      annotations:
   263        testgrid-dashboards: vmware-cluster-api-provider-vsphere, sig-cluster-lifecycle-cluster-api-provider-vsphere
   264        testgrid-tab-name: pr-e2e-vcsim-{{ $mode }}-{{ ReplaceAll $.branch "." "-" }}
   265        description: Runs e2e tests with vcsim / govmomi mode
   266  {{ end -}}
   267  {{/* e2e upgrade has been introduced in release-1.9 */ -}}
   268  {{/* e2e upgrade in supervisor mode has been introduced in release-1.10 */ -}}
   269  {{ $skipInBranch = list "release-1.7" "release-1.8" -}}
   270  {{ if eq $mode "supervisor" }}{{ $skipInBranch = list "release-1.7" "release-1.8" "release-1.9" }}{{ end -}}
   271  {{ if has $.branch $skipInBranch | not }}
   272    - name: pull-cluster-api-provider-vsphere-e2e-{{ $mode }}-upgrade-{{ ReplaceAll (last $.config.Upgrades).From "." "-" }}-{{ ReplaceAll (last $.config.Upgrades).To "." "-" }}-{{ ReplaceAll $.branch "." "-" }}
   273      labels:
   274        preset-dind-enabled: "true"
   275        preset-cluster-api-provider-vsphere-e2e-config: "true"
   276        preset-kind-volume-mounts: "true"
   277      decorate: true
   278      always_run: false
   279      branches:
   280      # The script this job runs is not in all branches.
   281      - ^{{ $.branch }}$
   282      path_alias: sigs.k8s.io/cluster-api-provider-vsphere
   283      spec:
   284        containers:
   285        - image: {{ $.config.TestImage }}
   286          command:
   287          - runner.sh
   288          args:
   289          - ./hack/e2e.sh
   290          env:
   291          - name: GINKGO_FOCUS
   292            value: "{{ $modeFocus }}\\[Conformance\\] \\[K8s-Upgrade\\]"
   293          - name: KUBERNETES_VERSION_UPGRADE_FROM
   294            value: "{{ index (index $.versions ((last $.config.Upgrades).From)) "k8sRelease" }}"
   295          - name: KUBERNETES_VERSION_UPGRADE_TO
   296            value: "{{ index (index $.versions ((last $.config.Upgrades).To)) "k8sRelease" }}"
   297          # we need privileged mode in order to do docker in docker
   298          securityContext:
   299            privileged: true
   300            capabilities:
   301              add: ["NET_ADMIN"]
   302          resources:
   303            requests:
   304              cpu: "4000m"
   305              memory: "6Gi"
   306      annotations:
   307        testgrid-dashboards: vmware-cluster-api-provider-vsphere, sig-cluster-lifecycle-cluster-api-provider-vsphere
   308        testgrid-tab-name: pr-e2e-{{ $mode }}-{{ ReplaceAll $.branch "." "-" }}-{{ ReplaceAll (last $.config.Upgrades).From "." "-" }}-{{ ReplaceAll (last $.config.Upgrades).To "." "-" }}
   309  {{ end -}}
   310  {{/* e2e conformance with supervisor mode has been introduced with release-1.10 */ -}}
   311  {{ $skipInBranch = list -}}
   312  {{ if eq $mode "supervisor" }}{{ $skipInBranch = list "release-1.7" "release-1.8" "release-1.9" }}{{ end -}}
   313  {{ if has $.branch $skipInBranch | not }}
   314    - name: pull-cluster-api-provider-vsphere-e2e-{{ $mode }}-conformance-{{ ReplaceAll $.branch "." "-" }}
   315      branches:
   316      - ^{{ $.branch }}$
   317      labels:
   318        preset-dind-enabled: "true"
   319        preset-cluster-api-provider-vsphere-e2e-config: "true"
   320        preset-kind-volume-mounts: "true"
   321      always_run: false
   322      decorate: true
   323      path_alias: sigs.k8s.io/cluster-api-provider-vsphere
   324      max_concurrency: 3
   325      spec:
   326        containers:
   327        - image: {{ $.config.TestImage }}
   328          command:
   329          - runner.sh
   330          args:
   331          - ./hack/e2e.sh
   332          env:
   333          - name: GINKGO_FOCUS
   334  {{- if eq $.branch "release-1.7" "release-1.8" }}
   335            value: "{{ $modeFocus }}\\[Conformance\\]"
   336  {{- else }}
   337            value: "{{ $modeFocus }}\\[Conformance\\] \\[K8s-Install\\]"
   338  {{- end }}
   339          # we need privileged mode in order to do docker in docker
   340          securityContext:
   341            privileged: true
   342            capabilities:
   343              add: ["NET_ADMIN"]
   344          resources:
   345            requests:
   346              cpu: "4000m"
   347              memory: "6Gi"
   348      annotations:
   349        testgrid-dashboards: vmware-cluster-api-provider-vsphere, sig-cluster-lifecycle-cluster-api-provider-vsphere
   350        testgrid-tab-name: pr-e2e-{{ $mode }}-conformance-{{ ReplaceAll $.branch "." "-" }}
   351        description: Runs conformance tests for CAPV
   352  {{ end -}}
   353  {{/* e2e conformance-ci-latest has been introduced with release-1.9 */ -}}
   354  {{/* e2e conformance-ci-latest with supervisor mode has been introduced with release-1.10 */ -}}
   355  {{ $skipInBranch = list "release-1.7" "release-1.8" -}}
   356  {{ if eq $mode "supervisor" }}{{ $skipInBranch = list "release-1.7" "release-1.8" "release-1.9" }}{{ end -}}
   357  {{ if has $.branch $skipInBranch | not }}
   358    - name: pull-cluster-api-provider-vsphere-e2e-{{ $mode }}-conformance-ci-latest-{{ ReplaceAll $.branch "." "-" }}
   359      branches:
   360      - ^{{ $.branch }}$
   361      labels:
   362        preset-dind-enabled: "true"
   363        preset-cluster-api-provider-vsphere-e2e-config: "true"
   364        preset-kind-volume-mounts: "true"
   365      always_run: false
   366      decorate: true
   367      path_alias: sigs.k8s.io/cluster-api-provider-vsphere
   368      max_concurrency: 3
   369      spec:
   370        containers:
   371        - image: {{ $.config.TestImage }}
   372          command:
   373          - runner.sh
   374          args:
   375          - ./hack/e2e.sh
   376          env:
   377          - name: GINKGO_FOCUS
   378            value: "{{ $modeFocus }}\\[Conformance\\] \\[K8s-Install-ci-latest\\]"
   379          # we need privileged mode in order to do docker in docker
   380          securityContext:
   381            privileged: true
   382            capabilities:
   383              add: ["NET_ADMIN"]
   384          resources:
   385            requests:
   386              cpu: "4000m"
   387              memory: "6Gi"
   388      annotations:
   389        testgrid-dashboards: vmware-cluster-api-provider-vsphere, sig-cluster-lifecycle-cluster-api-provider-vsphere
   390        testgrid-tab-name: pr-e2e-{{ $mode }}-conformance-ci-latest-{{ ReplaceAll $.branch "." "-" }}
   391        description: Runs conformance tests with K8S ci latest for CAPV
   392  {{ end -}}
   393  {{ end -}}