From 331df963a931acb7883a7351daf8a16f2241a21a Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 11:55:54 +0530 Subject: [PATCH 01/17] new olm test --- Makefile | 2 +- .../nexus-operator.clusterserviceversion.yaml | 28 +++++++++---------- config/manager/kustomization.yaml | 2 +- hack/ci/operator-olm-test.sh | 19 ++----------- 4 files changed, 19 insertions(+), 32 deletions(-) diff --git a/Makefile b/Makefile index 363a1fde..f35a7ad8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SHELL := /bin/bash # Current Operator version -VERSION ?= 0.4.0 +VERSION ?= 1.0.0-snapshot # Default bundle image tag BUNDLE_IMG ?= controller-bundle:$(VERSION) # Options for 'bundle-build' diff --git a/bundle/manifests/nexus-operator.clusterserviceversion.yaml b/bundle/manifests/nexus-operator.clusterserviceversion.yaml index 8b2f7e7e..39313177 100644 --- a/bundle/manifests/nexus-operator.clusterserviceversion.yaml +++ b/bundle/manifests/nexus-operator.clusterserviceversion.yaml @@ -43,7 +43,7 @@ metadata: repository: https://github.com/m88i/nexus-operator support: m88i Labs tectonic-visibility: ocs - name: nexus-operator.v0.4.0 + name: nexus-operator.v1.0.0-snapshot namespace: placeholder spec: apiservicedefinitions: {} @@ -214,17 +214,6 @@ spec: control-plane: controller-manager spec: containers: - - args: - - --metrics-addr=127.0.0.1:8080 - - --enable-leader-election - command: - - /manager - image: quay.io/m88i/nexus-operator:0.4.0 - name: manager - resources: - requests: - cpu: 100m - memory: 20Mi - args: - --secure-listen-address=0.0.0.0:8443 - --upstream=http://127.0.0.1:8080/ @@ -236,6 +225,17 @@ spec: - containerPort: 8443 name: https resources: {} + - args: + - --metrics-addr=127.0.0.1:8080 + - --enable-leader-election + command: + - /manager + image: quay.io/m88i/nexus-operator:1.0.0-snapshot + name: manager + resources: + requests: + cpu: 100m + memory: 20Mi terminationGracePeriodSeconds: 10 permissions: - rules: @@ -301,5 +301,5 @@ spec: maturity: alpha provider: name: m88i Labs - replaces: nexus-operator.v0.3.0 - version: 0.4.0 + replaces: nexus-operator.v0.4.0 + version: 1.0.0-snapshot diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index c2f8e2ea..467f0185 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: controller newName: quay.io/m88i/nexus-operator - newTag: 0.4.0 + newTag: 1.0.0-snapshot diff --git a/hack/ci/operator-olm-test.sh b/hack/ci/operator-olm-test.sh index 2ba84c4b..a564d35c 100755 --- a/hack/ci/operator-olm-test.sh +++ b/hack/ci/operator-olm-test.sh @@ -17,11 +17,6 @@ source ./hack/verify-version.sh source ./hack/ci/operator-ensure-manifest.sh -CATALOG_IMAGE="operatorhubio-catalog:temp" -OP_PATH="community-operators/nexus-operator-m88i" -INSTALL_MODE="SingleNamespace" -OPERATOR_TESTING_IMAGE="quay.io/operator-framework/operator-testing:latest" - if [ -z ${KUBECONFIG} ]; then KUBECONFIG=${HOME}/.kube/config echo "---> KUBECONFIG environment variable not set, defining to:" @@ -34,15 +29,7 @@ sed -i 's/imagePullPolicy: Always/imagePullPolicy: Never/g' ${csv_file} echo "---> Resulting imagePullPolicy on manifest files" grep -rn imagePullPolicy ${OUTPUT}/nexus-operator-m88i -echo "---> Building temporary catalog Image" -docker build --build-arg PERMISSIVE_LOAD=false -f ./hack/ci/operatorhubio-catalog.Dockerfile -t ${CATALOG_IMAGE} . -echo "---> Loading Catalog Image into Kind" -kind load docker-image ${CATALOG_IMAGE} --name ${CLUSTER_NAME} -# running tests -docker pull ${OPERATOR_TESTING_IMAGE} -docker run --network=host --rm \ - -v ${KUBECONFIG}:/root/.kube/config:z \ - -v ${OUTPUT}:/community-operators:z ${OPERATOR_TESTING_IMAGE} \ - operator.test --no-print-directory \ - OP_PATH=${OP_PATH} VERBOSE=true NO_KIND=0 CATALOG_IMAGE=${CATALOG_IMAGE} INSTALL_MODE=${INSTALL_MODE} +bash <(curl -sL https://cutt.ly/operator-test) \ +all \ +${output}/nexus-operator-m88i/${OP_VERSION} From 953c66424d631438e650fe2257829fd486734464 Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 12:14:57 +0530 Subject: [PATCH 02/17] fix var --- hack/ci/operator-olm-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/ci/operator-olm-test.sh b/hack/ci/operator-olm-test.sh index a564d35c..84f75740 100755 --- a/hack/ci/operator-olm-test.sh +++ b/hack/ci/operator-olm-test.sh @@ -32,4 +32,4 @@ grep -rn imagePullPolicy ${OUTPUT}/nexus-operator-m88i bash <(curl -sL https://cutt.ly/operator-test) \ all \ -${output}/nexus-operator-m88i/${OP_VERSION} +${OUTPUT}/nexus-operator-m88i/${OP_VERSION} From 449a2636e6fc6876797d87c101d59d4a95c56c6f Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 12:15:31 +0530 Subject: [PATCH 03/17] quick thing --- .github/workflows/nexus-operator-integration-checks.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/nexus-operator-integration-checks.yaml b/.github/workflows/nexus-operator-integration-checks.yaml index 69eda8b8..460d1e47 100644 --- a/.github/workflows/nexus-operator-integration-checks.yaml +++ b/.github/workflows/nexus-operator-integration-checks.yaml @@ -102,7 +102,6 @@ jobs: integration_tests: name: Integration Tests # we should wait for an ok from the other two - needs: [golint, unit_test] runs-on: ubuntu-latest env: CLUSTER_NAME: operator-test From e50ce9d2399ed7ed59e96efc14158cdf8158b34b Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 12:25:08 +0530 Subject: [PATCH 04/17] small fix --- hack/ci/operator-ensure-manifest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/ci/operator-ensure-manifest.sh b/hack/ci/operator-ensure-manifest.sh index e3a19cb0..7b8acd10 100755 --- a/hack/ci/operator-ensure-manifest.sh +++ b/hack/ci/operator-ensure-manifest.sh @@ -16,7 +16,7 @@ source ./hack/verify-version.sh -OUTPUT="${PWD}/build/_output/operatorhub" +OUTPUT="${PWD}/build/_output/operatorhub/community-operators" echo "---> Output dir is set to ${OUTPUT}" From e95ef04113f4b6eb85a00d77cfb03f8fb6e6504b Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 13:31:37 +0530 Subject: [PATCH 05/17] small test --- .github/workflows/nexus-operator-integration-checks.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/nexus-operator-integration-checks.yaml b/.github/workflows/nexus-operator-integration-checks.yaml index 460d1e47..3ce8bcc2 100644 --- a/.github/workflows/nexus-operator-integration-checks.yaml +++ b/.github/workflows/nexus-operator-integration-checks.yaml @@ -148,3 +148,10 @@ jobs: - name: Run Operator OLM Integration Test run: make ci-olm-test + - name: check logs + if: ${{ failure() }} + - name: Archive code coverage results + uses: actions/upload-artifact@v2 + with: + name: test-logs + path: /tmp/op-test/log.out \ No newline at end of file From 2e601732dedfe487daaa53223ad220fd0a9c61c0 Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 13:32:42 +0530 Subject: [PATCH 06/17] small test --- .github/workflows/nexus-operator-integration-checks.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nexus-operator-integration-checks.yaml b/.github/workflows/nexus-operator-integration-checks.yaml index 3ce8bcc2..54f0b827 100644 --- a/.github/workflows/nexus-operator-integration-checks.yaml +++ b/.github/workflows/nexus-operator-integration-checks.yaml @@ -150,6 +150,7 @@ jobs: run: make ci-olm-test - name: check logs if: ${{ failure() }} + run: tail -f /tmp/op-test/log.out - name: Archive code coverage results uses: actions/upload-artifact@v2 with: From 1192404fdc24e538dc606891b7b902411f978bd3 Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 13:49:30 +0530 Subject: [PATCH 07/17] remove failure line --- .github/workflows/nexus-operator-integration-checks.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/nexus-operator-integration-checks.yaml b/.github/workflows/nexus-operator-integration-checks.yaml index 54f0b827..c393691e 100644 --- a/.github/workflows/nexus-operator-integration-checks.yaml +++ b/.github/workflows/nexus-operator-integration-checks.yaml @@ -149,8 +149,6 @@ jobs: - name: Run Operator OLM Integration Test run: make ci-olm-test - name: check logs - if: ${{ failure() }} - run: tail -f /tmp/op-test/log.out - name: Archive code coverage results uses: actions/upload-artifact@v2 with: From 4b69cdcacab19c7839b423ed30addff84edb00ea Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 13:50:19 +0530 Subject: [PATCH 08/17] remove failure line --- .github/workflows/nexus-operator-integration-checks.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/nexus-operator-integration-checks.yaml b/.github/workflows/nexus-operator-integration-checks.yaml index c393691e..8942c60f 100644 --- a/.github/workflows/nexus-operator-integration-checks.yaml +++ b/.github/workflows/nexus-operator-integration-checks.yaml @@ -148,7 +148,6 @@ jobs: - name: Run Operator OLM Integration Test run: make ci-olm-test - - name: check logs - name: Archive code coverage results uses: actions/upload-artifact@v2 with: From fe709cd6794e5d75b966db534a39af5431b0d0f6 Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 14:02:20 +0530 Subject: [PATCH 09/17] fix test result upload --- .github/workflows/nexus-operator-integration-checks.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nexus-operator-integration-checks.yaml b/.github/workflows/nexus-operator-integration-checks.yaml index 8942c60f..9f3c7e42 100644 --- a/.github/workflows/nexus-operator-integration-checks.yaml +++ b/.github/workflows/nexus-operator-integration-checks.yaml @@ -148,7 +148,8 @@ jobs: - name: Run Operator OLM Integration Test run: make ci-olm-test - - name: Archive code coverage results + - name: Archive test results + if: ${{ always() }} uses: actions/upload-artifact@v2 with: name: test-logs From 9bb3e83dca0de7e70f08526cce378d62dcb80739 Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 14:18:33 +0530 Subject: [PATCH 10/17] small test --- hack/ci/operator-ensure-manifest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/ci/operator-ensure-manifest.sh b/hack/ci/operator-ensure-manifest.sh index 7b8acd10..781afd4a 100755 --- a/hack/ci/operator-ensure-manifest.sh +++ b/hack/ci/operator-ensure-manifest.sh @@ -16,7 +16,7 @@ source ./hack/verify-version.sh -OUTPUT="${PWD}/build/_output/operatorhub/community-operators" +OUTPUT="${PWD}/build/_output/operatorhub/upstream-community-operators" echo "---> Output dir is set to ${OUTPUT}" From 05148d5a6dfce01c2b18fb83a406bf64920c6067 Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 15:51:17 +0530 Subject: [PATCH 11/17] test versioning --- Makefile | 2 +- bundle/manifests/nexus-operator.clusterserviceversion.yaml | 6 +++--- config/manager/kustomization.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f35a7ad8..46962abb 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SHELL := /bin/bash # Current Operator version -VERSION ?= 1.0.0-snapshot +VERSION ?= 0.5.0 # Default bundle image tag BUNDLE_IMG ?= controller-bundle:$(VERSION) # Options for 'bundle-build' diff --git a/bundle/manifests/nexus-operator.clusterserviceversion.yaml b/bundle/manifests/nexus-operator.clusterserviceversion.yaml index 39313177..48fa68f8 100644 --- a/bundle/manifests/nexus-operator.clusterserviceversion.yaml +++ b/bundle/manifests/nexus-operator.clusterserviceversion.yaml @@ -43,7 +43,7 @@ metadata: repository: https://github.com/m88i/nexus-operator support: m88i Labs tectonic-visibility: ocs - name: nexus-operator.v1.0.0-snapshot + name: nexus-operator.v0.5.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -230,7 +230,7 @@ spec: - --enable-leader-election command: - /manager - image: quay.io/m88i/nexus-operator:1.0.0-snapshot + image: quay.io/m88i/nexus-operator:0.5.0 name: manager resources: requests: @@ -302,4 +302,4 @@ spec: provider: name: m88i Labs replaces: nexus-operator.v0.4.0 - version: 1.0.0-snapshot + version: 0.5.0 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 467f0185..6a0cd6c1 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: controller newName: quay.io/m88i/nexus-operator - newTag: 1.0.0-snapshot + newTag: 0.5.0 From bf1353a4bd8dd29b03fbd913b6837163408a605f Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 17:24:54 +0530 Subject: [PATCH 12/17] image test --- .github/workflows/nexus-operator-integration-checks.yaml | 9 --------- Makefile | 4 ++-- .../manifests/nexus-operator.clusterserviceversion.yaml | 6 +++--- config/manager/kustomization.yaml | 2 +- .../bases/nexus-operator.clusterserviceversion.yaml | 2 +- hack/ci/operator-ensure-manifest.sh | 2 +- hack/ci/operator-olm-test.sh | 9 --------- hack/verify-version.sh | 2 +- 8 files changed, 9 insertions(+), 27 deletions(-) diff --git a/.github/workflows/nexus-operator-integration-checks.yaml b/.github/workflows/nexus-operator-integration-checks.yaml index 9f3c7e42..059cb56d 100644 --- a/.github/workflows/nexus-operator-integration-checks.yaml +++ b/.github/workflows/nexus-operator-integration-checks.yaml @@ -130,15 +130,6 @@ jobs: key: ${{ runner.os }}-go-${{ env.GO_VERSION }} restore-keys: | ${{ runner.os }}-go-${{ env.GO_VERSION }} - - name: Install Operator SDK - run: | - ./hack/ci/install-operator-sdk.sh - - name: Install KIND - run: | - ./hack/ci/install-kind.sh - echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH - - name: Start KIND - run: ./hack/ci/start-kind.sh - name: Generate Manifests run: make bundle diff --git a/Makefile b/Makefile index 46962abb..c7088a4f 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ IMG ?= controller:latest CRD_OPTIONS ?= "crd:trivialVersions=true" # Image URL for the operator final image -OPERATOR_IMG ?= quay.io/m88i/nexus-operator:$(VERSION) +OPERATOR_IMG ?= quay.io/kaitou786/nexus-operator:$(VERSION) export OP_VERSION = $(VERSION) BUILDER ?= podman @@ -149,7 +149,7 @@ bundle-build: #################### CUSTOM NEXUS OPERATOR TASKS ###################### # Run the OLM test on CI ci-olm-test: - ./hack/ci/load-operator-image.sh + #./hack/ci/load-operator-image.sh ./hack/ci/operator-olm-test.sh .PHONY: pr-prep diff --git a/bundle/manifests/nexus-operator.clusterserviceversion.yaml b/bundle/manifests/nexus-operator.clusterserviceversion.yaml index 48fa68f8..6a8024a7 100644 --- a/bundle/manifests/nexus-operator.clusterserviceversion.yaml +++ b/bundle/manifests/nexus-operator.clusterserviceversion.yaml @@ -35,7 +35,7 @@ metadata: capabilities: Seamless Upgrades categories: Developer Tools certified: "false" - containerImage: quay.io/m88i/nexus-operator:0.4.0 + containerImage: quay.io/kaitou786/nexus-operator:0.5.0 createdAt: "2019-11-16T13:12:22Z" description: Nexus Operator to deploy and manage Nexus 3.x servers operators.operatorframework.io/builder: operator-sdk-v1.0.1 @@ -230,7 +230,7 @@ spec: - --enable-leader-election command: - /manager - image: quay.io/m88i/nexus-operator:0.5.0 + image: quay.io/kaitou786/nexus-operator:0.5.0 name: manager resources: requests: @@ -301,5 +301,5 @@ spec: maturity: alpha provider: name: m88i Labs - replaces: nexus-operator.v0.4.0 + replaces: nexus-operator.v0.3.0 version: 0.5.0 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 6a0cd6c1..ff69f548 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: quay.io/m88i/nexus-operator + newName: quay.io/kaitou786/nexus-operator newTag: 0.5.0 diff --git a/config/manifests/bases/nexus-operator.clusterserviceversion.yaml b/config/manifests/bases/nexus-operator.clusterserviceversion.yaml index 32265b26..afcdc0b8 100644 --- a/config/manifests/bases/nexus-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/nexus-operator.clusterserviceversion.yaml @@ -35,7 +35,7 @@ metadata: capabilities: Seamless Upgrades categories: Developer Tools certified: "false" - containerImage: quay.io/m88i/nexus-operator:0.4.0 + containerImage: quay.io/kaitou786/nexus-operator:0.5.0 createdAt: "2019-11-16T13:12:22Z" description: Nexus Operator to deploy and manage Nexus 3.x servers operators.operatorframework.io/builder: operator-sdk-v1.0.1 diff --git a/hack/ci/operator-ensure-manifest.sh b/hack/ci/operator-ensure-manifest.sh index 781afd4a..7b8acd10 100755 --- a/hack/ci/operator-ensure-manifest.sh +++ b/hack/ci/operator-ensure-manifest.sh @@ -16,7 +16,7 @@ source ./hack/verify-version.sh -OUTPUT="${PWD}/build/_output/operatorhub/upstream-community-operators" +OUTPUT="${PWD}/build/_output/operatorhub/community-operators" echo "---> Output dir is set to ${OUTPUT}" diff --git a/hack/ci/operator-olm-test.sh b/hack/ci/operator-olm-test.sh index 84f75740..f75c8ef7 100755 --- a/hack/ci/operator-olm-test.sh +++ b/hack/ci/operator-olm-test.sh @@ -17,15 +17,6 @@ source ./hack/verify-version.sh source ./hack/ci/operator-ensure-manifest.sh -if [ -z ${KUBECONFIG} ]; then - KUBECONFIG=${HOME}/.kube/config - echo "---> KUBECONFIG environment variable not set, defining to:" - ls -la ${KUBECONFIG} -fi - -csv_file=${OUTPUT}/nexus-operator-m88i/${OP_VERSION}/nexus-operator.v${OP_VERSION}.clusterserviceversion.yaml -echo "---> Updating CSV file '${csv_file}' to imagePullPolicy: Never" -sed -i 's/imagePullPolicy: Always/imagePullPolicy: Never/g' ${csv_file} echo "---> Resulting imagePullPolicy on manifest files" grep -rn imagePullPolicy ${OUTPUT}/nexus-operator-m88i diff --git a/hack/verify-version.sh b/hack/verify-version.sh index e2d18cf8..4419f689 100755 --- a/hack/verify-version.sh +++ b/hack/verify-version.sh @@ -14,7 +14,7 @@ # limitations under the License. -if [ -z "${OP_VERSION}"]; then +if [ -z "${OP_VERSION}" ]; then echo "---> Operator version not defined. Export OP_VERSION variable or call this script from the Makefile" exit 1 fi \ No newline at end of file From a71203591512f62a5174869960fc4b9c999193ec Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 17:34:44 +0530 Subject: [PATCH 13/17] operator-sdk --- .github/workflows/nexus-operator-integration-checks.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nexus-operator-integration-checks.yaml b/.github/workflows/nexus-operator-integration-checks.yaml index 059cb56d..0974f3e4 100644 --- a/.github/workflows/nexus-operator-integration-checks.yaml +++ b/.github/workflows/nexus-operator-integration-checks.yaml @@ -130,7 +130,9 @@ jobs: key: ${{ runner.os }}-go-${{ env.GO_VERSION }} restore-keys: | ${{ runner.os }}-go-${{ env.GO_VERSION }} - + - name: Install Operator SDK + run: | + ./hack/ci/install-operator-sdk.sh - name: Generate Manifests run: make bundle From f37a4460d3dc7fc44fb91f2e24a0efc7bb454737 Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 17:50:24 +0530 Subject: [PATCH 14/17] some tests --- .../nexus-operator-integration-checks.yaml | 6 ------ hack/ci/operator-ensure-manifest.sh | 16 ++++++++-------- hack/ci/operator-olm-test.sh | 6 ++---- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/.github/workflows/nexus-operator-integration-checks.yaml b/.github/workflows/nexus-operator-integration-checks.yaml index 0974f3e4..36fead97 100644 --- a/.github/workflows/nexus-operator-integration-checks.yaml +++ b/.github/workflows/nexus-operator-integration-checks.yaml @@ -133,12 +133,6 @@ jobs: - name: Install Operator SDK run: | ./hack/ci/install-operator-sdk.sh - - name: Generate Manifests - run: make bundle - - - name: Build Operator Image - run: make operator-build BUILDER=docker - - name: Run Operator OLM Integration Test run: make ci-olm-test - name: Archive test results diff --git a/hack/ci/operator-ensure-manifest.sh b/hack/ci/operator-ensure-manifest.sh index 7b8acd10..4b491113 100755 --- a/hack/ci/operator-ensure-manifest.sh +++ b/hack/ci/operator-ensure-manifest.sh @@ -16,7 +16,7 @@ source ./hack/verify-version.sh -OUTPUT="${PWD}/build/_output/operatorhub/community-operators" +OUTPUT="${PWD}/build/_output/operatorhub" echo "---> Output dir is set to ${OUTPUT}" @@ -28,15 +28,15 @@ mkdir -p "${OUTPUT}" rm -rf ~/operators/ git clone --depth 1 --filter=blob:none https://github.com/operator-framework/community-operators.git ~/operators/ -cp -r ~/operators/community-operators/nexus-operator-m88i "${OUTPUT}" +cp -r ~/operators/community-operators/ "${OUTPUT}" rm -rf ~/operators/ -mkdir -p "${OUTPUT}/nexus-operator-m88i/${OP_VERSION}" -cp -v "./bundle/manifests/apps.m88i.io_nexus.yaml" "${OUTPUT}/nexus-operator-m88i/${OP_VERSION}/apps.m88i.io_nexus_crd.yaml" -cp -v "./bundle/manifests/nexus-operator.clusterserviceversion.yaml" "${OUTPUT}/nexus-operator-m88i/${OP_VERSION}/nexus-operator.v${OP_VERSION}.clusterserviceversion.yaml" -cp -v "./bundle/nexus-operator-m88i.package.yaml" "${OUTPUT}/nexus-operator-m88i/" +mkdir -p "${OUTPUT}/community-operators/nexus-operator-m88i/${OP_VERSION}" +cp -v "./bundle/manifests/apps.m88i.io_nexus.yaml" "${OUTPUT}/community-operators/nexus-operator-m88i/${OP_VERSION}/apps.m88i.io_nexus_crd.yaml" +cp -v "./bundle/manifests/nexus-operator.clusterserviceversion.yaml" "${OUTPUT}/community-operators/nexus-operator-m88i/${OP_VERSION}/nexus-operator.v${OP_VERSION}.clusterserviceversion.yaml" +cp -v "./bundle/nexus-operator-m88i.package.yaml" "${OUTPUT}/community-operators/nexus-operator-m88i/" -sed -i "s/{version}/${OP_VERSION}/g" "${OUTPUT}/nexus-operator-m88i/nexus-operator-m88i.package.yaml" +sed -i "s/{version}/${OP_VERSION}/g" "${OUTPUT}/community-operators/nexus-operator-m88i/nexus-operator-m88i.package.yaml" echo "---> Manifest files in the output directory for OLM verification" -ls -la "${OUTPUT}/nexus-operator-m88i/" +ls -la "${OUTPUT}/community-operators/nexus-operator-m88i/" diff --git a/hack/ci/operator-olm-test.sh b/hack/ci/operator-olm-test.sh index f75c8ef7..ce6a0eac 100755 --- a/hack/ci/operator-olm-test.sh +++ b/hack/ci/operator-olm-test.sh @@ -17,10 +17,8 @@ source ./hack/verify-version.sh source ./hack/ci/operator-ensure-manifest.sh -echo "---> Resulting imagePullPolicy on manifest files" -grep -rn imagePullPolicy ${OUTPUT}/nexus-operator-m88i - +export OP_TEST_DEBUG=3 bash <(curl -sL https://cutt.ly/operator-test) \ all \ -${OUTPUT}/nexus-operator-m88i/${OP_VERSION} +${OUTPUT}/community-operators/nexus-operator-m88i/${OP_VERSION} From b810176bece7860ae20456d8c44bc0e6c258fc41 Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 17:55:11 +0530 Subject: [PATCH 15/17] some tests --- hack/ci/operator-olm-test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hack/ci/operator-olm-test.sh b/hack/ci/operator-olm-test.sh index ce6a0eac..3154d7df 100755 --- a/hack/ci/operator-olm-test.sh +++ b/hack/ci/operator-olm-test.sh @@ -17,8 +17,9 @@ source ./hack/verify-version.sh source ./hack/ci/operator-ensure-manifest.sh -export OP_TEST_DEBUG=3 - +echo "===============>" +echo ${OUTPUT}/community-operators/nexus-operator-m88i/${OP_VERSION} +ls -l ${OUTPUT}/community-operators/nexus-operator-m88i/${OP_VERSION} bash <(curl -sL https://cutt.ly/operator-test) \ all \ ${OUTPUT}/community-operators/nexus-operator-m88i/${OP_VERSION} From b17accddf3a9826050cd1a9a8b25eecbee966afb Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 18:08:39 +0530 Subject: [PATCH 16/17] some tests --- hack/ci/operator-olm-test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hack/ci/operator-olm-test.sh b/hack/ci/operator-olm-test.sh index 3154d7df..fa0d5f1f 100755 --- a/hack/ci/operator-olm-test.sh +++ b/hack/ci/operator-olm-test.sh @@ -17,6 +17,8 @@ source ./hack/verify-version.sh source ./hack/ci/operator-ensure-manifest.sh + +OP_TEST_DEBUG=2 echo "===============>" echo ${OUTPUT}/community-operators/nexus-operator-m88i/${OP_VERSION} ls -l ${OUTPUT}/community-operators/nexus-operator-m88i/${OP_VERSION} From 4aeb0f07cf42ebd2b41dcf59ec3eede555055631 Mon Sep 17 00:00:00 2001 From: Tarun Khandelwal Date: Thu, 10 Dec 2020 18:17:03 +0530 Subject: [PATCH 17/17] run only lemon tests --- hack/ci/operator-olm-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/ci/operator-olm-test.sh b/hack/ci/operator-olm-test.sh index fa0d5f1f..4c516966 100755 --- a/hack/ci/operator-olm-test.sh +++ b/hack/ci/operator-olm-test.sh @@ -23,5 +23,5 @@ echo "===============>" echo ${OUTPUT}/community-operators/nexus-operator-m88i/${OP_VERSION} ls -l ${OUTPUT}/community-operators/nexus-operator-m88i/${OP_VERSION} bash <(curl -sL https://cutt.ly/operator-test) \ -all \ +lemon \ ${OUTPUT}/community-operators/nexus-operator-m88i/${OP_VERSION}