Skip to content

Commit

Permalink
Attached new flows to publish-university
Browse files Browse the repository at this point in the history
  • Loading branch information
sulhicader committed Nov 20, 2023
1 parent 51a91b6 commit cdc11bc
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@ 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
outputs:
build-version: ${{ steps.get-build-version.outputs.VERSION }}

steps:
- uses: actions/checkout@v3

- name: Get App Version
id: get-build-version
run: |
echo "VERSION=0.0.1" >> "$GITHUB_OUTPUT"
echo "VERSION=${{ inputs.build-version }}" >> "$GITHUB_OUTPUT"
release-helm-chart:
needs: retrieve-metadata
Expand All @@ -25,6 +28,6 @@ jobs:

uses: ./.github/workflows/wave-bundle-helm-release.yaml
with:
build-version: ${{ needs.retrieve-metadata.outputs.build-version }}
build-version: ${{ inputs.build-version }}
helm-chart-artifact: wave-bundle-helm
wave-app-name: university
31 changes: 8 additions & 23 deletions .github/workflows/publish-university.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
name: Publish Wave University

on:
workflow_dispatch:
inputs:
version:
description: 'Release Version'
required: true
push:


env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: "${{ github.event.inputs.version }}"

jobs:
publish:
name: Publish Wave University
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GIT_TOKEN }}

- name: Build university
run: make publish-university

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
packages_dir: university/dist
password: ${{ secrets.PYPI_UNIVERSITY_TOKEN }}
bundle_generator:
name: Bundle and Publish
runs-on: ubuntu-20.04
uses: ./.github/workflows/wave-university.yaml
with:
build-version: 1.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
airgapped:
name: Create Wave Bundle
runs-on: ubuntu-latest
outputs:
build-version: ${{ steps.get-build-version.outputs.VERSION }}

steps:
- uses: actions/checkout@v3
Expand All @@ -28,12 +26,12 @@ jobs:

- name: Set version
working-directory: ./university
run: sed -i -r -e "s/\{\{VERSION\}\}/0.0.1/g" app.toml
run: sed -i -r -e "s/\{\{VERSION\}\}/${{ inputs.build-version }}/g" app.toml

- name: Get App Version
id: get-build-version
run: |
echo "VERSION=0.0.1" >> "$GITHUB_OUTPUT"
echo "VERSION=${{ inputs.build-version }}" >> "$GITHUB_OUTPUT"
- name: Make air-gapped bundle
working-directory: ./university
Expand All @@ -42,7 +40,7 @@ jobs:
--docker-base-image 524466471676.dkr.ecr.us-east-1.amazonaws.com/q8s/launcher:v0.23.0-38 \
--docker-use-buildkit \
--generate-helm-charts \
--helm-chart-version 0.0.1 \
--helm-chart-version ${{ inputs.build-version }} \
--helm-chart-name university \
--helm-app-bundle-image-repo 524466471676.dkr.ecr.us-east-1.amazonaws.com/h2oai/university-bundle \
--helm-app-runtime-image-repo 524466471676.dkr.ecr.us-east-1.amazonaws.com/h2oai/university \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@ 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
outputs:
build-version: ${{ steps.get-build-version.outputs.VERSION }}

steps:
- uses: actions/checkout@v3

- name: Get App Version
id: get-build-version
run: |
echo "VERSION=0.0.1" >> "$GITHUB_OUTPUT"
echo "VERSION=${{ inputs.build-version }}" >> "$GITHUB_OUTPUT"
build-and-publish:
needs: retrieve-metadata
Expand All @@ -25,6 +28,6 @@ jobs:

uses: ./.github/workflows/wave-bundle-docker-build-publish.yaml
with:
build-version: ${{ needs.retrieve-metadata.outputs.build-version }}
build-version: ${{ inputs.build-version }}
bundle-artifact: wave-bundle
wave-app-name: university
30 changes: 30 additions & 0 deletions .github/workflows/wave-university.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Wave Bundle

on:
workflow_call:
inputs:
build-version:
type: string
description: The version of the application/image to be pushed
required: true

jobs:
bundle:
name: Create Wave Bundle
uses: ./.github/workflows/wave-bundle-university.yaml
with:
build-version: ${{ inputs.build-version }}

publish:
needs: bundle
name: Build and Publish
uses: ./.github/workflows/wave-publish-university.yaml
with:
build-version: ${{ inputs.build-version }}

helm-publish:
needs: bundle
name: Build and Publish Helm Chart
uses: ./.github/workflows/helm-release-university.yaml
with:
build-version: ${{ inputs.build-version }}
26 changes: 0 additions & 26 deletions .github/workflows/wave.yaml

This file was deleted.

0 comments on commit cdc11bc

Please sign in to comment.