File tree Expand file tree Collapse file tree 9 files changed +83
-234
lines changed Expand file tree Collapse file tree 9 files changed +83
-234
lines changed Original file line number Diff line number Diff line change 69
69
REGISTRY : ${{ env.REGISTRY }}
70
70
IMAGE_NAME : ${{ env.IMAGE_NAME }}
71
71
TAG : ${{ steps.meta.outputs.version }}
72
- E2E_CONF_FILE_SOURCE : " ${{ github.workspace }}/test/e2e/config/hetzner-ci.yaml"
73
72
MANIFEST_PATH : " ../../../out"
74
73
HCLOUD_TOKEN : ${{ env.HCLOUD_TOKEN }}
75
74
HETZNER_ROBOT_USER : ${{ inputs.e2e_robot_user }}
Original file line number Diff line number Diff line change 5
5
branches :
6
6
- main
7
7
- " releases/**"
8
- paths :
9
- - " **.go"
10
- - " **go.mod"
11
- - " **go.sum"
12
- - " <templates|test>/**/*.<yml|yaml>"
13
- - " .github/actions/**/*"
14
- - " .github/workflows/e2e-*"
15
- - " .github/workflows/pr-*"
16
- - " images/caph/**"
17
- - " !**/vendor/**"
18
- - " test/e2e/**"
8
+ paths-ignore :
9
+ - " **/*.md"
19
10
env :
20
11
IMAGE_NAME : caph-staging
21
12
REGISTRY : ghcr.io/syself
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ config/samples
52
52
53
53
# test results
54
54
_artifacts
55
- test /e2e /config /hetzner-ci-envsubst .yaml
55
+ test /e2e /config /hetzner.tmp .yaml
56
56
resp.json
57
57
** manifest.json
58
58
Original file line number Diff line number Diff line change @@ -17,16 +17,17 @@ rules:
17
17
min-spaces-from-content : 1
18
18
19
19
yaml-files :
20
- - ' *.yaml'
21
- - ' *.yml'
20
+ - " *.yaml"
21
+ - " *.yml"
22
22
23
23
ignore :
24
- - ' **/vendor/**'
25
- - ' .cache'
24
+ - " **/vendor/**"
25
+ - " .cache"
26
26
- _artifacts
27
+ - tmp/**
27
28
- config/crd/**/*.yaml
28
29
- config/rbac/**/*.yaml
29
30
- config/webhook/**/*.yaml
30
31
- test/e2e/data/**/*.yaml
31
- - test/e2e/config/hetzner-ci-envsubst .yaml
32
- - baremetalhosts .yaml
32
+ - baremetalhosts .yaml
33
+ - test/e2e/config/hetzner.tmp .yaml
Original file line number Diff line number Diff line change @@ -476,7 +476,7 @@ KUBEBUILDER_ASSETS ?= $(shell $(SETUP_ENVTEST) use --use-env --bin-dir $(abspath
476
476
477
477
E2E_DIR ?= $(ROOT_DIR ) /test/e2e
478
478
E2E_CONF_FILE_SOURCE ?= $(E2E_DIR ) /config/$(INFRA_PROVIDER ) .yaml
479
- E2E_CONF_FILE ?= $(E2E_DIR ) /config/$(INFRA_PROVIDER ) -ci-envsubst .yaml
479
+ E2E_CONF_FILE ?= $(E2E_DIR ) /config/$(INFRA_PROVIDER ) .tmp .yaml
480
480
481
481
.PHONY : test-unit
482
482
test-unit : $(SETUP_ENVTEST ) $(GOTESTSUM ) # # Run unit and integration tests
@@ -487,11 +487,11 @@ test-unit: $(SETUP_ENVTEST) $(GOTESTSUM) ## Run unit and integration tests
487
487
e2e-image : # # Build the e2e manager image
488
488
docker build --pull --build-arg ARCH=$(ARCH ) --build-arg LDFLAGS=" $( LDFLAGS) " -t $(IMAGE_PREFIX ) /$(STAGING_IMAGE ) :e2e -f images/$(INFRA_SHORT ) /Dockerfile .
489
489
490
- .PHONY : $( E2E_CONF_FILE )
490
+ .PHONY : e2e-conf-file
491
491
e2e-conf-file : $(E2E_CONF_FILE )
492
- $(E2E_CONF_FILE ) : $(ENVSUBST ) $(E2E_CONF_FILE_SOURCE )
493
- mkdir -p $( shell dirname $( E2E_CONF_FILE ) )
494
- MANAGEMENT_CLUSTER_NAME= " $( INFRA_SHORT ) -e2e-$$ (date + " %Y%m%d-%H%M%S " )- $$ USER " $( ENVSUBST ) < $( E2E_CONF_FILE_SOURCE ) > $( E2E_CONF_FILE )
492
+ $(E2E_CONF_FILE ) : $(ENVSUBST ) $(E2E_CONF_FILE_SOURCE ) ./hack/create-e2e-conf-file.sh
493
+ CAPH_LATEST_VERSION= $( CAPH_LATEST_VERSION ) ENVSUBST= $( ENVSUBST ) E2E_CONF_FILE_SOURCE= $( E2E_CONF_FILE_SOURCE ) \
494
+ E2E_CONF_FILE= $( E2E_CONF_FILE ) ./hack/create -e2e-conf-file.sh
495
495
496
496
.PHONY : test-e2e
497
497
test-e2e : $(E2E_CONF_FILE ) $(if $(SKIP_IMAGE_BUILD ) ,,e2e-image) $(ARTIFACTS )
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Copyright 2022 The Kubernetes Authors.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ trap ' echo "ERROR: A command has failed. Exiting the script. Line was ($0:$LINENO): $(sed -n "${LINENO}p" "$0")"; exit 3' ERR
18
+ set -Eeuo pipefail
19
+
20
+ ./hack/ensure-env-variables.sh CAPH_LATEST_VERSION ENVSUBST E2E_CONF_FILE_SOURCE E2E_CONF_FILE
21
+
22
+ # When called via CI, MANIFEST_PATH is already set. It points to the "out" directory
23
+ # created with the Github action "download-artifacts".
24
+ if [ -z " ${MANIFEST_PATH:- } " ]; then
25
+ export MANIFEST_PATH=" ../../.."
26
+ fi
27
+
28
+ echo " # Created from $E2E_CONF_FILE_SOURCE by $0 " > " $E2E_CONF_FILE "
29
+ $ENVSUBST < " $E2E_CONF_FILE_SOURCE " >> " $E2E_CONF_FILE "
Original file line number Diff line number Diff line change 18
18
19
19
.DEFAULT_GOAL: =help
20
20
21
+ SHELL = /usr/bin/env bash -o pipefail
22
+
21
23
REPO_ROOT := $(shell git rev-parse --show-toplevel)
22
24
23
25
help : # # Display this help
@@ -115,7 +117,7 @@ ARTIFACTS ?= $(ROOT_DIR)/_artifacts
115
117
SKIP_CLEANUP ?= false
116
118
SKIP_CREATE_MGMT_CLUSTER ?= false
117
119
E2E_DIR ?= $(REPO_ROOT ) /test/e2e
118
- E2E_CONF_FILE ?= $(E2E_DIR ) /config/hetzner-ci-envsubst .yaml
120
+ E2E_CONF_FILE ?= $(E2E_DIR ) /config/hetzner.tmp .yaml
119
121
KUBETEST_CONF_PATH ?= $(abspath $(E2E_DIR ) /data/kubetest/conformance.yaml)
120
122
121
123
# # to set multiple ginkgo skip flags, if any
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments