diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 88f84958..1571828e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -298,7 +298,7 @@ jobs: load: true platforms: linux/amd64 tags: | - ${{ env.IMAGE_ORG }}/upgrade:${{ env.TAG }} + ${{ env.IMAGE_ORG }}/upgrade:ci build-args: | DBUILD_REPO_URL=https://github.com/openebs/upgrade DBUILD_SITE_URL=https://openebs.io diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 19087ac3..fb2c480a 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -184,7 +184,7 @@ jobs: load: true platforms: linux/amd64 tags: | - ${{ env.IMAGE_ORG }}/upgrade:${{ env.TAG }} + ${{ env.IMAGE_ORG }}/upgrade:ci build-args: | DBUILD_REPO_URL=https://github.com/openebs/upgrade DBUILD_SITE_URL=https://openebs.io diff --git a/ci/upgrade/cstor/pool.tmp.yaml b/ci/upgrade/cstor/pool.tmp.yaml index 3fe28a24..47588213 100644 --- a/ci/upgrade/cstor/pool.tmp.yaml +++ b/ci/upgrade/cstor/pool.tmp.yaml @@ -72,8 +72,8 @@ spec: # the image version should be same as the --to-version mentioned above # in the args of the job - image: imageorg/upgrade-amd64:ci + image: imageorg/upgrade:ci imagePullPolicy: IfNotPresent - restartPolicy: OnFailure + restartPolicy: Never --- diff --git a/ci/upgrade/cstor/pool.yaml b/ci/upgrade/cstor/pool.yaml deleted file mode 100644 index 9c9a47c2..00000000 --- a/ci/upgrade/cstor/pool.yaml +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright © 2020 The OpenEBS Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This is an example YAML for upgrading cstor CSPC. -# Some of the values below needs to be changed to -# match your openebs installation. The fields are -# indicated with VERIFY ---- -apiVersion: batch/v1 -kind: Job -metadata: - # VERIFY that you have provided a unique name for this upgrade job. - # The name can be any valid K8s string for name. - name: upgrade-pool - - # VERIFY the value of namespace is same as the namespace where openebs components - # are installed. You can verify using the command: - # `kubectl get pods -n -l openebs.io/component-name=maya-apiserver` - # The above command should return status of the openebs-apiserver. - namespace: openebs -spec: - backoffLimit: 0 - template: - spec: - # VERIFY the value of serviceAccountName is pointing to service account - # created within openebs namespace. Use the non-default account. - # by running `kubectl get sa -n ` - serviceAccountName: openebs-maya-operator - containers: - - name: upgrade - args: - - "cstor-cspc" - - # --from-version is the current version of the pool - - "--from-version=1.10.0" - - # --to-version is the version desired upgrade version - - "--to-version=master-dev" - # if required the image prefix of the pool deployments can be - # changed using the flag below, defaults to whatever was present on old - # deployments. - - "--to-version-image-prefix=openebs/" - # if required the image tags for pool deployments can be changed - # to a custom image tag using the flag below, - # defaults to the --to-version mentioned above. - - "--to-version-image-tag=ci" - - # VERIFY that you have provided the correct list of CSPC Names - - "cspc-stripe" - - # Following are optional parameters - # Log Level - - "--v=4" - # DO NOT CHANGE BELOW PARAMETERS - env: - - name: OPENEBS_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - tty: true - - # the image version should be same as the --to-version mentioned above - # in the args of the job - image: openebs/upgrade-amd64:ci - imagePullPolicy: IfNotPresent - restartPolicy: OnFailure ---- - diff --git a/ci/upgrade/cstor/sanity.sh b/ci/upgrade/cstor/sanity.sh index 10de24ef..ef3d6a63 100755 --- a/ci/upgrade/cstor/sanity.sh +++ b/ci/upgrade/cstor/sanity.sh @@ -63,8 +63,9 @@ echo "Testing upgrade for org: $IMAGE_ORG version: $TEST_VERSION imagetag: $TEST # run migration tests ./ci/upgrade/cstor/test.sh if [ $? != 0 ]; then - kubectl logs --tail=50 -l job-name=upgrade-pool -n openebs - kubectl logs --tail=50 -l job-name=upgrade-volume -n openebs + kubectl logs -l job-name=upgrade-pool -n openebs + kubectl logs -l job-name=upgrade-volume -n openebs + kubectl describe pods -n openebs exit 1 fi diff --git a/ci/upgrade/cstor/volume.tmp.yaml b/ci/upgrade/cstor/volume.tmp.yaml index 33e5254f..14e4bce0 100644 --- a/ci/upgrade/cstor/volume.tmp.yaml +++ b/ci/upgrade/cstor/volume.tmp.yaml @@ -74,6 +74,6 @@ spec: # in the args of the job image: imageorg/upgrade:ci imagePullPolicy: IfNotPresent - restartPolicy: OnFailure + restartPolicy: Never --- diff --git a/ci/upgrade/jiva/sanity.sh b/ci/upgrade/jiva/sanity.sh index 7d66cd2c..bc14cecc 100755 --- a/ci/upgrade/jiva/sanity.sh +++ b/ci/upgrade/jiva/sanity.sh @@ -63,7 +63,8 @@ echo "Testing upgrade for org: $IMAGE_ORG version: $TEST_VERSION imagetag: $TEST # run migration tests ./ci/upgrade/jiva/test.sh if [ $? != 0 ]; then - kubectl logs --tail=50 -l job-name=upgrade-volume -n openebs + kubectl logs -l job-name=upgrade-volume -n openebs + kubectl describe pods -n openebs exit 1 fi