diff --git a/.github/workflows/sandbox.yml b/.github/workflows/sandbox.yml index 4fb2db51ff..5d74ddeb2d 100644 --- a/.github/workflows/sandbox.yml +++ b/.github/workflows/sandbox.yml @@ -2,8 +2,9 @@ name: Build & Push Sandbox Docker Image on: pull_request: - release: - types: [published] + push: + branches: + - master jobs: push-sandbox-image: @@ -25,7 +26,7 @@ jobs: build_extra_args: "--target=default --compress=true" context: ./ dockerfile: docker/sandbox/Dockerfile - push_image_and_stages: ${{ github.event_name == 'release' }} + push_image_and_stages: ${{ github.event_name != 'pull_request' }} push-sandbox-dind-image: name: Push sandbox DinD image to GHCR runs-on: ubuntu-latest @@ -44,4 +45,4 @@ jobs: build_extra_args: "--target=dind --compress=true" context: ./ dockerfile: docker/sandbox/Dockerfile - push_image_and_stages: ${{ github.event_name == 'release' }} + push_image_and_stages: ${{ github.event_name != 'pull_request' }} diff --git a/docker/sandbox/Dockerfile b/docker/sandbox/Dockerfile index 60609b43eb..3d4e5bf1c4 100644 --- a/docker/sandbox/Dockerfile +++ b/docker/sandbox/Dockerfile @@ -37,7 +37,7 @@ RUN wget -q -O - https://raw.githubusercontent.com/flyteorg/flytectl/master/inst COPY --from=go_builder_ /install/linux/ /flyteorg/bin/ # Copy flyte chart -COPY charts/flyte/ /flyteorg/share/flyte +COPY charts/flyte/values-sandbox.yaml /flyteorg/share/values-sandbox.yaml # Copy scripts COPY docker/sandbox/kubectl docker/sandbox/cgroup-v2-hack.sh docker/sandbox/wait-for-flyte.sh /flyteorg/bin/ diff --git a/docker/sandbox/flyte-entrypoint-default.sh b/docker/sandbox/flyte-entrypoint-default.sh index 68bd69c417..33cdaf15ef 100755 --- a/docker/sandbox/flyte-entrypoint-default.sh +++ b/docker/sandbox/flyte-entrypoint-default.sh @@ -17,7 +17,8 @@ echo "Done." # Deploy flyte echo "Deploying Flyte..." -helm install -n flyte -f /flyteorg/share/flyte/values-sandbox.yaml --create-namespace flyte /flyteorg/share/flyte --kubeconfig /etc/rancher/k3s/k3s.yaml +helm repo add flyteorg https://flyteorg.github.io/flyte +helm install -n flyte -f /flyteorg/share/values-sandbox.yaml --create-namespace flyte flyteorg/flyte --kubeconfig /etc/rancher/k3s/k3s.yaml wait-for-flyte.sh diff --git a/docker/sandbox/flyte-entrypoint-dind.sh b/docker/sandbox/flyte-entrypoint-dind.sh index bcad5b04e8..ea43aa0fa4 100755 --- a/docker/sandbox/flyte-entrypoint-dind.sh +++ b/docker/sandbox/flyte-entrypoint-dind.sh @@ -34,7 +34,8 @@ echo "Done." # Deploy flyte echo "Deploying Flyte..." -helm install -n flyte -f /flyteorg/share/flyte/values-sandbox.yaml --create-namespace flyte /flyteorg/share/flyte --kubeconfig /etc/rancher/k3s/k3s.yaml +helm repo add flyteorg https://flyteorg.github.io/flyte +helm install -n flyte -f /flyteorg/share/values-sandbox.yaml --create-namespace flyte flyteorg/flyte --kubeconfig /etc/rancher/k3s/k3s.yaml wait-for-flyte.sh diff --git a/docker/sandbox/wait-for-flyte.sh b/docker/sandbox/wait-for-flyte.sh index 2a35b3cb6f..a039d5d6b5 100755 --- a/docker/sandbox/wait-for-flyte.sh +++ b/docker/sandbox/wait-for-flyte.sh @@ -22,6 +22,6 @@ timeout 600 sh -c "until k3s kubectl rollout status deployment flytepropeller -n k3s kubectl wait --for=condition=available deployment/datacatalog deployment/flyteadmin deployment/flyteconsole deployment/flytepropeller -n flyte --timeout=10m || ( echo >&2 "Timed out while waiting for the Flyte deployment to start"; exit 1 ) # Wait for envoy proxy to become ready -timeout 600 sh -c 'until [[ $(k3s kubectl get daemonset envoy -n projectcontour -o jsonpath="{.status.numberReady}") -eq 1 ]]; do sleep 1; done' || ( echo >&2 "Timed out while waiting for the Flyte envoy proxy to start"; exit 1 ) +timeout 600 sh -c 'until [[ $(k3s kubectl get daemonset flyte-contour-envoy -n flyte -o jsonpath="{.status.numberReady}") -eq 1 ]]; do sleep 1; done' || ( echo >&2 "Timed out while waiting for the Flyte envoy proxy to start"; exit 1 ) echo "Flyte is ready! Flyte UI is available at http://localhost:30081/console."