Skip to content

Commit

Permalink
chore(ci): removing staging variables
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed Jul 30, 2024
1 parent 75b3eee commit 56dcdc1
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 51 deletions.
1 change: 0 additions & 1 deletion .github/actions/e2e-common/exec-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ if [ -n "${BUILD_CATALOG_SOURCE_NAMESPACE}" ]; then
export KAMEL_INSTALL_OLM_CHANNEL="${NEW_XY_CHANNEL}"
fi

export KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
export KAMEL_INSTALL_REGISTRY=${REGISTRY_PULL_HOST}
export KAMEL_INSTALL_REGISTRY_INSECURE=${REGISTRY_INSECURE}
export KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
Expand Down
1 change: 0 additions & 1 deletion .github/actions/e2e-install/exec-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export CUSTOM_IMAGE=${IMAGE_NAME}
export CUSTOM_VERSION=${IMAGE_VERSION}

# Configure install options
export KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
export KAMEL_INSTALL_REGISTRY=${REGISTRY_PULL_HOST}
export KAMEL_INSTALL_REGISTRY_INSECURE=${REGISTRY_INSECURE}

Expand Down
3 changes: 1 addition & 2 deletions .github/actions/e2e-knative/exec-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ if [ -n "${BUILD_CATALOG_SOURCE_NAMESPACE}" ]; then
export KAMEL_INSTALL_OLM_CHANNEL="${NEW_XY_CHANNEL}"
fi

KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
export KAMEL_INSTALL_MAVEN_REPOSITORIES

export KAMEL_INSTALL_REGISTRY=${REGISTRY_PULL_HOST}
export KAMEL_INSTALL_REGISTRY_INSECURE=${REGISTRY_INSECURE}
export KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
Expand Down
3 changes: 1 addition & 2 deletions .github/actions/e2e-native/exec-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ if [ -n "${BUILD_CATALOG_SOURCE_NAMESPACE}" ]; then
export KAMEL_INSTALL_OLM_CHANNEL="${NEW_XY_CHANNEL}"
fi

KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
export KAMEL_INSTALL_MAVEN_REPOSITORIES

export KAMEL_INSTALL_REGISTRY=${REGISTRY_PULL_HOST}
export KAMEL_INSTALL_REGISTRY_INSECURE=${REGISTRY_INSECURE}
export KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
Expand Down
1 change: 0 additions & 1 deletion .github/actions/e2e-telemetry/exec-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ if [ -n "${BUILD_CATALOG_SOURCE_NAMESPACE}" ]; then
export KAMEL_INSTALL_OLM_CHANNEL="${NEW_XY_CHANNEL}"
fi

export KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
export KAMEL_INSTALL_REGISTRY=${REGISTRY_PULL_HOST}
export KAMEL_INSTALL_REGISTRY_INSECURE=${REGISTRY_INSECURE}
export KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
Expand Down
6 changes: 1 addition & 5 deletions .github/actions/release-nightly/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ runs:
echo "Using IMAGE_NAME=$IMAGE_NAME"
echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV
MAVEN_REPOSITORY=$(make get-staging-repo)
echo "Using MAVEN_REPOSITORY=$MAVEN_REPOSITORY"
echo "MAVEN_REPOSITORY=$MAVEN_REPOSITORY" >> $GITHUB_ENV
- name: Install newer docker CLI supporting multi platform build
shell: bash
run: |
Expand Down Expand Up @@ -129,7 +125,7 @@ runs:
To test it, download the client for your OS and run:
```
kamel install --olm=false --maven-repository=${{ env.MAVEN_REPOSITORY }}
kamel install --olm=false
```
NOTE: last updated on ${{ env.UPD_DATE }}
token: ${{ inputs.secretGithubToken }}
Expand Down
25 changes: 0 additions & 25 deletions e2e/support/test_staging_hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,6 @@ import (
)

func init() {
// Let's use the STAGING_RUNTIME_REPO if available
runtimeRepo := os.Getenv("STAGING_RUNTIME_REPO")
if runtimeRepo != "" {
KamelHooks = append(KamelHooks, func(args []string) []string {
if len(args) > 0 && args[0] == "install" {
args = append(args, fmt.Sprintf("--maven-repository=%s", runtimeRepo))
}
return args
})
}

// this hook can be also used to test a released version of the operator, e.g. the staging version during a voting period
// Uncomment the following lines and change references to enable the hook

// TestImageName = "docker.io/camelk/camel-k"
// TestImageVersion = "1.0.0-M2"

// KamelHooks = append(KamelHooks, func(args []string) []string {
// if len(args) > 0 && args[0] == "install" {
// args = append(args, "--operator-image=docker.io/camelk/camel-k:1.0.0-M2")
// args = append(args, "--maven-repository=https://repository.apache.org/content/repositories/orgapachecamel-1156")
// }
// return args
// })

// Apply env vars for the test operator image to args if present
imageName := os.Getenv("CAMEL_K_TEST_IMAGE_NAME")
imageVersion := os.Getenv("CAMEL_K_TEST_IMAGE_VERSION")
Expand Down
21 changes: 7 additions & 14 deletions script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ OPM := opm

# Used to push pre-release artifacts
STAGING_IMAGE := docker.io/camelk/camel-k
STAGING_RUNTIME_REPO :=

# Kamelets options
INSTALL_DEFAULT_KAMELETS ?= true
Expand Down Expand Up @@ -170,7 +169,6 @@ bump-replace:
@mvn -f java/crds/pom.xml versions:set -DgenerateBackupPoms=false -DnewVersion=$(VERSION)
@mvn -f java/maven-logging/pom.xml versions:set -DgenerateBackupPoms=false -DnewVersion=$(VERSION)
@sed -i 's/^LAST_RELEASED_VERSION ?= .*$//LAST_RELEASED_VERSION ?= $(LAST_RELEASED_VERSION)/' ./script/Makefile
@sed -i 's/^STAGING_RUNTIME_REPO :=.*$//STAGING_RUNTIME_REPO :=/' ./script/Makefile

bump: bump-replace codegen bundle

Expand Down Expand Up @@ -278,15 +276,15 @@ setup-knative:
# the time to complete (they are used also as smoke test for nightly release)
#
test-common:
FAILED=0; STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)"; \
FAILED=0; \
go test -p $(TEST_COMMON_PARALLEL_COUNT) -timeout 90m -v ./e2e/common/... --parallel 1 -tags=integration $(GOTESTFMT) || ((FAILED++)); \
exit $${FAILED}

#
# Smoke tests are a subset of common tests used to quickly verify the operator
#
test-smoke:
FAILED=0; STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)"; \
FAILED=0; \
go test -p $(TEST_COMMON_PARALLEL_COUNT) -timeout 30m -v \
./e2e/common/languages \
./e2e/common/traits \
Expand All @@ -298,15 +296,15 @@ test-smoke:
# Common tests that require some particular operator setting or need to be installed in multiple namespaces
#
test-advanced:
FAILED=0; STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)"; \
FAILED=0; \
go test -p 1 -timeout 90m -v ./e2e/advanced --parallel $(TEST_ADVANCED_PARALLEL_COUNT) -tags=integration $(GOTESTFMT) || ((FAILED++)); \
exit $${FAILED}

#
# Installation procedure test using CLi and Kustomize methodologies
#
test-install:
FAILED=0; STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)"; \
FAILED=0; \
go test -timeout 20m -v ./e2e/install/kustomize -tags=integration $(GOTESTFMT) || ((FAILED++)); \
go test -timeout 20m -v ./e2e/install/helm -tags=integration $(GOTESTFMT) || ((FAILED++)); \
go test -timeout 20m -v ./e2e/install/olm -tags=integration $(GOTESTFMT) || ((FAILED++)); \
Expand All @@ -317,22 +315,20 @@ test-install:
# Knative tests that require the presence of Knative configuration
#
test-knative:
STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)"; \
FAILED=0; \
go test -timeout 60m -v ./e2e/knative -tags=integration $(GOTESTFMT) || ((FAILED++)); \
exit $${FAILED}

#
# Telemetry tests that require the configuration of telemetry endpoints
#
test-telemetry:
STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" \
go test -timeout 30m -v ./e2e/telemetry -tags=integration $(GOTESTFMT)

#
# Quarkus native test (requires certain CPU and memory conditions)
#
test-quarkus-native:
STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" \
go test -timeout 180m -v ./e2e/native -tags=integration $(GOTESTFMT)

build-kamel:
Expand All @@ -351,7 +347,7 @@ ifneq ($(shell uname -s 2>/dev/null || echo Unknown),Linux)
endif

build-resources:
./script/get_catalog.sh $(DEFAULT_RUNTIME_VERSION) $(STAGING_RUNTIME_REPO)
./script/get_catalog.sh $(DEFAULT_RUNTIME_VERSION)

bundle-kamelets:
@echo "Preparing Kamelets bundle resource..."
Expand Down Expand Up @@ -446,7 +442,7 @@ images: build maven-overlay bundle-kamelets image-build build-kamel-platform

image-build:
ifneq (,$(findstring SNAPSHOT,$(DEFAULT_RUNTIME_VERSION)))
./script/package_maven_artifacts.sh -s "$(STAGING_RUNTIME_REPO)" -d "$(CAMEL_K_RUNTIME_DIR)" $(DEFAULT_RUNTIME_VERSION)
./script/package_maven_artifacts.sh -d "$(CAMEL_K_RUNTIME_DIR)" $(DEFAULT_RUNTIME_VERSION)
endif
@echo "####### Building Camel K operator arch $(IMAGE_ARCH) container image..."
mkdir -p build/_maven_output
Expand Down Expand Up @@ -547,9 +543,6 @@ release-kustomize:
RELEASE_NAME=$(PACKAGE) \
./script/release_kustomize.sh

get-staging-repo:
@echo $(or ${STAGING_RUNTIME_REPO},https://repository.apache.org/content/repositories/snapshots@id=apache-snapshots@snapshots)

.PHONY: do-build build build-kamel build-kamel-platform build-resources dep codegen images images-push images-push-staging image-build test check clean release cross-compile package-examples set-version git-tag check-licenses build-resources release-helm release-staging release-nightly get-staging-repo get-version bundle-kamelets
.PHONY: controller-gen kubectl kustomize operator-sdk opm

Expand Down

0 comments on commit 56dcdc1

Please sign in to comment.