-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packaging: Added initial workflow files on #2180
- Loading branch information
1 parent
4ad597c
commit 213e6b2
Showing
4 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Release Generated Helm Chart | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
build-version: | ||
type: string | ||
description: The version of the application/image to be pushed | ||
required: true | ||
|
||
jobs: | ||
retrieve-metadata: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get App Version | ||
id: get-build-version | ||
run: | | ||
echo "VERSION=${{ inputs.build-version }}" >> "$GITHUB_OUTPUT" | ||
release-helm-chart: | ||
needs: retrieve-metadata | ||
permissions: | ||
id-token: write # This is required for requesting the JWT | ||
contents: read # This is required for actions/checkout | ||
|
||
uses: ./.github/workflows/wave-bundle-helm-release.yaml | ||
with: | ||
build-version: ${{ inputs.build-version }} | ||
helm-chart-artifact: wave-bundle-helm | ||
wave-app-name: tour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Wave Bundle | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
build-version: | ||
type: string | ||
description: The version of the application/image to be pushed | ||
required: true | ||
|
||
jobs: | ||
airgapped: | ||
name: Create Wave Bundle | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download H2O CLI | ||
working-directory: ./py/apps/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/apps/tour | ||
run: chmod +x .bin/h2o | ||
|
||
- name: Get App Version | ||
id: get-build-version | ||
run: | | ||
echo "VERSION=${{ inputs.build-version }}" >> "$GITHUB_OUTPUT" | ||
- name: Make the folder structure | ||
run: | | ||
find py/apps/tour -type f -name '*.toml' -exec sed -i -e "s/{{VERSION}}/${{ inputs.build-version }}/g" {} \; | ||
find py/apps/tour -type f -name 'requirements.txt' -exec sed -i -e "s/{{VERSION}}/${{ inputs.build-version }}/g" {} \; | ||
rsync -a py/examples py/apps/tour --exclude "*.idea*" --exclude "*__pycache__*" --exclude "*.mypy_cache*" --exclude "dist" --exclude "build" | ||
cp tools/vscode-extension/base-snippets.json py/apps/tour/examples | ||
cp tools/vscode-extension/component-snippets.json py/apps/tour/examples | ||
cp tools/vscode-extension/server/utils.py py/apps/tour/examples/tour_autocomplete_utils.py | ||
cp tools/vscode-extension/server/parser.py py/apps/tour/examples/tour_autocomplete_parser.py | ||
sed -i -r -e "s#^@app\(('|\")(.*)('|\")(.*)#@app\('/'\4#" py/apps/tour/examples/tour.py | ||
- name: Make air-gapped bundle | ||
working-directory: ./py/apps/tour | ||
run: | | ||
.bin/h2o bundle \ | ||
--docker-base-image 524466471676.dkr.ecr.us-east-1.amazonaws.com/q8s/launcher:v0.23.0-38 \ | ||
--docker-include static \ | ||
--docker-use-buildkit \ | ||
--generate-helm-charts \ | ||
--helm-chart-version ${{ inputs.build-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/apps/tour/*.Dockerfile | ||
./py/apps/tour/*.wave | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: wave-bundle-helm | ||
path: py/apps/tour/helm/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Publish Wave Bundle | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
build-version: | ||
type: string | ||
description: The version of the application/image to be pushed | ||
required: true | ||
|
||
jobs: | ||
retrieve-metadata: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get App Version | ||
id: get-build-version | ||
run: | | ||
echo "VERSION=${{ inputs.build-version }}" >> "$GITHUB_OUTPUT" | ||
build-and-publish: | ||
needs: retrieve-metadata | ||
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: ${{ inputs.build-version }} | ||
bundle-artifact: wave-bundle | ||
wave-app-name: tour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Wave Bundle | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
bundle: | ||
name: Create Wave Bundle | ||
uses: ./.github/workflows/wave-bundle-tour.yaml | ||
with: | ||
build-version: 0.22.0 | ||
|
||
publish: | ||
needs: bundle | ||
name: Build and Publish | ||
uses: ./.github/workflows/wave-publish-tour.yaml | ||
with: | ||
build-version: 0.22.0 | ||
|
||
helm-publish: | ||
needs: bundle | ||
name: Build and Publish Helm Chart | ||
uses: ./.github/workflows/helm-release-tour.yaml | ||
with: | ||
build-version: 0.22.0 |