-
Notifications
You must be signed in to change notification settings - Fork 0
/
stages-example.groovy
32 lines (29 loc) · 1011 Bytes
/
stages-example.groovy
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
pipeline {
agent any // Define el agente que ejecutará el pipeline (puede ser cualquier agente)
stages {
stage('Build') { // Primera etapa de Build
steps {
script {
echo 'Building the application...' // Mensaje de construcción
//sh 'npm install' // Comando para instalar las dependencias
}
}
}
stage('Test') { // Segunda etapa de Test
steps {
script {
echo 'Running tests...' // Mensaje de ejecución de pruebas
//sh 'npm test' // Comando para ejecutar pruebas
}
}
}
stage('Deploy') { // Tercera etapa de Deploy
steps {
script {
echo 'Deploying the application...' // Mensaje de despliegue
//sh 'npm deploy' // Comando para desplegar la aplicación
}
}
}
}
}