Skip to content
Closed
Changes from all commits
Commits
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
18 changes: 13 additions & 5 deletions .github/workflows/playground_deploy_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# limitations under the License.

name: Collect And Deploy Playground Examples

on:
pull_request:
types:
Expand All @@ -26,10 +25,11 @@ env:
BEAM_VERSION: 2.40.0
K8S_NAMESPACE: playground-backend
HELM_APP_NAME: playground-backend

jobs:
check_examples:
name: Check examples
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu-20.04]
outputs:
example_has_changed: ${{ steps.check_has_example.outputs.example_has_changed }}
steps:
Expand All @@ -43,6 +43,14 @@ jobs:
- name: install deps
run: pip install -r requirements.txt
working-directory: playground/infrastructure
- name: Install PowerShell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than installing powershell, can we just convert the pwsh block below to a more generic script block? It isn't doing anything that a bash shell shouldn't be able to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, we are adding the required installations to make the workflows work. In this case, we are afraid that by changing this block of code into bash shell the job may get broken.

As we don't really know the reason behind this PowerShell decision, we suggest to create a new task/issue for this change.

Please let us know your comments. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we suggest to create a new task/issue for this change.

That's fine by me, this doesn't need to be blocking

run: |
sudo apt-get update
sudo apt-get install -y wget apt-transport-https software-properties-common
wget -q "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb"
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y powershell
- shell: pwsh
name: get Difference
id: check_file_changed
Expand All @@ -60,7 +68,7 @@ jobs:
run: echo "${{ steps.check_has_example.outputs.example_has_changed }}"
deploy_examples:
name: Deploy examples
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu-20.04]
needs: [ check_examples ]
if: needs.check_examples.outputs.example_has_changed == 'True'
steps:
Expand All @@ -71,8 +79,8 @@ jobs:
python-version: '3.8'
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
distribution: 'zulu'
java-version: '8'
- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" &&\
Expand Down