Tests #1820
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - "*" | |
| pull_request: | |
| schedule: | |
| - cron: '0 5 * * *' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '11' | |
| cache: 'maven' | |
| - name: Initialize CodeQL | |
| if: github.event_name == 'pull_request' | |
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: java, javascript | |
| - name: Check style | |
| run: make -C functionaltest-jenkins-plugin style | |
| - name: Build with Maven | |
| run: cd stackrox-container-image-scanner && ./mvnw -B verify package hpi:hpi cyclonedx:makeAggregateBom | |
| - name: Perform CodeQL Analysis | |
| if: github.event_name == 'pull_request' | |
| uses: github/codeql-action/analyze@v4 | |
| - name: Run jenkins in background | |
| run: cd stackrox-container-image-scanner && ./mvnw hpi:run -Djetty.port=8080 & | |
| - name: Create k8s Kind Cluster | |
| uses: helm/kind-action@v1 | |
| - uses: actions/checkout@v6 | |
| with: | |
| repository: stackrox/stackrox | |
| path: stackrox | |
| - name: Install Stackrox | |
| env: | |
| MAIN_IMAGE_TAG: "latest" | |
| SENSOR_HELM_DEPLOY: "true" | |
| ROX_SCANNER_V4: "false" | |
| run: | | |
| stackrox/deploy/k8s/deploy-local.sh | |
| ROX_PASSWORD=$(cat stackrox/deploy/k8s/central-deploy/password) | |
| echo "::add-mask::$ROX_PASSWORD" | |
| echo "ROX_PASSWORD=$ROX_PASSWORD" >> $GITHUB_ENV | |
| - name: Wait for scanner to start | |
| run: sleep 120 | |
| - name: Add stackrox certificate | |
| run: scripts/set-certificates.sh | |
| - name: Run tests | |
| env: | |
| ROX_ENDPOINT: 'https://central.stackrox:8000' | |
| run: make -C functionaltest-jenkins-plugin test |