diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ec5602e..e9029629 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -142,3 +142,30 @@ jobs: DBUILD_DATE=${{ steps.date.outputs.DATE }} DBUILD_REPO_URL=https://github.com/openebs/dynamic-localpv-provisioner DBUILD_SITE_URL=https://openebs.io + + localpv-e2e: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set Image Org + # sets the default IMAGE_ORG to openebs + run: | + [ -z "${{ secrets.IMAGE_ORG }}" ] && IMAGE_ORG=openebs || IMAGE_ORG=${{ secrets.IMAGE_ORG}} + echo "IMAGE_ORG=${IMAGE_ORG}" >> $GITHUB_ENV + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push the localpv-e2e image + uses: docker/build-push-action@v2 + with: + file: ./e2e-tests/Dockerfile + push: true + load: false + platforms: linux/amd64 + tags: | + ${{ env.IMAGE_ORG }}/localpv-e2e:ci diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d3d74631..444bbe53 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -85,3 +85,19 @@ jobs: platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le tags: | openebs/provisioner-localpv:ci + + localpv-e2e: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Build the localpv-e2e image + uses: docker/build-push-action@v2 + with: + file: ./e2e-tests/Dockerfile + push: false + load: false + platforms: linux/amd64 + tags: | + openebs/localpv-e2e:ci \ No newline at end of file diff --git a/e2e-tests/experiments/localpv-provisioner/release_tag_provision.yml b/e2e-tests/experiments/localpv-provisioner/release_tag_provision.yml index 6da49502..5c669d1d 100644 --- a/e2e-tests/experiments/localpv-provisioner/release_tag_provision.yml +++ b/e2e-tests/experiments/localpv-provisioner/release_tag_provision.yml @@ -19,7 +19,6 @@ path: "{{ ci_device_operator }}" regexp: openebs/provisioner-localpv-ci:dev-120403 replace: "openebs/provisioner-localpv:{{ release_tag }}" - when: lookup('env','LOCALPV_PROVISIONER_IMAGE') | length > 0 - name: Change the OpenEBS component labels to desired version in Operator yaml replace: @@ -27,11 +26,17 @@ regexp: 'openebs.io/version: dev' replace: "openebs.io/version: {{ release_tag }}" + - name: Change the OpenEBS component labels to desired version in Operator yaml + replace: + path: "{{ ndm_operator_link }}" + regexp: 'openebs.io/version: dev' + replace: "openebs.io/version: {{ release_tag }}" + - name: Change the Image tag to newer version in operator yaml replace: path: "{{ ndm_operator_link }}" regexp: ':ci' - replace: ":{{ release_tag }}" + replace: ":{{ ndm_version }}" - block: - name: Applying openebs operator diff --git a/e2e-tests/experiments/localpv-provisioner/test_vars.yml b/e2e-tests/experiments/localpv-provisioner/test_vars.yml index 9eed3b99..941df261 100644 --- a/e2e-tests/experiments/localpv-provisioner/test_vars.yml +++ b/e2e-tests/experiments/localpv-provisioner/test_vars.yml @@ -1,9 +1,7 @@ hostpath_operator_link: "https://raw.githubusercontent.com/openebs/dynamic-localpv-provisioner/develop/deploy/kubectl/provisioner-hostpath.yaml" ndm_operator_link: "https://raw.githubusercontent.com/openebs/node-disk-manager/master/deploy/ndm-operator.yaml" charts_hostpath_operator: "https://openebs.github.io/charts/{{ lookup('env','RELEASE_VERSION') }}/openebs-operator-lite.yaml" -#ndm_rc_operator_link: "https://raw.githubusercontent.com/openebs/charts/{{ lookup('env','COMMIT_ID') }}/{{ lookup('env','RELEASE_VERSION') }}/ndm-operator-{{ lookup('env','RC_TAG') }}.yaml" release_operator_link: "https://raw.githubusercontent.com/openebs/charts/{{ lookup('env','COMMIT_ID') }}/{{ lookup('env','RELEASE_VERSION') }}/openebs-operator-lite.yaml" -#ndm_release_operator_link: "https://raw.githubusercontent.com/openebs/charts/{{ lookup('env','COMMIT_ID') }}/{{ lookup('env','RELEASE_VERSION') }}/ndm-operator.yaml" localpv_version: "{{ lookup('env','LOCALPV_PROVISIONER_IMAGE') }}" release_version: "{{ lookup('env','RELEASE_VERSION') }}" image_type: "{{ lookup('env','IMAGE_TYPE') }}" @@ -15,4 +13,4 @@ namespace: "{{ lookup('env','OPERATOR_NS') }}" ndm_version: "{{ lookup('env','NDM_VERSION') }}" commit_id: "{{ lookup('env','COMMIT_ID') }}" rc_tag: "{{ lookup('env','RC_TAG') }}" -release_tag: "{{ lookup('env','RELEASE_TAG') }}" \ No newline at end of file +release_tag: "{{ lookup('env','RELEASE_TAG') }}"