mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Tätigkeitskalender Suchfunktion und neues Design Zusätzliche Änderungen im PR: - Anpassungen für GitHub package Zugriff - UiModalRef um ein afterChanged$ erweitert, um nach dem schließen zu erkennen ob ein reload notwendig ist - ui-loader funktionierte nicht bei verwendung von ui-scroll-container mit useLoadAnimation false - ui-skeleton-loader um Template für TK Listenitem erweitert Related work items: #3419, #3420, #3421, #3422, #3423
224 lines
8.3 KiB
YAML
224 lines
8.3 KiB
YAML
name: '$(Major).$(Minor).$(Patch)-$(SourceBranchName)'
|
|
|
|
trigger:
|
|
batch: true
|
|
branches:
|
|
include:
|
|
- '*'
|
|
|
|
variables:
|
|
# Major Version einstellen
|
|
- name: 'Major'
|
|
value: '2'
|
|
# Minor Version einstellen
|
|
- name: 'Minor'
|
|
value: '0'
|
|
- name: 'Patch'
|
|
value: "$[counter(format('{0}.{1}', variables['Major'], variables['Minor']),0)]"
|
|
- name: 'BuildUniqueID'
|
|
value: '$(Build.BuildID)-$(Agent.Id)-$(System.DefinitionId)-$(System.JobId)'
|
|
- group: 'GithubCMF'
|
|
|
|
jobs:
|
|
# - job: cibuild_fast
|
|
# displayName: ISAClient CI Fast
|
|
# pool:
|
|
# name: 'Default'
|
|
# demands:
|
|
# - Agent.OS -equals Linux
|
|
# - docker
|
|
# condition: and(ne(variables['Build.SourceBranch'], 'refs/heads/develop'), ne(variables['Build.SourceBranch'], 'refs/heads/integration'), ne(variables['Build.SourceBranch'], 'refs/heads/master'), not(startsWith(variables['Build.SourceBranch'], 'refs/heads/hotfix/')), not(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')))
|
|
# steps:
|
|
# - task: npmAuthenticate@0
|
|
# displayName: 'npm auth'
|
|
# inputs:
|
|
# workingFile: .npmrc
|
|
# - task: Docker@2
|
|
# displayName: 'build ISAClient Debug'
|
|
# inputs:
|
|
# command: 'build'
|
|
# Dockerfile: Dockerfile
|
|
# buildContext:
|
|
# tags: '$(Build.BuildNumber)-$(Build.SourceVersion)'
|
|
# arguments: '--build-arg SEMVERSION=$(Major).$(Minor).$(Patch)'
|
|
- job: unittests
|
|
displayName: Unit Tests
|
|
pool:
|
|
name: 'Default'
|
|
demands:
|
|
- Agent.OS -equals Linux
|
|
- docker
|
|
steps:
|
|
- task: npmAuthenticate@0
|
|
displayName: 'npm auth'
|
|
inputs:
|
|
workingFile: .npmrc
|
|
customEndpoint: GitHub-read-packages
|
|
- bash: |
|
|
echo Build and Run Tests in docker
|
|
docker build . \
|
|
-f $(Build.SourcesDirectory)/Dockerfile \
|
|
-t paragondata/test-$(BuildUniqueID):$(Build.BuildId) \
|
|
--no-cache \
|
|
--target test \
|
|
--build-arg SEMVERSION=$(Major).$(Minor).$(Patch) \
|
|
--build-arg BuildUniqueID=$(BuildUniqueID)
|
|
displayName: Build and Run Tests in docker
|
|
- bash: |
|
|
echo Copy Tests from docker container
|
|
docker run --name isatest$(BuildUniqueID) --rm -d paragondata/test-$(BuildUniqueID):$(Build.BuildId)
|
|
docker cp isatest$(BuildUniqueID):/app/testresults $(Build.StagingDirectory)/testresults
|
|
docker cp isatest$(BuildUniqueID):/app/coverage $(Build.StagingDirectory)/coverage
|
|
docker stop isatest$(BuildUniqueID)
|
|
condition: always()
|
|
displayName: Copy Tests from docker container
|
|
- task: PublishTestResults@2
|
|
displayName: Publish Test results
|
|
inputs:
|
|
testResultsFiles: '**/TESTS*.xml'
|
|
searchFolder: $(Build.StagingDirectory)/testresults
|
|
testResultsFormat: JUnit
|
|
mergeTestResults: false
|
|
failTaskOnFailedTests: true
|
|
condition: always()
|
|
- task: PublishCodeCoverageResults@1
|
|
displayName: Publish code Coverage
|
|
inputs:
|
|
codeCoverageTool: Cobertura
|
|
summaryFileLocation: $(Build.StagingDirectory)/coverage/**/cobertura.xml
|
|
pathToSources: $(Build.SourcesDirectory)
|
|
condition: always()
|
|
- bash: |
|
|
echo ##############
|
|
docker images -f "label=build.uniqueid=$(BuildUniqueID)"
|
|
echo ##############
|
|
if [[ $(docker images -q -f "label=build.uniqueid=$(BuildUniqueID)") ]]; then
|
|
docker rmi -f $(docker images -q -f "label=build.uniqueid=$(BuildUniqueID)")
|
|
else
|
|
echo "build wurde nicht gefunden und nicht gelöscht"
|
|
fi
|
|
displayName: Remove docker image
|
|
condition: always()
|
|
- job: cibuild_debug
|
|
displayName: ISAClient CI Debug
|
|
pool:
|
|
name: 'Default'
|
|
demands:
|
|
- Agent.OS -equals Linux
|
|
- docker
|
|
condition: and(ne(variables['Build.SourceBranch'], 'refs/heads/integration'), ne(variables['Build.SourceBranch'], 'refs/heads/master'), not(startsWith(variables['Build.SourceBranch'], 'refs/heads/hotfix/')), not(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')))
|
|
steps:
|
|
- task: npmAuthenticate@0
|
|
displayName: 'npm auth'
|
|
inputs:
|
|
workingFile: .npmrc
|
|
customEndpoint: GitHub-read-packages
|
|
- task: Docker@2
|
|
displayName: 'build ISAClient Debug'
|
|
inputs:
|
|
containerRegistry: 'Harbor isa'
|
|
repository: isa/ui
|
|
command: 'build'
|
|
Dockerfile: Dockerfile
|
|
buildContext:
|
|
tags: 'debug-$(Build.BuildNumber)-$(Build.SourceVersion)'
|
|
arguments: |
|
|
--no-cache
|
|
--target publish
|
|
--build-arg SEMVERSION=$(Major).$(Minor).$(Patch)
|
|
--build-arg BuildUniqueID=$(BuildUniqueID)
|
|
|
|
- task: Docker@2
|
|
displayName: 'push ISAClient Debug'
|
|
inputs:
|
|
containerRegistry: 'Harbor isa'
|
|
repository: 'isa/ui'
|
|
command: 'push'
|
|
tags: 'debug-$(Build.BuildNumber)-$(Build.SourceVersion)'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Artefakt veröffentlichen: HelmValues'
|
|
inputs:
|
|
PathtoPublish: helmvalues
|
|
ArtifactName: HelmValues
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Artefakt veröffentlichen: ISAClientConfigs'
|
|
inputs:
|
|
PathtoPublish: 'apps/isa-app/src/config'
|
|
ArtifactName: SalesConfigs
|
|
|
|
- bash: |
|
|
echo ##############
|
|
docker images -f "label=build.uniqueid=$(BuildUniqueID)"
|
|
echo ##############
|
|
if [[ $(docker images -q -f "label=build.uniqueid=$(BuildUniqueID)") ]]; then
|
|
docker rmi -f $(docker images -q -f "label=build.uniqueid=$(BuildUniqueID)")
|
|
else
|
|
echo "build wurde nicht gefunden und nicht gelöscht"
|
|
fi
|
|
displayName: Remove docker image
|
|
condition: always()
|
|
|
|
- job: cibuild_prod
|
|
displayName: ISAClient CI Prod
|
|
pool:
|
|
name: 'Default'
|
|
demands:
|
|
- Agent.OS -equals Linux
|
|
- docker
|
|
condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/integration'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/heads/hotfix/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'))
|
|
steps:
|
|
- task: npmAuthenticate@0
|
|
displayName: 'npm auth'
|
|
inputs:
|
|
workingFile: .npmrc
|
|
customEndpoint: GitHub-read-packages
|
|
- task: Docker@2
|
|
displayName: 'build ISAClient Prod'
|
|
inputs:
|
|
containerRegistry: 'Harbor isa'
|
|
repository: isa/ui
|
|
command: 'build'
|
|
Dockerfile: Dockerfile
|
|
buildContext:
|
|
tags: 'prod-$(Build.BuildNumber)-$(Build.SourceVersion)'
|
|
arguments: |
|
|
--no-cache
|
|
--target publish
|
|
--build-arg IS_PRODUCTION=true
|
|
--build-arg SEMVERSION=$(Major).$(Minor).$(Patch)
|
|
--build-arg BuildUniqueID=$(BuildUniqueID)
|
|
|
|
- task: Docker@2
|
|
displayName: 'push ISAClient Prod'
|
|
inputs:
|
|
containerRegistry: 'Harbor isa'
|
|
repository: 'isa/ui'
|
|
command: 'push'
|
|
tags: 'prod-$(Build.BuildNumber)-$(Build.SourceVersion)'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Artefakt veröffentlichen: HelmValues'
|
|
inputs:
|
|
PathtoPublish: helmvalues
|
|
ArtifactName: HelmValues
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Artefakt veröffentlichen: ISAClientConfigs'
|
|
inputs:
|
|
PathtoPublish: 'apps/isa-app/src/config'
|
|
ArtifactName: SalesConfigs
|
|
|
|
- bash: |
|
|
echo ##############
|
|
docker images -f "label=build.uniqueid=$(BuildUniqueID)"
|
|
echo ##############
|
|
if [[ $(docker images -q -f "label=build.uniqueid=$(BuildUniqueID)") ]]; then
|
|
docker rmi -f $(docker images -q -f "label=build.uniqueid=$(BuildUniqueID)")
|
|
else
|
|
echo "build wurde nicht gefunden und nicht gelöscht"
|
|
fi
|
|
displayName: Remove docker image
|
|
condition: always()
|