checkmarx api #122
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: Test Build & Deploy beta | |
on: | |
push: | |
branches: | |
- '*' | |
- 'feature/*' | |
- 'refactor/*' | |
- 'release/*' | |
- '!master' | |
pull_request: | |
branches: | |
- '*' | |
- 'refactor/*' | |
- 'release/*' | |
- '!master' | |
jobs: | |
sonarbeta: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '11' | |
- name: Analyze with SonarCloud | |
run: mvn -B verify sonar:sonar -Dsonar.projectKey=Mixeway_MixewayBackend -Dsonar.organization=mixeway -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -DskipTests | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
# mixeway-scan: | |
# name: Mixeway Scanning | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v1 | |
# - name: Prepare variables | |
# id: vars | |
# shell: bash | |
# run: | | |
# echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
# echo "::set-output name=sha_short::$(git rev-parse HEAD)" | |
# - name: Prepare Mixeway docker image | |
# run: | | |
# docker pull mixeway/scanner:latest | |
# - name: Run Scan | |
# run: | | |
# docker run -e MODE=STANDALONE -e OSS_USERNAME=${{ secrets.oss_username }} -e OSS_KEY=${{ secrets.oss_key }} -e COMMIT_ID=${{ steps.vars.outputs.sha_short }} -e BRANCH=${{ steps.vars.outputs.branch }} -e MIXEWAY_PROJECT_NAME=${{ github.event.repository.name }} -e MIXEWAY_PROJECT_ID=${{ secrets.mixeway_project_id }} -e MIXEWAY_KEY=${{ secrets.mixeway_key }} -v $PWD:/opt/sources mixeway/scanner:latest | |
integration-testing: | |
name: Integration test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' # See 'Supported distributions' for available options | |
java-version: '8' | |
- name: Java version | |
run: | | |
java -version | |
- name: Run tests | |
run: | | |
mvn test -Dspring.profiles.active=unittest | |
publishbeta: | |
runs-on: ubuntu-latest | |
needs: integration-testing | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set Release version | |
run: | | |
echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | |
- name: docker actions build & deploy | |
uses: docker/build-push-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
repository: mixeway/backend | |
tags: ${{ env.RELEASE_VERSION }}-beta |