Skip to content

Commit

Permalink
fix and workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
bouchena committed Sep 5, 2024
1 parent 00e6020 commit 73898c5
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: SonarQube scan

on:
workflow_dispatch:
push:
branches: [feat/catalog-info]

jobs:
sonar:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout the repository 🎁
uses: actions/checkout@v4

- name: Auth GCP 🔒
uses: PrestaShopCorp/prestashop-github-action-gcp-auth@v1
with:
auth-mode: 'json-file'
credentials-json: ${{ secrets.SONARQUBE_SECRET_KEY }}
gke-cluster-name: ${{ secrets.CLUSTER_NAME_INTEGRATION }}
setup-gcloud: false
registry-login: false

- name: Launch quality test ✅
uses: PrestaShopCorp/prestashop-github-action-sonarqube@v1
with:
sonar-token: ${{ secrets.SONAR_TOKEN }} # Your token sonarqube to identify your project
48 changes: 48 additions & 0 deletions .github/workflows/techdocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish TechDocs Site

on:
workflow_dispatch:
push:
branches: [feat/catalog-info]

jobs:
publish-techdocs-site:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
GCS_BUCKET_NAME: ps-eu-w1-backstage-documentations-integration
ENTITY_NAMESPACE: 'default'
ENTITY_KIND: 'Component'
ENTITY_NAME: 'ps_mbo-documentation'

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Auth GCP
uses: PrestaShopCorp/prestashop-github-action-gcp-auth@v1
with:
auth-mode: 'workload-federation' # ou 'json-file'
provider: ${{ secrets.WI_PROVIDER_INTEGRATION }}
service-account: ${{ secrets.WI_SA_INTEGRATION }}
setup-gcloud: false
registry-login: false

- uses: actions/setup-node@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install techdocs-cli
run: sudo npm install -g @techdocs/cli

- name: Install mkdocs and mkdocs plugins
run: python -m pip install mkdocs-techdocs-core==1.*

- name: Generate docs site
run: techdocs-cli generate --no-docker --verbose

- name: Publish docs site
run: techdocs-cli publish --publisher-type googleGcs --storage-name $GCS_BUCKET_NAME --entity $ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME
20 changes: 20 additions & 0 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,29 @@ spec:
pm: Samuel Boucher
lifecycle: production
system: mbo
providesApis:
- ps_mbo-api
consumesApis:
- disneystore-api
- accounts-api
dependsOn:
- component:mbo-ui
---
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
name: ps_mbo-api
title: PS MBO Module API
description: " "
annotations:
sentry.io/project-slug: mbo-module
github.com/project-slug: PrestaShopCorp/ps_mbo
spec:
type: openapi
tech_lead: Vincent Garcia
pm: Samuel Boucher
owner: squad-mbo-journey
lifecycle: production
system: mbo
definition: " "
---
19 changes: 19 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/analysis-parameters/
# Mandatory
sonar.projectName=ps_mbo
sonar.projectKey=ps_mbo

# Debug
#sonar.log.level=INFO
#sonar.verbose=false

sonar.qualitygate.wait=true
sonar.sourceEncoding=UTF-8

# SCM -> Git
sonar.scm.provider=git
## respects the .gitignore file.
sonar.scm.exclusions.disabled=false

# Exclude test subdirectories & more from source scope
# sonar.exclusions=**/**

0 comments on commit 73898c5

Please sign in to comment.