Skip to content

Commit

Permalink
Added flytectl in place of kind in end2end test (flyteorg#293)
Browse files Browse the repository at this point in the history
* Added flytectl in place of kind in end2end test

Signed-off-by: Yuvraj <[email protected]>

* wip: Added manual change in boilerplate script

Signed-off-by: Yuvraj <[email protected]>

* Fix integration test

Signed-off-by: Yuvraj <[email protected]>

* Revert registry name in ci

Signed-off-by: Yuvraj <[email protected]>

* revert integration test

Signed-off-by: Yuvraj <[email protected]>
  • Loading branch information
yindia authored Nov 23, 2021
1 parent 269b482 commit 6f1ea7d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,33 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: unionai/[email protected]
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/[email protected]
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
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,33 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: unionai/[email protected]
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/[email protected]
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
Expand Down
17 changes: 0 additions & 17 deletions boilerplate/flyte/end2end/end2end.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion script/integration/k8s/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6f1ea7d

Please sign in to comment.