first commit

This commit is contained in:
Sergio Matias Urquin
2025-04-29 18:47:35 -06:00
commit 3609d1fa20
75 changed files with 10544 additions and 0 deletions

59
.pipelines/GitVersion.yml Normal file
View File

@@ -0,0 +1,59 @@
mode: mainline
assembly-versioning-scheme: MajorMinorPatch
tag-prefix: '[vV]'
major-version-bump-message: '\+semver:\s?(breaking|major)'
minor-version-bump-message: '\+semver:\s?(feature|minor)'
patch-version-bump-message: '\+semver:\s?(fix|patch)'
no-bump-message: '\+semver:\s?(none|skip)'
legacy-semver-padding: 4
build-metadata-padding: 4
commits-since-version-source-padding: 4
commit-message-incrementing: Enabled
branches:
main:
regex: ^master$|^main$
tag: ''
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
source-branches: [ 'develop', 'release' ]
tracks-release-branches: false
is-release-branch: false
is-mainline: true
pre-release-weight: 55000
feature:
regex: ^features?[/-]
tag: useBranchName
increment: Inherit
prevent-increment-of-merged-branch-version: false
track-merge-target: false
source-branches: [ 'develop', 'main', 'release', 'feature', 'support', 'hotfix' ]
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000
release:
regex: ^releases?[/-]
tag: beta
increment: None
is-mainline: true
regex: ^releases?[/-]
prevent-increment-of-merged-branch-version: true
track-merge-target: false
source-branches: [ 'develop', 'main', 'support', 'release' ]
tracks-release-branches: false
is-release-branch: true
is-mainline: false
pre-release-weight: 30000
hotfix:
regex: ^hotfix(es)?[/-]
increment: Patch
prevent-increment-of-merged-branch-version: false
track-merge-target: false
source-branches: [ 'develop', 'main', 'support' ]
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000
ignore:
sha: []

View File

@@ -0,0 +1,107 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- development
- releases/*
- feature/*
- hotfix/*
- bugfix/*
variables:
- group: blueprint-sandbox-web
- name: isReleaseDeployment
value: $[eq(variables['Build.SourceBranch'], 'refs/heads/development')]
- name: imageName
value: $[variables.containerImageName]
- name: containerRegistryEndpoint
value: $[variables.containerRegistryEndpointUrl]
- name: webAppName
value: $[variables.appServiceName]
pool:
vmImage: ubuntu-latest
steps:
- checkout: self
fetchDepth: 0 # It will fix gitversion iteraction to extract the correct version from our history
persistCredentials: true # It will fix terminal user to be able to push tag version on the build.
displayName: '[Step1.0] Define fetchDepth'
# Install gitversion tool
# - task: gitversion/setup@3
# displayName: '[Step2.1] Install Git Tools'
# inputs:
# versionSpec: '5.x'
# Execute the tool to identify the next SemVersion for this library
# - task: gitversion/execute@3
# displayName: '[Step2.2] Calculate SemVer'
# inputs:
# useConfigFile: true
# configFilePath: '.pipelines/GitVersion.yml'
# Echo the SemVersion Identified
- script: echo current version is $(GitVersion.SemVer) $(Build.SourcesDirectory)
displayName: '[Step2.3] Display calculated version'
- script: npm ci
displayName: '[Step3.1] NPM CI'
- task: SnykSecurityScan@1
displayName: '[Step3.2] Snyk Scanning'
inputs:
serviceConnectionEndpoint: 'SnykConnection'
testType: 'app'
severityThreshold: 'high'
monitorWhen: 'noIssuesFound'
failOnIssues: true
additionalArguments: '--file=package.json'
- task: Docker@2
displayName: '[Step4.1] Build'
inputs:
containerRegistry: '$(containerRegistryServiceConnectionName)'
repository: '$(imageName)'
command: 'build'
# tags: '$(GitVersion.SemVer)'
tags: 'sandbox'
Dockerfile: '**/Dockerfile'
arguments: --build-arg NEXT_PUBLIC_API_URL=$(NEXT_PUBLIC_API_URL) --build-arg NEXT_PUBLIC_CERBEROS_API_URL=$(NEXT_PUBLIC_CERBEROS_API_URL) --build-arg NEXT_PUBLIC_APP_ID=$(NEXT_PUBLIC_APP_ID) --build-arg NEXT_PUBLIC_REDIRECT_URI=$(NEXT_PUBLIC_REDIRECT_URI) --build-arg NEXT_PUBLIC_SCOPE=$(NEXT_PUBLIC_SCOPE) --build-arg NEXT_PUBLIC_AUTHORITY=$(NEXT_PUBLIC_AUTHORITY) --build-arg NEXT_PUBLIC_LOGOUT_URI=$(NEXT_PUBLIC_LOGOUT_URI) --build-arg NEXT_PUBLIC_ACCESS_AS_USER=$(NEXT_PUBLIC_ACCESS_AS_USER)
# - task: SnykSecurityScan@1
# inputs:
# serviceConnectionEndpoint: 'SnykConnection'
# testType: 'container'
# # dockerImageName: '$(containerRegistryEndpoint)/$(imageName):$(GitVersion.SemVer)'
# dockerImageName: '$(containerRegistryEndpoint)/$(imageName):sandbox'
# severityThreshold: 'high'
# monitorWhen: 'noIssuesFound'
# failOnIssues: true
- task: Docker@2
displayName: '[Step4.1] Push'
inputs:
containerRegistry: '$(containerRegistryServiceConnectionName)'
repository: '$(imageName)'
command: 'push'
# tags: '$(GitVersion.SemVer)'
tags: 'sandbox'
Dockerfile: '**/Dockerfile'
- task: AzureRmWebAppDeployment@4
displayName: 'Deploy on Sandbox'
condition: and(succeeded(), eq(variables.isReleaseDeployment, true))
enabled: true
inputs:
ConnectionType: 'AzureRM'
azureSubscription: '$(azureRMServiceConnectionName)'
appType: 'webAppContainer'
WebAppName: '$(webAppName)'
DockerNamespace: '$(containerRegistryEndpoint)'
DockerRepository: '$(imageName)'
# DockerImageTag: '$(GitVersion.SemVer)'
DockerImageTag: 'sandbox'