@@ -564,7 +564,7 @@ jobs:
564
564
HOME : /home/runner
565
565
566
566
- name : Build Platform Docker Images
567
- run : SUB_BUILD=PLATFORM ./gradlew assemble --scan
567
+ run : SUB_BUILD=PLATFORM ./gradlew assemble -x test - -scan
568
568
569
569
- name : Run Logging Tests
570
570
run : ./tools/bin/cloud_storage_logging_test.sh
@@ -626,3 +626,135 @@ jobs:
626
626
github-token : ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
627
627
label : ${{ needs.start-kube-acceptance-test-runner.outputs.label }}
628
628
ec2-instance-id : ${{ needs.start-kube-acceptance-test-runner.outputs.ec2-instance-id }}
629
+
630
+ # # Kube Acceptance Tests (with scheduler v2 - both temporal changes and container orchestrator)
631
+ # In case of self-hosted EC2 errors, remove this block.
632
+ # Docker acceptance tests run as part of the build job.
633
+ start-kube-acceptance-test-runner-v2 :
634
+ name : Start Kube Acceptance Test EC2 Runner
635
+ timeout-minutes : 10
636
+ runs-on : ubuntu-latest
637
+ outputs :
638
+ label : ${{ steps.start-ec2-runner.outputs.label }}
639
+ ec2-instance-id : ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
640
+ steps :
641
+ - name : Checkout Airbyte
642
+ uses : actions/checkout@v2
643
+ - name : Start AWS Runner
644
+ id : start-ec2-runner
645
+ uses : ./.github/actions/start-aws-runner
646
+ with :
647
+ # github-self-hosted-runner-ubuntu-20-with-120gdisk-docker-20.10.7
648
+ ec2-image-id : ami-0d4083c04fde515c4
649
+ aws-access-key-id : ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
650
+ aws-secret-access-key : ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
651
+ github-token : ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
652
+ kube-acceptance-test-v2 :
653
+ # In case of self-hosted EC2 errors, removed the `needs` line and switch back to running on ubuntu-latest.
654
+ needs : start-kube-acceptance-test-runner-v2 # required to start the main job when the runner is ready
655
+ runs-on : ${{ needs.start-kube-acceptance-test-runner-v2.outputs.label }} # run the job on the newly created runner
656
+ environment : more-secrets
657
+ name : Acceptance Tests (Kube v2)
658
+ timeout-minutes : 90
659
+ steps :
660
+ - name : Checkout Airbyte
661
+ uses : actions/checkout@v2
662
+
663
+ - uses : actions/setup-java@v1
664
+ with :
665
+ java-version : " 17"
666
+
667
+ - uses : actions/setup-node@v1
668
+ with :
669
+ node-version : " 16.13.0"
670
+
671
+ - name : Fix EC-2 Runner
672
+ run : |
673
+ mkdir -p /home/runner
674
+
675
+ - name : Set up CI Gradle Properties
676
+ run : |
677
+ mkdir -p ~/.gradle/
678
+ cat > ~/.gradle/gradle.properties <<EOF
679
+ org.gradle.jvmargs=-Xmx8g -Xss4m --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
680
+ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
681
+ --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
682
+ --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
683
+ --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
684
+ org.gradle.workers.max=8
685
+ org.gradle.vfs.watch=false
686
+ EOF
687
+
688
+ - name : Install socat (required for port forwarding)
689
+ run : |
690
+ # wait to receive lock (see https://askubuntu.com/questions/132059/how-to-make-a-package-manager-wait-if-another-instance-of-apt-is-running)
691
+ while sudo fuser /var/{lib/{dpkg,apt/lists},cache/apt/archives}/lock >/dev/null 2>&1; do
692
+ sleep 1
693
+ done
694
+
695
+ sudo apt-get update
696
+ sudo apt-get install socat
697
+
698
+ - name : Create cluster config file
699
+ run : |
700
+ cat > /tmp/kind-config.yaml <<EOF
701
+ kind: Cluster
702
+ apiVersion: kind.x-k8s.io/v1alpha4
703
+ nodes:
704
+ - role: control-plane
705
+ - role: worker
706
+ EOF
707
+
708
+ - name : KIND Kubernetes Cluster Setup
709
+
710
+ with :
711
+ node_image : kindest/node:v1.21.2
712
+ config : /tmp/kind-config.yaml
713
+ # In case of self-hosted EC2 errors, remove this env block.
714
+ env :
715
+ USER : root
716
+ HOME : /home/runner
717
+ CHANGE_MINIKUBE_NONE_USER : true
718
+
719
+ - name : Build Platform Docker Images
720
+ run : SUB_BUILD=PLATFORM ./gradlew assemble -x test --scan
721
+
722
+ - name : Run Kubernetes End-to-End Acceptance Tests
723
+ env :
724
+ USER : root
725
+ HOME : /home/runner
726
+ AWS_S3_INTEGRATION_TEST_CREDS : ${{ secrets.AWS_S3_INTEGRATION_TEST_CREDS }}
727
+ SECRET_STORE_GCP_CREDENTIALS : ${{ secrets.SECRET_STORE_GCP_CREDENTIALS }}
728
+ SECRET_STORE_GCP_PROJECT_ID : ${{ secrets.SECRET_STORE_GCP_PROJECT_ID }}
729
+ run : |
730
+ CI=true IS_MINIKUBE=true ./tools/bin/acceptance_test_kube.sh
731
+
732
+ - uses : actions/upload-artifact@v2
733
+ if : failure()
734
+ with :
735
+ name : Kubernetes Logs
736
+ path : /tmp/kubernetes_logs/*
737
+
738
+ # In case of self-hosted EC2 errors, remove this block.
739
+ stop-kube-acceptance-test-runner-v2 :
740
+ name : Stop Kube Acceptance Test EC2 Runner
741
+ timeout-minutes : 10
742
+ needs :
743
+ - start-kube-acceptance-test-runner-v2 # required to get output from the start-runner job
744
+ - kube-acceptance-test-v2 # required to wait when the main job is done
745
+ runs-on : ubuntu-latest
746
+ if : ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
747
+ steps :
748
+ - name : Configure AWS credentials
749
+ uses : aws-actions/configure-aws-credentials@v1
750
+ with :
751
+ aws-access-key-id : ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
752
+ aws-secret-access-key : ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
753
+ aws-region : us-east-2
754
+ - name : Stop EC2 runner
755
+
756
+ with :
757
+ mode : stop
758
+ github-token : ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
759
+ label : ${{ needs.start-kube-acceptance-test-runner-v2.outputs.label }}
760
+ ec2-instance-id : ${{ needs.start-kube-acceptance-test-runner-v2.outputs.ec2-instance-id }}
0 commit comments