forked from cesarimm21/millasIbk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
98 lines (95 loc) · 3.52 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#Configuracion pipeline: tkn-xpay-qa-servicios
#$(System.DefaultWorkingDirectory)=/home/vsts/work/1/s
#$(Pipeline.Workspace)=/home/vsts/work/1
parameters:
- name: vmImage
type: string
displayName: Plataforma
# default: 'ubuntu 16.04'
# default: 'ubuntu-latest'
values:
- 'windows-latest'
# - 'ubuntu-latest'
# - 'macOS-latest'
# - name: tags
# type: string
# displayName: Cucumber-tags a ejecutar
# values:
# - '@CONSULT_NIUBIZ'
# - '@ESC_APROV_CP01'
# - name: ruta
- name: build
default: true
type: boolean
- name: report
default: true
type: boolean
trigger: none
pr: none
variables:
- name: MAVEN_CACHE_FOLDER
value: $(Pipeline.Workspace)/.m2/repository
- name: MAVEN_OPTS
value: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
- group: CUCUMBER_TEST_SUIT
- name: imageRepository
value: 'millas ibk'
- name: tag
value: '$(Build.BuildId)'
- name: vmImageName
value: 'ubuntu-latest'
stages:
- stage: ejecutar_automatizacion_pruebas
displayName: Ejecutar automatizacion de pruebas
jobs:
- job: Construccion_ejecucion
pool:
vmImage: ${{ parameters.vmImage }}
steps:
- script: |
mvn clean
displayName: 'Limpiar proyecto'
# - script: |
# echo Creando carpeta archivosVarios para evidencias txt y demas - windows
# mkdir $(System.DefaultWorkingDirectory)\target\archivosVarios
# condition: contains('${{ parameters.vmImage }}', 'windows')
# displayName: 'creando carpeta archivosVarios - windows'
# - script: |
# echo Creando carpeta archivosVarios para evidencias txt y demas - linux
# mkdir -p $(System.DefaultWorkingDirectory)/target/archivosVarios
# condition: contains('${{ parameters.vmImage }}', 'ubuntu')
# displayName: 'creando carpeta archivosVarios - linux'
# - script: |
# echo Reemplazando dataDriven del workspace por el de SharePoint
# condition: not(contains('${{ parameters.ruta }}', 'robot'))
# displayName: 'reemplazando dataDriven'
- script: |
echo Commit-message: $(Build.SourceVersionMessage)
echo Cucumber-tags a ejecutar: @$(CUCUMBER_TEST_SUIT)
mvn verify -Dcucumber.options="src/test/resources/features/ --tags @$(CUCUMBER_TEST_SUIT)"
condition: not(startsWith(variables['Build.SourceVersionMessage'], 'noBuild'))
displayName: 'Ejecutar cucumber-tags'
- script: |
mvn serenity:aggregate
condition: always()
displayName: 'Generar reporte-serenity'
- task: PublishPipelineArtifact@1
condition: always()
inputs:
targetPath: './target/site/serenity/'
artifactName: 'ReporteSerenity'
artifactType: 'pipeline'
displayName: 'Publicar reporte'
# - task: PublishPipelineArtifact@1
# condition: always()
# inputs:
# targetPath: './target/archivosVarios/'
# artifactName: 'ArchivosVarios'
# artifactType: 'pipeline'
# displayName: 'Publicar archivos varios'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/TEST-*.xml'
publishRunAttachments: true
displayName: 'Publicar resultados de pruebas'