Skip to content

Commit d5be523

Browse files
refactor[build-yml]: Updated the build yml file to push the e2e images (#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]>
1 parent f3d69d4 commit d5be523

File tree

4 files changed

+51
-5
lines changed

4 files changed

+51
-5
lines changed

.github/workflows/build.yml

+27
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,30 @@ jobs:
142142
DBUILD_DATE=${{ steps.date.outputs.DATE }}
143143
DBUILD_REPO_URL=https://github.com/openebs/dynamic-localpv-provisioner
144144
DBUILD_SITE_URL=https://openebs.io
145+
146+
localpv-e2e:
147+
runs-on: ubuntu-latest
148+
steps:
149+
- name: Checkout
150+
uses: actions/checkout@v2
151+
152+
- name: Set Image Org
153+
# sets the default IMAGE_ORG to openebs
154+
run: |
155+
[ -z "${{ secrets.IMAGE_ORG }}" ] && IMAGE_ORG=openebs || IMAGE_ORG=${{ secrets.IMAGE_ORG}}
156+
echo "IMAGE_ORG=${IMAGE_ORG}" >> $GITHUB_ENV
157+
- name: Login to Docker Hub
158+
uses: docker/login-action@v1
159+
with:
160+
username: ${{ secrets.DOCKERHUB_USERNAME }}
161+
password: ${{ secrets.DOCKERHUB_TOKEN }}
162+
163+
- name: Build and push the localpv-e2e image
164+
uses: docker/build-push-action@v2
165+
with:
166+
file: ./e2e-tests/Dockerfile
167+
push: true
168+
load: false
169+
platforms: linux/amd64
170+
tags: |
171+
${{ env.IMAGE_ORG }}/localpv-e2e:ci

.github/workflows/pull_request.yml

+16
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,19 @@ jobs:
8585
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le
8686
tags: |
8787
openebs/provisioner-localpv:ci
88+
89+
localpv-e2e:
90+
runs-on: ubuntu-latest
91+
steps:
92+
- name: Checkout
93+
uses: actions/checkout@v2
94+
95+
- name: Build the localpv-e2e image
96+
uses: docker/build-push-action@v2
97+
with:
98+
file: ./e2e-tests/Dockerfile
99+
push: false
100+
load: false
101+
platforms: linux/amd64
102+
tags: |
103+
openebs/localpv-e2e:ci

e2e-tests/experiments/localpv-provisioner/release_tag_provision.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,24 @@
1919
path: "{{ ci_device_operator }}"
2020
regexp: openebs/provisioner-localpv-ci:dev-120403
2121
replace: "openebs/provisioner-localpv:{{ release_tag }}"
22-
when: lookup('env','LOCALPV_PROVISIONER_IMAGE') | length > 0
2322

2423
- name: Change the OpenEBS component labels to desired version in Operator yaml
2524
replace:
2625
path: "{{ ci_device_operator }}"
2726
regexp: 'openebs.io/version: dev'
2827
replace: "openebs.io/version: {{ release_tag }}"
2928

29+
- name: Change the OpenEBS component labels to desired version in Operator yaml
30+
replace:
31+
path: "{{ ndm_operator_link }}"
32+
regexp: 'openebs.io/version: dev'
33+
replace: "openebs.io/version: {{ release_tag }}"
34+
3035
- name: Change the Image tag to newer version in operator yaml
3136
replace:
3237
path: "{{ ndm_operator_link }}"
3338
regexp: ':ci'
34-
replace: ":{{ release_tag }}"
39+
replace: ":{{ ndm_version }}"
3540

3641
- block:
3742
- name: Applying openebs operator

e2e-tests/experiments/localpv-provisioner/test_vars.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
hostpath_operator_link: "https://raw.githubusercontent.com/openebs/dynamic-localpv-provisioner/develop/deploy/kubectl/provisioner-hostpath.yaml"
22
ndm_operator_link: "https://raw.githubusercontent.com/openebs/node-disk-manager/master/deploy/ndm-operator.yaml"
33
charts_hostpath_operator: "https://openebs.github.io/charts/{{ lookup('env','RELEASE_VERSION') }}/openebs-operator-lite.yaml"
4-
#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"
54
release_operator_link: "https://raw.githubusercontent.com/openebs/charts/{{ lookup('env','COMMIT_ID') }}/{{ lookup('env','RELEASE_VERSION') }}/openebs-operator-lite.yaml"
6-
#ndm_release_operator_link: "https://raw.githubusercontent.com/openebs/charts/{{ lookup('env','COMMIT_ID') }}/{{ lookup('env','RELEASE_VERSION') }}/ndm-operator.yaml"
75
localpv_version: "{{ lookup('env','LOCALPV_PROVISIONER_IMAGE') }}"
86
release_version: "{{ lookup('env','RELEASE_VERSION') }}"
97
image_type: "{{ lookup('env','IMAGE_TYPE') }}"
@@ -15,4 +13,4 @@ namespace: "{{ lookup('env','OPERATOR_NS') }}"
1513
ndm_version: "{{ lookup('env','NDM_VERSION') }}"
1614
commit_id: "{{ lookup('env','COMMIT_ID') }}"
1715
rc_tag: "{{ lookup('env','RC_TAG') }}"
18-
release_tag: "{{ lookup('env','RELEASE_TAG') }}"
16+
release_tag: "{{ lookup('env','RELEASE_TAG') }}"

0 commit comments

Comments
 (0)