Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging: Integrate github workflows to automate the air-gapping process of wave Tour #2199

Merged
merged 46 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
f94114d
packaging: Initial workflow files
sulhicader Oct 29, 2023
33c3f71
packaging: changed the workflow tigger on #2163
sulhicader Oct 29, 2023
f0c6a4f
packaging: changed the workflow file names on #2163
sulhicader Oct 29, 2023
3a00254
packaging: Added to set version in app.toml on #2163
sulhicader Nov 16, 2023
5b64c3f
packaging: Added workflows from workflow-library on #2163
sulhicader Nov 16, 2023
c817498
packaging: Changed workflow trigger mode to push on #2163
sulhicader Nov 16, 2023
cd63621
packaging: Added workflow directory to each step on #2163
sulhicader Nov 16, 2023
2c6f361
packaging: Added workflow directory to each step on #2163
sulhicader Nov 16, 2023
bc9991d
packaging: Added workflow directory to each step on #2163
sulhicader Nov 16, 2023
5ee8dbf
packaging: Added workflow directory to each step on #2163
sulhicader Nov 16, 2023
e6b32d2
packaging: Added workflow directory to each step on #2163
sulhicader Nov 16, 2023
fd3610a
packaging: Added workflow directory to each step on #2163
sulhicader Nov 17, 2023
acad043
packaging: Added workflow directory to each step on #2163
sulhicader Nov 17, 2023
51a91b6
packaging: Added workflow directory to each step on #2163
sulhicader Nov 17, 2023
cdc11bc
Attached new flows to publish-university
sulhicader Nov 20, 2023
66dbde3
packaging: Attached new flows to publish-university on #2163
sulhicader Nov 20, 2023
ca86f56
packaging: Reverted some changes on #2163
sulhicader Nov 20, 2023
f1407f3
Merge remote-tracking branch 'origin/main' into feat/issue-2163
sulhicader Nov 20, 2023
dc9a1c2
packaging: Reverted some changes on #2163
sulhicader Nov 20, 2023
4ad597c
packaging: Removed generated files on #2163
sulhicader Nov 20, 2023
213e6b2
packaging: Added initial workflow files on #2180
sulhicader Nov 20, 2023
08bdc19
packaging: Added initial workflow files on #2180
sulhicader Nov 20, 2023
c7552c7
packaging: Added initial workflow files on #2180
sulhicader Nov 20, 2023
2748d8c
packaging: Changed the version on #2180
sulhicader Nov 20, 2023
31b6fa8
Changed the version of tour
sulhicader Jan 11, 2024
293a3ef
Changed the base image on #2180
sulhicader Jan 16, 2024
a2a07a6
Merge remote-tracking branch 'origin/main' into feat/issue-2163
sulhicader Jan 31, 2024
b43ef51
Handled review comments #2163
sulhicader Jan 31, 2024
72a07bd
Handled review comments #2163
sulhicader Jan 31, 2024
41bf0f7
Handled review comments #2163
sulhicader Jan 31, 2024
1ad2d02
Finalized workflow for university #2163
sulhicader Jan 31, 2024
9b5f402
Merge remote-tracking branch 'origin/main' into feat/issue-2180
sulhicader Jan 31, 2024
a112848
Merge remote-tracking branch 'origin/feat/issue-2163' into feat/issue…
sulhicader Jan 31, 2024
988b531
Combined tour image publish to one script #2180
sulhicader Jan 31, 2024
bb51d36
Added final workflow for tour app #2180
sulhicader Jan 31, 2024
d2a5e04
Removed university related changes #2180
sulhicader Jan 31, 2024
cf66838
Merge branch 'main' into feat/issue-2180
sulhicader Feb 1, 2024
ba5944b
Merge branch 'main' into feat/issue-2180
sulhicader Feb 9, 2024
6f71abb
Handled review comments
sulhicader Feb 12, 2024
b107aee
To trigger refactored workflow
sulhicader Feb 12, 2024
2d34f67
To trigger refactored workflow
sulhicader Feb 12, 2024
158e1b6
To trigger refactored workflow
sulhicader Feb 12, 2024
9080025
To trigger refactored workflow
sulhicader Feb 12, 2024
e86e170
Refactored github action for tour app
sulhicader Feb 12, 2024
b97ee49
Added an step to remove tmp folder
sulhicader Feb 12, 2024
cbdfa2f
Added an step to remove tmp folder at beginning of build-apps
sulhicader Feb 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 53 additions & 1 deletion .github/workflows/release-wave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
release:
name: Release Wave
runs-on: ubuntu-20.04

outputs:
build-version: ${{ env.VERSION }}

steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -135,7 +139,7 @@ jobs:

- name: Build university
run: make publish-university

- name: Publish to PyPI - wave_university
uses: pypa/gh-action-pypi-publish@master
with:
Expand All @@ -153,3 +157,51 @@ jobs:
with:
packages_dir: py/h2o_lightwave_web/dist
password: ${{ secrets.PYPI_LIGTHWAVE_WEB_TOKEN }}

- name: Download H2O CLI
working-directory: ./py/tmp/tour/
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

- name: Change permissions
working-directory: ./py/tmp/tour/
run: chmod +x .bin/h2o

- name: Make air-gapped bundle
working-directory: ./py/tmp/tour/
run: |
.bin/h2o bundle \
--docker-base-image 524466471676.dkr.ecr.us-east-1.amazonaws.com/q8s/launcher:v0.31.0-310 \
--docker-use-buildkit \
--generate-helm-charts \
--helm-chart-version ${{ env.VERSION }} \
--helm-chart-name tour \
--helm-app-bundle-image-repo 524466471676.dkr.ecr.us-east-1.amazonaws.com/h2oai/tour-bundle \
--helm-app-runtime-image-repo 524466471676.dkr.ecr.us-east-1.amazonaws.com/h2oai/tour \
--generate-dockerfile

- uses: actions/upload-artifact@v3
with:
name: wave-bundle
path: |
./py/tmp/tour/*.Dockerfile
./py/tmp/tour/*.wave

- uses: actions/upload-artifact@v3
with:
name: wave-bundle-helm
path: py/tmp/tour/helm/

- name: Remove files in tmp folder
run: make remove-build-apps-directory

build-and-publish:
needs: release
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

uses: ./.github/workflows/wave-bundle-docker-build-publish.yaml
with:
build-version: ${{ needs.release.outputs.build-version }}
bundle-artifact: wave-bundle
wave-app-name: tour
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ build-r-nightly: ## Build nightly R client.
cd r && $(MAKE) build-nightly

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

remove-build-apps-directory: ## Remove the wave apps files copied to tmp
rm -rf py/tmp

generator: ## Build driver generator
cd tools/wavegen && $(MAKE) build

Expand Down
Loading