Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 34 additions & 37 deletions .github/workflows/frontend-monorepo-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,46 +217,43 @@ jobs:
sonar_org: 'mov-ai'
sonar_token: ${{ secrets.sonar_token }}

# - name: SonarCloud Scan
# uses: SonarSource/sonarqube-scan-action@v6
# env:
# GITHUB_TOKEN: ${{ github.token }} # Needed to get PR information, if any
# SONAR_TOKEN: ${{ secrets.sonar_token }}
# with:
# projectBaseDir: ./
# args: >
# "-Dsonar.organization=mov-ai"
# "-Dsonar.projectKey=${{ github.repository_owner }}_${{ github.event.repository.name }}"
# "-Dsonar.sources=."
# "-Dsonar.scm.provider=git"
# "-Dsonar.qualitygate.wait=true"
# "-Dsonar.qualitygate.timeout=300"
# "-Dsonar.coverage.exclusions=**/*.test.js,**/*.test.jsx"
# "-Dsonar.cpd.exclusions=**/*.test.js,**/*.test.jsx"
# "-Dsonar.javascript.lcov.reportPaths=**/coverage/lcov.info"
# "-Dsonar.nodejs.executable=${{ steps.build_step.outputs.node_path }}"
# "-Dsonar.exclusions=.nx/**"

# - name: Link to SonarCloud dashboard
# shell: bash
# run: |
# echo "Please check report here: https://sonarcloud.io/project/overview?id=${{ github.repository_owner }}_${{ github.event.repository.name }}"

- name: Check manifest.json exists
id: check_manifest_json
uses: andstor/file-existence-action@v3
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v6
env:
GITHUB_TOKEN: ${{ github.token }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.sonar_token }}
with:
files: 'manifest.json'
projectBaseDir: ./
args: >
"-Dsonar.organization=mov-ai"
"-Dsonar.projectKey=${{ github.repository_owner }}_${{ github.event.repository.name }}"
"-Dsonar.sources=."
"-Dsonar.scm.provider=git"
"-Dsonar.qualitygate.wait=true"
"-Dsonar.qualitygate.timeout=300"
"-Dsonar.coverage.exclusions=**/*.test.js,**/*.test.jsx"
"-Dsonar.cpd.exclusions=**/*.test.js,**/*.test.jsx"
"-Dsonar.javascript.lcov.reportPaths=**/coverage/lcov.info"
"-Dsonar.nodejs.executable=${{ steps.build_step.outputs.node_path }}"
"-Dsonar.exclusions=.nx/**"

- name: Link to SonarCloud dashboard
shell: bash
run: |
echo "Please check report here: https://sonarcloud.io/project/overview?id=${{ github.repository_owner }}_${{ github.event.repository.name }}"

- name: Bump manifest.json metadata Version
if: ${{ steps.check_manifest_json.outputs.files_exists == 'true' }}
uses: restackio/update-json-values-action@v1.0.0
with:
file: build/manifest.json
values: |
{
"version": "${{steps.vars-after-raise.outputs.npm_pkg_version}}"
}
run: |
for dir in ${{ inputs.applications }}; do
if [ -f "$dir/build/manifest.json" ]; then
echo "Updating manifest.json in $dir"
version="${{ steps.vars-after-raise.outputs.npm_pkg_version }}"
jq --arg v "$version" '.version = $v' "$dir/build/manifest.json" > "$dir/build/manifest.json.tmp"
rm "$dir/build/manifest.json"
mv "$dir/build/manifest.json.tmp" "$dir/build/manifest.json"
echo "Updated manifest.json version to $version in $dir"
fi
done

- name: Pack debian
run: |
Expand Down