Skip to content

Commit

Permalink
refactor[build-yml]: Updated the build yml file to push the e2e images (
Browse files Browse the repository at this point in the history
#77)

* refactor[build-yml]: Updated the build yml file to push the e2e images

Signed-off-by: nsathyaseelan <[email protected]>

* Included the image tag script for e2e in pull request yml

Signed-off-by: nsathyaseelan <[email protected]>

* Included the image tag script for e2e in pull request yml

Signed-off-by: nsathyaseelan <[email protected]>

* resolved review comments

Signed-off-by: nsathyaseelan <[email protected]>
  • Loading branch information
nsathyaseelan authored Aug 6, 2021
1 parent f3d69d4 commit d5be523
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 16 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,24 @@
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:
path: "{{ ci_device_operator }}"
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
Expand Down
4 changes: 1 addition & 3 deletions e2e-tests/experiments/localpv-provisioner/test_vars.yml
Original file line number Diff line number Diff line change
@@ -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') }}"
Expand All @@ -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') }}"
release_tag: "{{ lookup('env','RELEASE_TAG') }}"

0 comments on commit d5be523

Please sign in to comment.