Skip to content

Commit 0c2ac5c

Browse files
authored
ci: Integrate github workflows to automate the air-gapping process of wave Tour (#2199)
1 parent cd469fc commit 0c2ac5c

File tree

2 files changed

+57
-2
lines changed

2 files changed

+57
-2
lines changed

.github/workflows/release-wave.yml

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ jobs:
1616
release:
1717
name: Release Wave
1818
runs-on: ubuntu-20.04
19+
20+
outputs:
21+
build-version: ${{ env.VERSION }}
22+
1923
steps:
2024
- uses: actions/checkout@v2
2125
with:
@@ -135,7 +139,7 @@ jobs:
135139

136140
- name: Build university
137141
run: make publish-university
138-
142+
139143
- name: Publish to PyPI - wave_university
140144
uses: pypa/gh-action-pypi-publish@master
141145
with:
@@ -153,3 +157,51 @@ jobs:
153157
with:
154158
packages_dir: py/h2o_lightwave_web/dist
155159
password: ${{ secrets.PYPI_LIGTHWAVE_WEB_TOKEN }}
160+
161+
- name: Download H2O CLI
162+
working-directory: ./py/tmp/tour/
163+
run: mkdir -p .bin && curl -o .bin/h2o https://h2oai-cloud-release.s3.amazonaws.com/releases/ai/h2o/h2o-cloud/latest/cli/linux-amd64/h2o
164+
165+
- name: Change permissions
166+
working-directory: ./py/tmp/tour/
167+
run: chmod +x .bin/h2o
168+
169+
- name: Make air-gapped bundle
170+
working-directory: ./py/tmp/tour/
171+
run: |
172+
.bin/h2o bundle \
173+
--docker-base-image 524466471676.dkr.ecr.us-east-1.amazonaws.com/q8s/launcher:v0.31.0-310 \
174+
--docker-use-buildkit \
175+
--generate-helm-charts \
176+
--helm-chart-version ${{ env.VERSION }} \
177+
--helm-chart-name tour \
178+
--helm-app-bundle-image-repo 524466471676.dkr.ecr.us-east-1.amazonaws.com/h2oai/tour-bundle \
179+
--helm-app-runtime-image-repo 524466471676.dkr.ecr.us-east-1.amazonaws.com/h2oai/tour \
180+
--generate-dockerfile
181+
182+
- uses: actions/upload-artifact@v3
183+
with:
184+
name: wave-bundle
185+
path: |
186+
./py/tmp/tour/*.Dockerfile
187+
./py/tmp/tour/*.wave
188+
189+
- uses: actions/upload-artifact@v3
190+
with:
191+
name: wave-bundle-helm
192+
path: py/tmp/tour/helm/
193+
194+
- name: Remove files in tmp folder
195+
run: make remove-build-apps-directory
196+
197+
build-and-publish:
198+
needs: release
199+
permissions:
200+
id-token: write # This is required for requesting the JWT
201+
contents: read # This is required for actions/checkout
202+
203+
uses: ./.github/workflows/wave-bundle-docker-build-publish.yaml
204+
with:
205+
build-version: ${{ needs.release.outputs.build-version }}
206+
bundle-artifact: wave-bundle
207+
wave-app-name: tour

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ build-r-nightly: ## Build nightly R client.
5454
cd r && $(MAKE) build-nightly
5555

5656
build-apps: ## Prepare apps for HAC upload.
57+
rm -rf py/tmp
5758
mkdir -p py/tmp
5859
for app in py/apps/*; do mkdir -p build/apps/wave-`basename $$app`; done
5960
cp -r py/apps/* py/tmp/
@@ -69,10 +70,12 @@ build-apps: ## Prepare apps for HAC upload.
6970
$(SED) -i -r -e "s#^@app\(('|\")(.*)('|\")(.*)#@app\('/'\4#" py/tmp/tour/examples/tour.py
7071
$(SED) -i -r -e "s#^@app\(('|\")(.*)('|\")(.*)#@app\('/'\4#" py/tmp/theme-generator/theme_generator.py
7172
for app in py/tmp/*; do cd $$app && zip -r ../../../build/apps/wave-`basename $$app`/`basename $$app`-$(VERSION).wave * && cd -; done
72-
rm -rf py/tmp
7373
cd studio && $(MAKE) build
7474
cd university && $(MAKE) build
7575

76+
remove-build-apps-directory: ## Remove the wave apps files copied to tmp
77+
rm -rf py/tmp
78+
7679
generator: ## Build driver generator
7780
cd tools/wavegen && $(MAKE) build
7881

0 commit comments

Comments
 (0)