Skip to content

debuging cicd

debuging cicd #581

Workflow file for this run

name: Deploy prod version
on:
push:
branches:
- 'master'
jobs:
sonarprod:
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
publishbrod:
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 latest
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
repository: mixeway/backend
tags: latest
- name: docker actions build & deploy version
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
repository: mixeway/backend
tags: ${{ env.RELEASE_VERSION }}