-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use ociblob instead of ocilocalblob for oci v2 (#1768)
* remove compatible attribute for v2, so that v2 generate resources with ociblob instead of depricated ocilocalblob * add e2e test * add e2e test * add module config test * add module config test * fix github action * extend e2e test drop gotest.tools * fix lint * test repoURL * fix TEST_REPOSITORY_URL location * gofmt * align name
- Loading branch information
Showing
14 changed files
with
232 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: TestSuite E2E - create module | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
e2e: | ||
strategy: | ||
matrix: | ||
e2e-test: [ "create_module_kubebuilder_project", "create_module_module_config"] | ||
name: "Run E2E tests" | ||
runs-on: ubuntu-latest | ||
env: | ||
K3D_VERSION: v5.4.7 | ||
MODULE_TEMPLATE_VERSION: v1.0.0 | ||
OCI_REPOSITORY_URL: http://k3d-oci.localhost:5001 | ||
steps: | ||
- name: Checkout Kyma CLI | ||
uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache-dependency-path: 'go.sum' | ||
- name: Build Kyma CLI | ||
run: | | ||
make resolve validate build-linux | ||
chmod +x ./bin/kyma-linux | ||
ls -la ./bin | ||
mv ./bin/kyma-linux /usr/local/bin/kyma | ||
timeout-minutes: 10 | ||
- name: Checkout template-operator | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: kyma-project/template-operator | ||
path: ./template-operator/ | ||
- name: export template-operator URL | ||
run: | | ||
cd ./template-operator | ||
echo "TEST_REPOSITORY_URL=$(git remote get-url origin)" >> "$GITHUB_ENV" | ||
- name: Set up k3d | ||
run: wget -qO - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=$K3D_VERSION bash | ||
- name: Provision OCI Registry | ||
run: | | ||
k3d registry create oci.localhost --port 5001 | ||
- name: Run create module with kubebuilder-project | ||
if: ${{ matrix.e2e-test == 'create_module_kubebuilder_project' }} | ||
run: | | ||
kyma alpha create module \ | ||
--name kyma-project.io/module/template-operator \ | ||
--path ./template-operator \ | ||
--registry http://k3d-oci.localhost:5001 \ | ||
--insecure \ | ||
--kubebuilder-project \ | ||
--version $MODULE_TEMPLATE_VERSION -v \ | ||
--output /tmp/kubebuilder-template.yaml | ||
echo "MODULE_TEMPLATE_PATH=/tmp/kubebuilder-template.yaml" >> "$GITHUB_ENV" | ||
- name: Run create module with module-config | ||
if: ${{ matrix.e2e-test == 'create_module_module_config' }} | ||
run: | | ||
cd ./template-operator | ||
make build-manifests | ||
kyma alpha create module \ | ||
--name kyma-project.io/module/template-operator \ | ||
--path . \ | ||
--registry http://k3d-oci.localhost:5001 \ | ||
--insecure \ | ||
--module-config-file ./module-config.yaml \ | ||
--version $MODULE_TEMPLATE_VERSION -v \ | ||
--output /tmp/module-config-template.yaml | ||
echo "MODULE_TEMPLATE_PATH=/tmp/module-config-template.yaml" >> "$GITHUB_ENV" | ||
- name: Verify module template | ||
run: | | ||
echo $MODULE_TEMPLATE_PATH | ||
make -C tests/e2e ${{ matrix.e2e-test }} |
2 changes: 1 addition & 1 deletion
2
.github/workflows/smoke-test.yml → .github/workflows/test-smoke.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Smoke Tests | ||
name: TestSuite Smoke | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) | ||
ifeq (,$(shell go env GOBIN)) | ||
GOBIN=$(shell go env GOPATH)/bin | ||
else | ||
GOBIN=$(shell go env GOBIN) | ||
endif | ||
|
||
# Setting SHELL to bash allows bash commands to be executed by recipes. | ||
# This is a requirement for 'setup-envtest.sh' in the test target. | ||
# Options are set to exit when a recipe line exits non-zero or a piped command fails. | ||
SHELL = /usr/bin/env bash -o pipefail | ||
.SHELLFLAGS = -ec | ||
|
||
|
||
##@ General | ||
|
||
# The help target prints out all targets with their descriptions organized | ||
# beneath their categories. The categories are represented by '##@' and the | ||
# target descriptions by '##'. The awk commands is responsible for reading the | ||
# entire set of makefiles included in this invocation, looking for lines of the | ||
# file as xyz: ## something, and then pretty-format the target and help. Then, | ||
# if there's a line with ##@ something, that gets pretty-printed as a category. | ||
# More info on the usage of ANSI control characters for terminal formatting: | ||
# https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters | ||
# More info on the awk command: | ||
# http://linuxcommand.org/lc3_adv_awk.php | ||
|
||
.PHONY: help | ||
help: ## Display this help. | ||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) | ||
|
||
##@ E2E Tests | ||
|
||
.PHONY: create_module_kubebuilder_project | ||
create_module_kubebuilder_project: | ||
go test --tags=create_module_kubebuilder_project | ||
|
||
.PHONY: create_module_module_config | ||
create_module_module_config: | ||
go test --tags=create_module_module_config |
Oops, something went wrong.