@@ -700,6 +700,167 @@ jobs:
700
700
label : ${{ needs.start-kube-acceptance-test-runner.outputs.label }}
701
701
ec2-instance-id : ${{ needs.start-kube-acceptance-test-runner.outputs.ec2-instance-id }}
702
702
703
+
704
+ # # Kube Acceptance Tests
705
+ # Docker acceptance tests run as part of the build job.
706
+ # In case of self-hosted EC2 errors, remove this block.
707
+ start-helm-acceptance-test-runner :
708
+ name : " Platform: Start Helm Acceptance Test Runner"
709
+ needs :
710
+ - changes
711
+ - find_valid_pat
712
+ # Because scheduled builds on master require us to skip the changes job. Use always() to force this to run on master.
713
+ if : needs.changes.outputs.backend == 'true' || needs.changes.outputs.build == 'true' || (always() && github.ref == 'refs/heads/master')
714
+ timeout-minutes : 10
715
+ runs-on : ubuntu-latest
716
+ outputs :
717
+ label : ${{ steps.start-ec2-runner.outputs.label }}
718
+ ec2-instance-id : ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
719
+ steps :
720
+ - name : Checkout Airbyte
721
+ uses : actions/checkout@v2
722
+ - name : Start AWS Runner
723
+ id : start-ec2-runner
724
+ uses : ./.github/actions/start-aws-runner
725
+ with :
726
+ # github-self-hosted-runner-ubuntu-20-with-150gdisk-docker-20.10.7-and-socat
727
+ ec2-image-id : ami-0c1a9bc22624339d8
728
+ aws-access-key-id : ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
729
+ aws-secret-access-key : ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
730
+ github-token : ${{ needs.find_valid_pat.outputs.pat }}
731
+
732
+
733
+
734
+ helm-acceptance-test :
735
+ name : " Platform: Acceptance Tests (Helm)"
736
+ # In case of self-hosted EC2 errors, removed the `needs` line and switch back to running on ubuntu-latest.
737
+ needs : start-helm-acceptance-test-runner # required to start the main job when the runner is ready
738
+ runs-on : ${{ needs.start-helm-acceptance-test-runner.outputs.label }} # run the job on the newly created runner
739
+ environment : more-secrets
740
+ timeout-minutes : 90
741
+ steps :
742
+ - name : Checkout Airbyte
743
+ uses : actions/checkout@v2
744
+
745
+ - name : Cache Build Artifacts
746
+ uses : ./.github/actions/cache-build-artifacts
747
+ with :
748
+ cache-key : ${{ secrets.CACHE_VERSION }}
749
+ cache-python : " false"
750
+
751
+ - uses : actions/setup-java@v1
752
+ with :
753
+ java-version : " 17"
754
+
755
+ - uses : actions/setup-node@v2
756
+ with :
757
+ node-version : " lts/gallium"
758
+
759
+ - name : Install unzip
760
+ shell : bash
761
+ run : sudo apt-get update && sudo apt-get install -y unzip
762
+
763
+ - uses : azure/setup-helm@v3
764
+ with :
765
+ version : ' latest'
766
+ token : ${{ secrets.GITHUB_TOKEN }}
767
+ id : install
768
+
769
+ - name : Fix EC-2 Runner
770
+ run : |
771
+ mkdir -p /home/runner
772
+
773
+ - name : Set up CI Gradle Properties
774
+ run : |
775
+ mkdir -p ~/.gradle/
776
+ cat > ~/.gradle/gradle.properties <<EOF
777
+ org.gradle.jvmargs=-Xmx8g -Xss4m --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
778
+ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
779
+ --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
780
+ --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
781
+ --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
782
+ org.gradle.workers.max=8
783
+ org.gradle.vfs.watch=false
784
+ EOF
785
+
786
+ - name : Create cluster config file
787
+ run : |
788
+ cat > /tmp/kind-config.yaml <<EOF
789
+ kind: Cluster
790
+ apiVersion: kind.x-k8s.io/v1alpha4
791
+ nodes:
792
+ - role: control-plane
793
+ - role: worker
794
+ EOF
795
+
796
+ - name : KIND Kubernetes Cluster Setup
797
+
798
+ with :
799
+ node_image : kindest/node:v1.21.2
800
+ config : /tmp/kind-config.yaml
801
+ # In case of self-hosted EC2 errors, remove this env block.
802
+ env :
803
+ USER : root
804
+ HOME : /home/runner
805
+ CHANGE_MINIKUBE_NONE_USER : true
806
+
807
+ - name : Build Platform Docker Images
808
+ run : SUB_BUILD=PLATFORM ./gradlew assemble -x test --scan
809
+
810
+ - name : Run Helm End-to-End Acceptance Tests
811
+ env :
812
+ USER : root
813
+ HOME : /home/runner
814
+ # AWS_S3_INTEGRATION_TEST_CREDS can be found in LastPass as AWS_S3_INTEGRATION_TEST_CREDS
815
+ AWS_S3_INTEGRATION_TEST_CREDS : ${{ secrets.AWS_S3_INTEGRATION_TEST_CREDS }}
816
+ SECRET_STORE_GCP_CREDENTIALS : ${{ secrets.SECRET_STORE_GCP_CREDENTIALS }}
817
+ SECRET_STORE_GCP_PROJECT_ID : ${{ secrets.SECRET_STORE_GCP_PROJECT_ID }}
818
+ run : |
819
+ CI=true IS_MINIKUBE=true ./tools/bin/acceptance_test_kube_helm.sh
820
+
821
+ - name : Generate Test Report
822
+ uses : dorny/test-reporter@v1
823
+ if : always() # run this step even if previous step failed
824
+ with :
825
+ name : Platform Helm E2E Test Report
826
+ path : ' /actions-runner/_work/airbyte/airbyte/*/build/test-results/*/*.xml'
827
+ reporter : java-junit
828
+
829
+ - uses : actions/upload-artifact@v2
830
+ if : failure()
831
+ with :
832
+ name : Kubernetes Logs
833
+ path : /tmp/kubernetes_logs/*
834
+
835
+ # In case of self-hosted EC2 errors, remove this block.
836
+ stop-helm-acceptance-test-runner :
837
+ name : " Platform: Stop Helm Acceptance Test EC2 Runner"
838
+ timeout-minutes : 10
839
+ needs :
840
+ - start-helm-acceptance-test-runner # required to get output from the start-runner job
841
+ - helm-acceptance-test # required to wait when the main job is done
842
+ - find_valid_pat
843
+ runs-on : ubuntu-latest
844
+ # Always is required to stop the runner even if the previous job has errors. However always() runs even if the previous step is skipped.
845
+ # Thus, we check for skipped here.
846
+ if : ${{ always() && needs.start-helm-acceptance-test-runner.result != 'skipped'}}
847
+ steps :
848
+ - name : Configure AWS credentials
849
+ uses : aws-actions/configure-aws-credentials@v1
850
+ with :
851
+ aws-access-key-id : ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
852
+ aws-secret-access-key : ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
853
+ aws-region : us-east-2
854
+ - name : Stop EC2 runner
855
+ uses :
supertopher/[email protected]
856
+ with :
857
+ mode : stop
858
+ github-token : ${{ needs.find_valid_pat.outputs.pat }}
859
+ label : ${{ needs.start-helm-acceptance-test-runner.outputs.label }}
860
+ ec2-instance-id : ${{ needs.start-helm-acceptance-test-runner.outputs.ec2-instance-id }}
861
+
862
+
863
+
703
864
notify-failure-slack-channel :
704
865
name : " Notify Slack Channel on Build Failures"
705
866
runs-on : ubuntu-latest
@@ -709,6 +870,7 @@ jobs:
709
870
- octavia-cli-build
710
871
- platform-build
711
872
- kube-acceptance-test
873
+ - helm-acceptance-test
712
874
if : ${{ failure() && github.ref == 'refs/heads/master' }}
713
875
steps :
714
876
- name : Publish to OSS Build Failure Slack Channel
@@ -733,6 +895,7 @@ jobs:
733
895
- octavia-cli-build
734
896
- platform-build
735
897
- kube-acceptance-test
898
+ - helm-acceptance-test
736
899
if : success()
737
900
steps :
738
901
- name : Get Previous Workflow Status
0 commit comments