volcano.sh/volcano@v1.9.0/.github/workflows/e2e_spark.yaml (about)

     1  name: E2E Spark Integration Test
     2  
     3  on:
     4    # Post check in below branches
     5    push:
     6      branches:
     7        - master
     8    # PR triggered job
     9    pull_request:
    10  jobs:
    11    k8s-integration-tests:
    12      name: "E2E about Spark Integration test"
    13      runs-on: ubuntu-22.04
    14      steps:
    15  
    16      - name: Checkout current Volcano repository
    17        if: github.event.inputs.volcano-branch==''
    18        uses: actions/checkout@v3
    19  
    20      - name: Checkout Spark repository
    21        uses: actions/checkout@v3
    22        with:
    23          fetch-depth: 0
    24          repository: apache/spark
    25          ref: branch-3.4
    26          path: ${{ github.workspace }}/spark
    27      - name: Cache Scala, SBT and Maven
    28        uses: actions/cache@v3
    29        with:
    30          path: |
    31            build/apache-maven-*
    32            build/scala-*
    33            build/*.jar
    34            ~/.sbt
    35          key: build-${{ hashFiles('**/pom.xml', 'project/build.properties', 'build/mvn', 'build/sbt', 'build/sbt-launch-lib.bash', 'build/spark-build-info') }}
    36          restore-keys: |
    37            build-
    38      - name: Cache Coursier local repository
    39        uses: actions/cache@v3
    40        with:
    41          path: ~/.cache/coursier
    42          key: k8s-integration-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }}
    43          restore-keys: |
    44            k8s-integration-coursier-
    45      - name: Install Java 8
    46        uses: actions/setup-java@v3
    47        with:
    48          distribution: temurin
    49          java-version: 8
    50      - name: Install Go
    51        uses: actions/setup-go@v4
    52        with:
    53          go-version: 1.21.x
    54      - name: Set up Docker Buildx
    55        id: buildx
    56        uses: docker/setup-buildx-action@v2
    57      - name: start minikube
    58        run: |
    59          # Use pre-install minikube
    60          minikube start --cpus max --memory max
    61      - name: Build lastest volcano images
    62        run: |
    63          eval $(minikube docker-env)
    64          make TAG=v1.9.0 update-development-yaml
    65          make TAG=v1.9.0 images
    66          docker images | grep volcano
    67          cat ./installer/volcano-development.yaml  | grep "image: "
    68          sed 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/' ./installer/volcano-development.yaml | minikube kubectl -- replace --force -f -
    69      - name: Show all K8S pods and nodes
    70        run: |
    71          # Use minikube kubectl
    72          minikube kubectl -- get pods -A
    73          minikube kubectl -- get nodes -oyaml
    74      - name: Run K8S integration test
    75        run: |
    76          eval $(minikube docker-env)
    77          minikube kubectl -- create clusterrolebinding serviceaccounts-cluster-admin --clusterrole=cluster-admin --group=system:serviceaccounts || true
    78          build/sbt -Pvolcano -Pkubernetes -Pkubernetes-integration-tests -Dspark.kubernetes.test.driverRequestCores=0.5 -Dspark.kubernetes.test.executorRequestCores=0.2 -Dspark.kubernetes.test.volcanoMaxConcurrencyJobNum=1 -Dtest.include.tags=volcano "kubernetes-integration-tests/test"
    79        working-directory: ${{ github.workspace }}/spark
    80      - name: Collect Volcano logs
    81        if: failure()
    82        run: |
    83          kubectl logs $(kubectl get po -nvolcano-system | grep volcano-scheduler |cut -d" " -f1) -nvolcano-system > volcano-scheduler.log
    84          kubectl logs $(kubectl get po -nvolcano-system | grep volcano-admission |cut -d" " -f1 | grep -v init) -nvolcano-system > volcano-admission.log
    85          kubectl logs $(kubectl get po -nvolcano-system | grep volcano-controllers |cut -d" " -f1) -nvolcano-system > volcano-controllers.log
    86          kubectl get pod -A
    87          kubectl describe node
    88      - name: Upload Spark on K8S integration tests log files
    89        if: failure()
    90        uses: actions/upload-artifact@v2
    91        with:
    92          name: spark-on-kubernetes-it-log
    93          path: |
    94            **/target/integration-tests.log
    95            **/volcano-*.log
    96      - name: Cleanup minikube
    97        if: always()
    98        run: |
    99          minikube delete