diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 073cb024..6a88d2fb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -24,7 +24,7 @@ "overrideCommand": false, // Initialize a Kubernetes cluster, install Radius, and expose the ingress controller to the user on port 8081. - "postCreateCommand": "k3d cluster delete && k3d cluster create -p '8081:80@loadbalancer' --k3s-arg '--disable=traefik@server:0' --volume '/etc/resolv.conf:/etc/resolv.conf@server:0' && rad env init kubernetes --public-endpoint-override 'http://localhost:8081'", + "postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh", "forwardPorts": [ "8081:8081" ], diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100755 index 00000000..7532c5b3 --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +echo "Starting Post Create Command" + +k3d cluster delete + +k3d cluster create -p '8081:80@loadbalancer' --k3s-arg '--disable=traefik@server:0' --volume '/etc/resolv.conf:/etc/resolv.conf@server:0' + +RAD_VERSION=$(rad version | awk 'NR==2{print $1}') + +if [ "$RAD_VERSION" = "edge" ]; then + wget -q "https://radiuspublic.blob.core.windows.net/tools/rad/install.sh" -O - | /bin/bash -s edge +fi + +rad env init kubernetes --public-endpoint-override 'http://localhost:8081' + +echo "Ending Post Create Command" diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6317d6bc..a5dfc3c7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,10 +4,12 @@ on: push: branches: - edge + - v*.* pull_request: types: [opened, synchronize, reopened, closed] branches: - edge + - v*.* env: VERSION: ${{ github.event.pull_request.number || 'edge' }} diff --git a/.github/workflows/codespace.yaml b/.github/workflows/codespace.yaml index 9e8d3fb4..53402117 100644 --- a/.github/workflows/codespace.yaml +++ b/.github/workflows/codespace.yaml @@ -3,18 +3,20 @@ name: Build codespace image on: push: branches: - - v0.11 + - edge + - v*.* paths: - '.devcontainer/**' pull_request: types: [opened, synchronize, reopened, closed] branches: - - v0.11 + - edge + - v*.* paths: - '.devcontainer/**' env: - VERSION: ${{ github.event.pull_request.number || '0.11' }} + VERSION: ${{ github.event.pull_request.number || 'edge' }} # Use radiusdev.azurecr.io for PR build. Otherwise, use radius.azurecr.io. DOCKER_REGISTRY: ${{ github.event.pull_request.number && 'radiusdev.azurecr.io' || 'radius.azurecr.io' }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d047f028..769758ea 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: branches: - - v0.11 + - v*.* paths: - 'quickstarts/**' - 'reference-apps/**' @@ -12,7 +12,7 @@ on: pull_request: types: [opened, synchronize, reopened] branches: - - v0.11 + - v*.* paths: - 'quickstarts/**' - 'reference-apps/**'