This file contains hidden or 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
| - task: upload-bom-dtrack@1 | |
| displayName: 'Upload SBOM to Dependency-Track' | |
| inputs: | |
| bomFilePath: '$(Pipeline.Workspace)/$(artifactpath)/bom.xml' | |
| dtrackProjName: 'New-Project' | |
| dtrackProjVersion: 'DEVELOPMENT' | |
| serviceConnection: 'OWASP Dependency Track' | |
| dtrackProjAutoCreate: true |
This file contains hidden or 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
| - task: upload-bom-dtrack@1 | |
| displayName: "Upload SBOM to Dependency Track" | |
| inputs: | |
| dtrackProjId: "545ba86e-6f3f-4967-8402-874f072d01b5" | |
| dtrackProjAutoCreate: false | |
| bomFilePath: $(Pipeline.Workspace)/$(artifactpath)/BOM/bom.xml | |
| serviceConnection: "OWASP Dependency Track" |
This file contains hidden or 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
| steps: | |
| - script:npm install -g @cyclonedx/cyclonedx-npm | |
| displayName: 'npm install' | |
| - script:cyclonedx-npm $(Build.SourcesDirectory)\Path\To\package.json --output-file $(Build.ArtifactStagingDirectory)\bom.json | |
| displayName: 'Create BOM' | |
This file contains hidden or 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
| steps: | |
| - script: 'dotnet tool install --global CycloneDX' | |
| displayName: 'Install CycloneDX' | |
| - script: 'dotnet-CycloneDX Path/To/MySolution.sln -o $(Build.ArtifactStagingDirectory)' | |
| displayName: 'Create SBOM' | |
This file contains hidden or 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
| # List groups and their Object IDs | |
| az ad group list --query "[].{Name:displayName, ObjectId:id}" -o table |
This file contains hidden or 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
| RESOURCE_GROUP="rg-dependencytrack-prod" | |
| API_APP_NAME="ca-dtrack-frontend-prod" | |
| # Update container app with OIDC configuration | |
| az containerapp update \ | |
| --name $API_APP_NAME \ | |
| --resource-group $RESOURCE_GROUP \ | |
| --set-env-vars \ | |
| "ALPINE_OIDC_CLIENT_ID=clientid" \ | |
| "ALPINE_OIDC_ISSUER=https://login.microsoftonline.com/tenantid/v2.0" \ |
This file contains hidden or 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
| RESOURCE_GROUP="rg-dependencytrack-prod" | |
| API_APP_NAME="ca-dtrack-api-prod" | |
| # Update container app with OIDC configuration | |
| az containerapp update \ | |
| --name $API_APP_NAME \ | |
| --resource-group $RESOURCE_GROUP \ | |
| --set-env-vars \ | |
| "ALPINE_OIDC_ENABLED=true" \ | |
| "ALPINE_OIDC_CLIENT_ID=clientid" \ |
This file contains hidden or 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
| FRONTEND_URL=$(az containerapp show \ | |
| --name $FRONTEND_APP_NAME \ | |
| --resource-group $RESOURCE_GROUP \ | |
| --query properties.configuration.ingress.fqdn -o tsv) | |
| echo "Dependency-Track UI: https://${FRONTEND_URL}" |
This file contains hidden or 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
| FRONTEND_APP_NAME="ca-dtrack-frontend-prod" | |
| # Get API server internal URL | |
| API_URL=$(az containerapp show \ | |
| --name $API_APP_NAME \ | |
| --resource-group $RESOURCE_GROUP \ | |
| --query properties.configuration.ingress.fqdn -o tsv) | |
| # Create frontend container app | |
| az containerapp create \ |
This file contains hidden or 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
| API_APP_NAME="ca-dtrack-api-prod" | |
| # Create managed identity for Key Vault access | |
| IDENTITY_NAME="id-dtrack-api" | |
| az identity create \ | |
| --name $IDENTITY_NAME \ | |
| --resource-group $RESOURCE_GROUP | |
| IDENTITY_ID=$(az identity show \ | |
| --name $IDENTITY_NAME \ |
NewerOlder