diff --git a/flyteadmin/.github/workflows/master.yml b/flyteadmin/.github/workflows/master.yml index e882a2526a..6c9962e9f5 100644 --- a/flyteadmin/.github/workflows/master.yml +++ b/flyteadmin/.github/workflows/master.yml @@ -40,24 +40,33 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: unionai/flytectl-setup-action@v0.0.1 + name: Setup flytectl - id: load-docker-cache name: Load Docker Cache uses: actions/cache@v1 with: path: /tmp/tmp/docker-images key: /tmp/docker-images-${{ github.event.after }} + - name: Create Sandbox Cluster + run: | + cp /tmp/tmp/docker-images/snapshot.tar snapshot.tar + flytectl config init + flytectl sandbox start --source=$(pwd) - name: Prime docker cache - run: docker load -i /tmp/tmp/docker-images/snapshot.tar || true - - uses: engineerd/setup-kind@v0.5.0 - with: - version: "v0.11.1" + run: | + flytectl sandbox exec -- docker load -i /root/snapshot.tar + - name: Upgrade Helm charts + run: flytectl sandbox exec -- helm upgrade flyte -n flyte --kubeconfig=/etc/rancher/k3s/k3s.yaml /flyteorg/share/flyte -f /flyteorg/share/flyte/values-sandbox.yaml --set flyteadmin.image.repository=flyteorg/flyteadmin,flyteadmin.image.tag=latest - name: End2End + env: + KUBECONFIG: /home/runner/.flyte/k3s/k3s.yaml run: | kubectl cluster-info kubectl get pods -n kube-system echo "current-context:" $(kubectl config current-context) echo "environment-kubeconfig:" ${KUBECONFIG} - IMAGE_NAME=${{ github.event.repository.name }} IMAGE=flyteorg/${{ github.event.repository.name }}:latest make end2end_execute + make end2end_execute bump-version: name: Bump Version diff --git a/flyteadmin/.github/workflows/pull_request.yml b/flyteadmin/.github/workflows/pull_request.yml index 9adc695de0..43ff39864b 100644 --- a/flyteadmin/.github/workflows/pull_request.yml +++ b/flyteadmin/.github/workflows/pull_request.yml @@ -50,24 +50,33 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: unionai/flytectl-setup-action@v0.0.1 + name: Setup flytectl - id: load-docker-cache name: Load Docker Cache uses: actions/cache@v1 with: path: /tmp/tmp/docker-images key: /tmp/docker-images-${{ github.event.after }} + - name: Create Sandbox Cluster + run: | + cp /tmp/tmp/docker-images/snapshot.tar snapshot.tar + flytectl config init + flytectl sandbox start --source=$(pwd) - name: Prime docker cache - run: docker load -i /tmp/tmp/docker-images/snapshot.tar || true - - uses: engineerd/setup-kind@v0.5.0 - with: - version: "v0.11.1" + run: | + flytectl sandbox exec -- docker load -i /root/snapshot.tar + - name: Upgrade Helm charts + run: flytectl sandbox exec -- helm upgrade flyte -n flyte --kubeconfig=/etc/rancher/k3s/k3s.yaml /flyteorg/share/flyte -f /flyteorg/share/flyte/values-sandbox.yaml --set flyteadmin.image.repository=flyteorg/flyteadmin,flyteadmin.image.tag=latest - name: End2End + env: + KUBECONFIG: /home/runner/.flyte/k3s/k3s.yaml run: | kubectl cluster-info kubectl get pods -n kube-system echo "current-context:" $(kubectl config current-context) echo "environment-kubeconfig:" ${KUBECONFIG} - IMAGE_NAME=${{ github.event.repository.name }} IMAGE=flyteorg/${{ github.event.repository.name }}:latest make end2end_execute + make end2end_execute integration: name: Integration tests diff --git a/flyteadmin/boilerplate/flyte/end2end/end2end.sh b/flyteadmin/boilerplate/flyte/end2end/end2end.sh index 45877e4155..60109c60d3 100755 --- a/flyteadmin/boilerplate/flyte/end2end/end2end.sh +++ b/flyteadmin/boilerplate/flyte/end2end/end2end.sh @@ -15,22 +15,5 @@ git clone https://github.com/flyteorg/flyte.git "${OUT}" pushd ${OUT} -if [ ! -z "$IMAGE" ]; -then - kind load docker-image ${IMAGE} - if [ "${IMAGE_NAME}" == "flytepropeller" ] - then - sed -i.bak -e "s_${IMAGE_NAME}:.*_${IMAGE}_g" "${OUT}"/kustomize/base/propeller/deployment.yaml - fi - - if [ "${IMAGE_NAME}" == "flyteadmin" ] - then - sed -i.bak -e "s_${IMAGE_NAME}:.*_${IMAGE}_g" "${OUT}"/kustomize/base/admindeployment/deployment.yaml - fi -fi - -make kustomize -# launch flyte end2end -kubectl apply -f "${OUT}/deployment/test/flyte_generated.yaml" make end2end_execute popd diff --git a/flyteadmin/script/integration/k8s/integration.yaml b/flyteadmin/script/integration/k8s/integration.yaml index 06fbf6058c..b99e9bf05f 100644 --- a/flyteadmin/script/integration/k8s/integration.yaml +++ b/flyteadmin/script/integration/k8s/integration.yaml @@ -393,7 +393,7 @@ spec: - name: check-db-ready image: postgres:10.1 command: ['sh', '-c', - 'until pg_isready -h postgres -p 5432; + 'until pg_isready -h postgres -p 5432; do echo waiting for database; sleep 2; done;'] - name: run-migrations image: flyteadmin:test