UI for creation and configuration of Helm Apps #1954
This file contains 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: BUILD | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- master | |
- uix | |
tags: | |
- '*' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting for sonar | |
fetch-depth: 0 | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Cache local Maven repository | |
- name: Cache local NPM repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install zopfli | |
run: sudo apt-get install -y zopfli | |
- name: Verify signature NuvlaBox script | |
run: ./.travis/verify_signature.sh | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Set PR commit SHA in environment variables useful for build version | |
if: github.event_name == 'pull_request' | |
run: echo "GITHUB_PR_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV | |
- name: Setup Sonar Scanner | |
uses: warchant/setup-sonar-scanner@v3 | |
with: | |
version: 4.6.2.2472 | |
- name: Run Sonar Scanner | |
env: | |
# provide GITHUB_TOKEN to get access to secrets.SONARQUBE_TOKEN | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
working-directory: code | |
run: sonar-scanner | |
-Dsonar.login=${{ secrets.SONARQUBE_TOKEN }} | |
-Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} | |
- name: SonarQube Quality Gate check | |
uses: sonarsource/[email protected] | |
# Force to fail step after specific time | |
timeout-minutes: 5 | |
with: | |
scanMetadataReportFile: code/.scannerwork/report-task.txt | |
env: | |
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | |
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
- uses: s4u/[email protected] | |
with: | |
githubServer: false | |
override: true | |
servers: | | |
[{ | |
"id": "docker.io", | |
"username": "${{ secrets.SIXSQ_DOCKER_USERNAME }}", | |
"password": "${{ secrets.SIXSQ_DOCKER_PASSWORD }}" | |
}] | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- name: Build with Maven | |
env: | |
TRAVIS_BRANCH: ${{ steps.extract_branch.outputs.branch }} | |
TRAVIS_PULL_REQUEST_BRANCH: ${{ github.head_ref }} | |
TRAVIS_BUILD_NUMBER: ${{ github.run_id }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: mvn deploy | |
notify: | |
if: always() | |
name: Post Workflow Status To Slack | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Gamesight/slack-workflow-status@master | |
with: | |
repo_token: ${{secrets.GITHUB_TOKEN}} | |
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}} |