Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
212 commits
Select commit Hold shift + click to select a range
fec3dbf
Agregar archivo de Jenkins
franolave7 Oct 28, 2022
1b023a5
Merge pull request #1 from g3-usach-2022/release/release-jenkins
cyrse93 Oct 28, 2022
64f3506
add dskipTest in jenkins file at compile and package steps
Bfal10 Nov 1, 2022
49b318f
Merge pull request #2 from g3-usach-2022/feature/fixpipeline
cyrse93 Nov 1, 2022
3869188
Edicion de restdata estado pais
franolave7 Nov 7, 2022
7a18d7a
branch protection test
Bfal10 Nov 7, 2022
b3d6a8c
Merge branch 'main' of https://github.com/g3-usach-2022/ms-iclab
Bfal10 Nov 7, 2022
46f22cc
branch protection test
Bfal10 Nov 7, 2022
cb14372
branch protection test
Bfal10 Nov 7, 2022
71c15fa
branch protection test
Bfal10 Nov 7, 2022
e018696
fix pipeline run jar step
Bfal10 Nov 7, 2022
8f1410a
Merge branch 'main' into feature/fixpipeline
genilsuarez Nov 8, 2022
e2e0eb1
Merge pull request #3 from g3-usach-2022/feature/fixpipeline
Bfal10 Nov 8, 2022
0522061
fix pipeline run jar step
Bfal10 Nov 8, 2022
4f50f1e
Merge pull request #4 from g3-usach-2022/feature/fixpipeline
Bfal10 Nov 8, 2022
e918cc5
fix pipeline run jar step
Bfal10 Nov 8, 2022
bb42aa9
Merge pull request #5 from g3-usach-2022/feature/fixpipeline
Bfal10 Nov 8, 2022
e7e8d35
fix pipeline run jar step
Bfal10 Nov 8, 2022
62dd416
Merge pull request #6 from g3-usach-2022/feature/fixpipeline
Bfal10 Nov 8, 2022
325303e
fix pipeline run jar step
Bfal10 Nov 8, 2022
37e08de
Merge pull request #7 from g3-usach-2022/feature/fixpipeline
Bfal10 Nov 8, 2022
615244e
fix pipeline run jar step
Bfal10 Nov 8, 2022
59a0562
Merge pull request #8 from g3-usach-2022/feature/fixpipeline
Bfal10 Nov 8, 2022
f6e3ef3
Cambio Run JAR
Nov 8, 2022
27ac300
Merge pull request #9 from g3-usach-2022/feature/pipeline-1
genilsuarez Nov 8, 2022
2867ea4
Merge branch 'main' of https://github.com/g3-usach-2022/ms-iclab
Bfal10 Nov 8, 2022
f47958c
update main pipeline
Bfal10 Nov 10, 2022
55aaf31
Variables import java
franolave7 Nov 11, 2022
9569dd5
actualiza jenkins file
jpriverapardo Nov 11, 2022
1f37b99
actualiza rest data
jpriverapardo Nov 11, 2022
f9893d1
actualiza rest data v2
jpriverapardo Nov 11, 2022
50362ec
prueba pipeline multibranch
jpriverapardo Nov 12, 2022
a4eaa87
prueba pipeline multibranch 2
jpriverapardo Nov 12, 2022
0823924
prueba pipeline multibranch 3
jpriverapardo Nov 12, 2022
7697877
prueba pipeline multibranch 4
jpriverapardo Nov 12, 2022
3a7585a
Cambio Jenkins File respecto a Run Jar
franolave7 Nov 12, 2022
bcb641a
Cambio Jenkins File respecto a Run Jar 2
franolave7 Nov 12, 2022
6373651
Merge branch 'main' into feature/feature-estado-pais
Bfal10 Nov 12, 2022
ce7e696
Merge pull request #10 from g3-usach-2022/feature/feature-estado-pais
cyrse93 Nov 12, 2022
6738208
Merge branch 'develop' into feature/feature-estado-pais
Bfal10 Nov 12, 2022
d387d41
Merge pull request #11 from g3-usach-2022/feature/feature-estado-pais
Bfal10 Nov 12, 2022
fb80deb
Notificaciones de slack
franolave7 Nov 19, 2022
1525ddf
Notificaciones de slack
franolave7 Nov 19, 2022
5417e5d
Notificaciones de slack
franolave7 Nov 19, 2022
a3c3313
Notificaciones de slack
franolave7 Nov 19, 2022
b750239
Notificaciones de slack
franolave7 Nov 19, 2022
84c42c5
Notificaciones de slack
franolave7 Nov 19, 2022
b0f68ee
Notificaciones de slack
franolave7 Nov 19, 2022
213f172
Notificaciones de slack
franolave7 Nov 19, 2022
6253909
Notificaciones de slack
franolave7 Nov 19, 2022
90226e4
Notificaciones de slack
franolave7 Nov 19, 2022
3af3349
Notificaciones de slack
franolave7 Nov 19, 2022
7e80ec0
Notificaciones de slack
franolave7 Nov 19, 2022
f1e4060
Falla controlada en Jenkins File
franolave7 Nov 19, 2022
75cce51
Cambios con Sonarqube
franolave7 Nov 19, 2022
ff27e38
Cambios con Sonarqube
franolave7 Nov 19, 2022
33a8daf
Cambios con Sonarqube
franolave7 Nov 19, 2022
9e265bc
Merge branch 'release/estado-pais'
franolave7 Nov 19, 2022
e1d0f74
Merge tag 'estado-pais' into develop
franolave7 Nov 19, 2022
fb0d829
Se agrega stage para nexus
franolave7 Nov 19, 2022
0523308
Se agrega stage para nexus
franolave7 Nov 19, 2022
b1104c7
Se agrega stage para nexus
franolave7 Nov 19, 2022
b14693b
Se agrega stage para nexus
franolave7 Nov 19, 2022
f8def1b
Se agrega stage para nexus
franolave7 Nov 19, 2022
b3138bf
nexus
franolave7 Nov 19, 2022
f0e1986
Cambios Nexus
franolave7 Nov 22, 2022
601e35d
Cambios Nexus
franolave7 Nov 22, 2022
53177ec
Cambios Nexus
franolave7 Nov 22, 2022
96bddf6
Cambios Nexus
franolave7 Nov 22, 2022
0411fed
Cambios Nexus
franolave7 Nov 22, 2022
3722cb7
add app version in file name
Bfal10 Nov 22, 2022
53e4580
update name of the jar
Bfal10 Nov 22, 2022
d559261
Modificacion de PATH
Nov 22, 2022
0b410af
app version by parameter
Bfal10 Nov 22, 2022
ce9c81f
test new version step
Bfal10 Nov 22, 2022
a4988eb
test new version step
Bfal10 Nov 22, 2022
d885f9d
test new version step
Bfal10 Nov 22, 2022
2604d76
test new version step
Bfal10 Nov 22, 2022
1719c52
test new version step
Bfal10 Nov 22, 2022
9401c09
test new version step
Bfal10 Nov 22, 2022
3241654
test new version step
Bfal10 Nov 22, 2022
93ac6b8
test new version step
Bfal10 Nov 22, 2022
16fb491
test new version step
Bfal10 Nov 22, 2022
7045418
test new version step
Bfal10 Nov 22, 2022
17ffb6b
test new version step
Bfal10 Nov 22, 2022
cc53074
test new version step
Bfal10 Nov 22, 2022
e524892
test new version step
Bfal10 Nov 22, 2022
b820295
test new version step
Bfal10 Nov 22, 2022
d8f3171
test new version step
Bfal10 Nov 22, 2022
64494cc
test new version step
Bfal10 Nov 22, 2022
3142a12
test new version step
Bfal10 Nov 22, 2022
8b4337f
test new version step
Bfal10 Nov 22, 2022
9b0f1f2
test new version step
Bfal10 Nov 22, 2022
8cea463
pushing version
Bfal10 Nov 22, 2022
7f56c32
test new version step
Bfal10 Nov 22, 2022
be74d80
Merge branch 'feature/versioning' of https://github.com/g3-usach-2022…
Bfal10 Nov 22, 2022
46553bd
test new version step
Bfal10 Nov 22, 2022
40c84aa
pushing version
Bfal10 Nov 22, 2022
002c6b6
test new version step
Bfal10 Nov 22, 2022
24dea90
Merge branch 'feature/versioning' of https://github.com/g3-usach-2022…
Bfal10 Nov 22, 2022
14fe078
pushing version
Bfal10 Nov 22, 2022
81af41b
test new version step
Bfal10 Nov 22, 2022
deb1089
Merge branch 'feature/versioning' of https://github.com/g3-usach-2022…
Bfal10 Nov 22, 2022
09873fb
pushing version
Bfal10 Nov 22, 2022
580ddf1
test new version step
Bfal10 Nov 22, 2022
4dd81ab
Merge branch 'feature/versioning' of https://github.com/g3-usach-2022…
Bfal10 Nov 22, 2022
9d79839
test new version step
Bfal10 Nov 22, 2022
657bb42
Merge pull request #12 from g3-usach-2022/feature/versioning
Bfal10 Nov 22, 2022
fa1c2be
pushing version
Bfal10 Nov 22, 2022
f49ebeb
pushing version
Bfal10 Nov 22, 2022
dafb280
pushing version
Bfal10 Nov 22, 2022
b6f7329
pushing version
Bfal10 Nov 22, 2022
40d8aed
Update Jenkinsfile
Bfal10 Nov 22, 2022
8b31af4
pushing version
Bfal10 Nov 22, 2022
d29ba2d
update script to get version
Bfal10 Nov 22, 2022
015ba47
pushing version
Bfal10 Nov 22, 2022
7efe6b5
file path
Bfal10 Nov 22, 2022
e6479a8
pushing version
Bfal10 Nov 22, 2022
c725b7a
falla controlada slack
franolave7 Nov 23, 2022
455f7b8
pushing version
Bfal10 Nov 23, 2022
e257571
falla controlada slack
franolave7 Nov 23, 2022
d5fbf99
Merge branch 'release/despliegue-continuo' of https://github.com/g3-u…
franolave7 Nov 23, 2022
bece90d
pushing version
Bfal10 Nov 23, 2022
6e8531e
falla controlada slack
franolave7 Nov 23, 2022
d274320
Merge branch 'release/despliegue-continuo' of https://github.com/g3-u…
franolave7 Nov 23, 2022
6d05d93
falla controlada slack
franolave7 Nov 23, 2022
41fc976
falla controlada slack
franolave7 Nov 23, 2022
c5cabe6
falla controlada slack
franolave7 Nov 23, 2022
17969cf
falla controlada slack
franolave7 Nov 23, 2022
e6308a8
pushing version
Bfal10 Nov 23, 2022
ccfc119
Pipeline terminado
franolave7 Nov 23, 2022
b4d8c2c
Merge pull request #13 from g3-usach-2022/rama-paralela
cyrse93 Nov 23, 2022
504917c
pushing version
Bfal10 Nov 23, 2022
0e5c8a4
Profe un 7
franolave7 Nov 23, 2022
d4eae9e
Merge branch 'release/despliegue-continuo' of https://github.com/g3-u…
franolave7 Nov 23, 2022
1f1ab19
pushing version
Bfal10 Nov 23, 2022
81e14d7
pushing version
Bfal10 Nov 23, 2022
bb6517c
Merge branch 'release/despliegue-continuo'
franolave7 Nov 23, 2022
3e505f1
Final Merge tag 'despliegue-continuo' into develop
franolave7 Nov 23, 2022
60eb45a
pushing version
Bfal10 Nov 23, 2022
6fb6f34
pushing version
Bfal10 Nov 23, 2022
3fd3a63
pushing version
Bfal10 Dec 10, 2022
007895c
pushing version
Bfal10 Dec 10, 2022
c351bd5
pushing version
Bfal10 Dec 10, 2022
103cbdd
pushing version
Bfal10 Dec 10, 2022
67562be
pushing version
Bfal10 Dec 10, 2022
d13c529
pushing version
Bfal10 Dec 10, 2022
145d2d9
pushing version
Bfal10 Dec 10, 2022
65b8653
add endpoint estadoMundial
Bfal10 Dec 10, 2022
a02899d
pushing version
Bfal10 Dec 10, 2022
29ebccb
change url api covid
Bfal10 Dec 10, 2022
0b68ac8
change url api covid
Bfal10 Dec 10, 2022
e431809
add api calls
Bfal10 Dec 10, 2022
c6a9ced
add api calls
Bfal10 Dec 10, 2022
446ad0a
pushing version
Bfal10 Dec 10, 2022
6e3aeaf
add api calls
Bfal10 Dec 10, 2022
cb31814
Merge branch 'feature/api-mundial' of https://github.com/g3-usach-202…
Bfal10 Dec 10, 2022
d0ff602
pushing version
Bfal10 Dec 10, 2022
11477cf
add test artifact
Bfal10 Dec 12, 2022
93034a2
add test artifact
Bfal10 Dec 12, 2022
6b12c32
add test artifact
Bfal10 Dec 12, 2022
5e80693
add test artifact
Bfal10 Dec 12, 2022
ec0fd2d
Merge pull request #14 from g3-usach-2022/feature/api-mundial-b
Bfal10 Dec 12, 2022
7b316b4
agrega test no junit
jpriverapardo Dec 12, 2022
c1c1f9f
agrega test no junit
jpriverapardo Dec 12, 2022
f69486d
Incopora pruebas unitarias JP
jpriverapardo Dec 16, 2022
8dbc41b
reposition test
Bfal10 Dec 17, 2022
7c8b06f
pushing version
Bfal10 Dec 17, 2022
7ef126c
add test confirmados
Bfal10 Dec 17, 2022
2397cf5
Merge branch 'feature/api-mundial' of https://github.com/g3-usach-202…
Bfal10 Dec 17, 2022
1c0073a
pushing version
Bfal10 Dec 17, 2022
f55a3da
pushing version
Bfal10 Dec 17, 2022
7ccc689
fix mvnw
Bfal10 Dec 17, 2022
b4fe3d5
pushing version
Bfal10 Dec 17, 2022
2104322
pushing version
Bfal10 Dec 17, 2022
287c81f
change credentials nexus
Bfal10 Dec 17, 2022
fc6de92
Merge branch 'feature/api-pais' of https://github.com/g3-usach-2022/m…
Bfal10 Dec 17, 2022
dac896f
1 llamada al servicio para verificar, exceptuando el de conexion
jpriverapardo Dec 17, 2022
c07ca93
pushing version
Bfal10 Dec 17, 2022
5a4d736
pushing version
Bfal10 Dec 17, 2022
6f86b2f
pushing version
Bfal10 Dec 17, 2022
f871890
change pipeline nexus step
Bfal10 Dec 17, 2022
75f9606
pushing version
Bfal10 Dec 17, 2022
2a91c09
change pipeline nexus step
Bfal10 Dec 17, 2022
5735656
pushing version
Bfal10 Dec 17, 2022
9c0077d
Incorpora Test Pais JUNIT
jpriverapardo Dec 17, 2022
ae8183e
Merge branch 'feature/api-pais' of https://github.com/g3-usach-2022/m…
jpriverapardo Dec 17, 2022
ec2d40d
pushing version
Bfal10 Dec 17, 2022
3ff6ec4
change pipeline nexus step
Bfal10 Dec 17, 2022
00a26b2
pushing version
Bfal10 Dec 17, 2022
f79e174
change pipeline nexus step
Bfal10 Dec 17, 2022
ab54e6f
pushing version
Bfal10 Dec 17, 2022
751693c
pushing version
Bfal10 Dec 17, 2022
c084174
change test names
Bfal10 Dec 17, 2022
0075095
pushing version
Bfal10 Dec 17, 2022
cc6d0e6
Test Mundial Api
jpriverapardo Dec 17, 2022
26d952e
Test mundial 2
jpriverapardo Dec 17, 2022
1bb2c51
pushing version
Bfal10 Dec 17, 2022
a50c98e
Merge branch 'develop' into feature/api-pais
Bfal10 Dec 17, 2022
e4e81a4
Merge pull request #15 from g3-usach-2022/feature/api-pais
Bfal10 Dec 17, 2022
2732348
pushing version
Bfal10 Dec 17, 2022
8753a0b
Merge branch 'develop' into feature/api-mundial
Bfal10 Dec 17, 2022
b25f29d
pushing version
Bfal10 Dec 17, 2022
c760786
Merge pull request #16 from g3-usach-2022/feature/api-mundial
Bfal10 Dec 17, 2022
4c701e4
pushing version
Bfal10 Dec 17, 2022
4580fd4
clean jars
Bfal10 Dec 17, 2022
6ac951b
pushing version
Bfal10 Dec 17, 2022
001f85d
pushing version
Bfal10 Dec 17, 2022
cbe001f
pushing version
Bfal10 Dec 17, 2022
5dc92ac
tags 2.0
jpriverapardo Dec 17, 2022
8d859e5
corrige v
jpriverapardo Dec 17, 2022
cfce836
pushing version
Bfal10 Dec 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/java
{
"name": "Java",
"image": "mcr.microsoft.com/devcontainers/java:17",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "true",
"installGradle": "false"
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "java -version",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root",
"customizations": {
"vscode": {
"extensions": [
"vscjava.vscode-java-pack",
"liveyou.junitgenerator",
"marcoLee.testfile-generator-for-junit"
]
}
}
}
24 changes: 12 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
build/
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
build/
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
Binary file added DevOpsUsach2020-1.0.15-lab5.jar
Binary file not shown.
Binary file added DevOpsUsach2020-1.0.16-lab5.jar
Binary file not shown.
36 changes: 18 additions & 18 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Getting Started

### Reference Documentation
For further reference, please consider the following sections:

* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.3.4.RELEASE/maven-plugin/reference/html/)
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.3.4.RELEASE/maven-plugin/reference/html/#build-image)
* [Spring Boot DevTools](https://docs.spring.io/spring-boot/docs/2.3.4.RELEASE/reference/htmlsingle/#using-boot-devtools)
* [Spring Web](https://docs.spring.io/spring-boot/docs/2.3.4.RELEASE/reference/htmlsingle/#boot-features-developing-web-applications)

### Guides
The following guides illustrate how to use some features concretely:

* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/)

# Getting Started
### Reference Documentation
For further reference, please consider the following sections:
* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.3.4.RELEASE/maven-plugin/reference/html/)
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.3.4.RELEASE/maven-plugin/reference/html/#build-image)
* [Spring Boot DevTools](https://docs.spring.io/spring-boot/docs/2.3.4.RELEASE/reference/htmlsingle/#using-boot-devtools)
* [Spring Web](https://docs.spring.io/spring-boot/docs/2.3.4.RELEASE/reference/htmlsingle/#boot-features-developing-web-applications)
### Guides
The following guides illustrate how to use some features concretely:
* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/)
179 changes: 179 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
pipeline {
agent any
environment {
pomVersion = readMavenPom().getVersion()
}
stages {
stage('Versioning and tag'){
steps{
sh './mvnw -B build-helper:parse-version versions:set -DnewVersion=\\${parsedVersion.majorVersion}.\\${parsedVersion.minorVersion}.\\${parsedVersion.nextIncrementalVersion} versions:commit '

script{
env.STAGE='Versioning and tag'
VERSION = readMavenPom().getVersion()
}
withCredentials([usernamePassword(credentialsId: 'Github_acon_token_bfal', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
//config golbal
sh 'git config --global user.name \"jenkins\"'
sh 'git config --global user.email \"b.arancibia.f.l@gmail.com\"'
//commit and push versioning
sh 'git add .'
sh 'git commit -m \"pushing version \${VERSION}\"'
sh "echo ${env.GIT_BRANCH}"
sh "git push https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/g3-usach-2022/ms-iclab.git HEAD:${env.GIT_BRANCH}"
//create tag
sh "git tag ${VERSION}"
//push tag a remoto
sh "git push https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/g3-usach-2022/ms-iclab.git ${VERSION}"
}
}
}

stage('Compile Code') {
steps {
script{
env.STAGE='Compile Code'
sh "./mvnw clean compile -e -DskipTest"
}
}
post{
failure{
slackSend color: 'danger', message: "[Grupo 3] [${env.JOB_NAME}] [${BUILD_TAG}] Ejecucion fallida en stage [${env.STAGE}]"
}
}
}
stage('Test Code') {
steps {
script {
env.STAGE='Test Code'
sh "./mvnw clean test -e"
}
}
post{
failure{
slackSend color: 'danger', message: "[Grupo 3] [${env.JOB_NAME}] [${BUILD_TAG}] Ejecucion fallida en stage [${env.STAGE}]"
}
}
}
stage('Jar Code') {
steps {
script {
env.STAGE='Jar Code'
sh "./mvnw clean package -e -DskipTest"
}
}
post{
failure{
slackSend color: 'danger', message: "[Grupo 3] [${env.JOB_NAME}] [${BUILD_TAG}] Ejecucion fallida en stage [${env.STAGE}]"
}
}
}
stage('Run Jar') {
steps {
script {
env.STAGE='Run Jar'
sh "./mvnw spring-boot:run &"
}
}
post{
failure{
slackSend color: 'danger', message: "[Grupo 3] [${env.JOB_NAME}] [${BUILD_TAG}] Ejecucion fallida en stage [${env.STAGE}]"
}
}
}
stage('Sonar') {
steps {
script {
env.STAGE='Sonar'
}
withSonarQubeEnv('sonarqube') {
sh "echo 'Calling sonar Service in another docker container!'"
sh './mvnw clean verify sonar:sonar -Dsonar.projectKey=grupo-3 -Dsonar.projectName=Grupo3-Lab4'
}
}
post{
failure{
slackSend color: 'danger', message: "[Grupo 3] [${env.JOB_NAME}] [${BUILD_TAG}] Ejecucion fallida en stage [${env.STAGE}]"
}
}
}
stage('Nexus'){
steps {
script{
nPomVersion = readMavenPom().getVersion()
env.STAGE='Nexus'
}
nexusArtifactUploader(
nexusVersion: 'nexus3',
protocol: 'http',
nexusUrl: 'nexus:8081',
groupId: 'Grupo3',
version: "${nPomVersion}",
repository: 'maven-releases-g3',
credentialsId: 'artefactos-admin',
artifacts: [
[artifactId: "DevOpsUsach2020",
classifier: 'lab5',
file: 'build/DevOpsUsach2020-'+ "${nPomVersion}" + '.jar',
type: 'jar']
]
)
}
post{
failure{
slackSend color: 'danger', message: "[Grupo 3] [${env.JOB_NAME}] [${BUILD_TAG}] Ejecucion fallida en stage [${env.STAGE}]"
}
}
}
stage("Download Artifact Nexus"){

steps {
script{
nPomVersion = readMavenPom().getVersion()
}
withCredentials([usernamePassword(credentialsId: 'artefactos-admin', passwordVariable: 'NXS_PASSWORD', usernameVariable: 'NXS_USERNAME')]) {
sh ' curl -X GET -u $NXS_USERNAME:$NXS_PASSWORD "http://nexus:8081/repository/maven-releases-g3/Grupo3/DevOpsUsach2020/'+"${nPomVersion}"+'/DevOpsUsach2020-'+"${nPomVersion}"+'-lab5.jar" -O'
}
}
}
stage("Run Artifact in Jenkins"){
steps {
script{
nPomVersion = readMavenPom().getVersion()
}
script{
sh 'nohup java -jar DevOpsUsach2020-'+"${nPomVersion}"+'-lab5.jar & >/dev/null'
}
}
}
stage("Testear Artefacto - Dormir(Esperar 20sg) "){
steps {
script{
sh "sleep 20 && newman run my-sclab-test.postman_collection.json"
}
}
}
stage("Detener Atefacto jar en Jenkins server"){
steps {
sh '''
echo 'Process Java .jar: ' $(pidof java | awk '{print $1}')
sleep 20
kill -9 $(pidof java | awk '{print $1}')
'''
}
}
}

post {
always {
slackSend color: '#ADD8E6', message: "[Grupo 3] - [Resultado: Always] - [Profe un 7 plz]- (<${env.BUILD_URL}|Open>)"
}
success {
slackSend color: 'good', message: "[Grupo 3][Pipeline CI/CD][Rama: ${env.JOB_NAME}][Stage: ${env.BUILD_NUMBER}][Resultado: Success]- (<${env.BUILD_URL}|Open>)"
}
failure {
slackSend color: 'danger', message:"[Grupo 3][Pipeline CI/CD][Rama: ${env.JOB_NAME}][Stage: ${env.BUILD_NUMBER}][Resultado: Failed]- (<${env.BUILD_URL}|Open>)"
}
}

}
92 changes: 46 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
# Getting Started

## Windows

### Compile Code
* ./mvnw.cmd clean compile -e

### Test Code
* ./mvnw.cmd clean test -e

### Jar Code
* ./mvnw.cmd clean package -e

### Run Jar
* Local: ./mvnw.cmd spring-boot:run
* Background: nohup bash mvnw.cmd spring-boot:run &

### Testing Application
* Abrir navegador: http://localhost:8080/rest/mscovid/test?msg=testing

## Linux

### Compile Code
* ./mvnw clean compile -e

### Test Code
* ./mvnw clean test -e

### Jar Code
* ./mvnw clean package -e

### Run Jar
* Local: ./mvnw spring-boot:run
* Background: nohup bash mvnw spring-boot:run &

### Testing Application
* curl -X GET 'http://localhost:8080/rest/mscovid/test?msg=testing'


# Jenkins Shared Libraries
- Jenkins Shared Libraries: https://www.jenkins.io/doc/book/pipeline/shared-libraries/

# Uso
- Agregar archivo **_Jenkinsfile_** en la raíz de la rama del proyecto a procesar (sólo como pivote al código del pipeline).
- Registrar Pipeline en **_Jenkins -> Administrar Jenkins -> Configuración Global -> Global Pipeline Libraries_** bajo el nombre **_pipeline_**
- Configurar _Multibranch Pipeline Job_ o _Pipeline Job_ en Jenkins con el repositorio del proyecto a procesar.
# Getting Started
## Windows
### Compile Code
* ./mvnw.cmd clean compile -e
### Test Code
* ./mvnw.cmd clean test -e
### Jar Code
* ./mvnw.cmd clean package -e
### Run Jar
* Local: ./mvnw.cmd spring-boot:run
* Background: nohup bash mvnw.cmd spring-boot:run &
### Testing Application
* Abrir navegador: http://localhost:8080/rest/mscovid/test?msg=testing
## Linux
### Compile Code
* ./mvnw clean compile -e
### Test Code
* ./mvnw clean test -e
### Jar Code
* ./mvnw clean package -e
### Run Jar
* Local: ./mvnw spring-boot:run
* Background: nohup bash mvnw spring-boot:run &
### Testing Application
* curl -X GET 'http://localhost:8080/rest/mscovid/test?msg=testing'
# Jenkins Shared Libraries
- Jenkins Shared Libraries: https://www.jenkins.io/doc/book/pipeline/shared-libraries/
# Uso
- Agregar archivo **_Jenkinsfile_** en la raíz de la rama del proyecto a procesar (sólo como pivote al código del pipeline).
- Registrar Pipeline en **_Jenkins -> Administrar Jenkins -> Configuración Global -> Global Pipeline Libraries_** bajo el nombre **_pipeline_**
- Configurar _Multibranch Pipeline Job_ o _Pipeline Job_ en Jenkins con el repositorio del proyecto a procesar.
Loading