From b83a0876b4bce53d58de900433b446109e1588b6 Mon Sep 17 00:00:00 2001 From: Alex Baptista Date: Tue, 28 Nov 2017 19:31:35 -0200 Subject: [PATCH 01/15] Add initial jenkinsfile --- Jenkinsfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..ff005bfeb --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,18 @@ +node('Slave_AWS'){ + stage('Checkout') + { + git 'https://github.com/spring-projects/spring-petclinic.git' + } + stage('Build') + { + sh 'docker run --rm --name build_maven -v $(pwd):/app docker.io/maven:alpine bash -c "cd app;mvn clean install"' + } + stage('Unit Test') + { + junit 'target/surefire-reports/*.xml' + } + stage('Archive artifact') + { + archiveArtifacts 'target/spring-petclinic-1.5.1.jar' + } +} From 4fc50c482f134a140cd3fc57cdbc9261f8e912ee Mon Sep 17 00:00:00 2001 From: Alex Baptista Date: Fri, 1 Dec 2017 19:51:30 -0200 Subject: [PATCH 02/15] include sonarqube step --- Jenkinsfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ff005bfeb..39a7f9b0c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,12 +5,16 @@ node('Slave_AWS'){ } stage('Build') { - sh 'docker run --rm --name build_maven -v $(pwd):/app docker.io/maven:alpine bash -c "cd app;mvn clean install"' + //sh 'docker run --rm --name build_maven -v $(pwd):/app docker.io/maven:alpine bash -c "cd app;mvn clean install"' } stage('Unit Test') { junit 'target/surefire-reports/*.xml' } + stage('Sonarqube') + { + docker run --rm --name maven -v $(pwd):/app docker.io/maven:alpine bash -c "cd app; mvn clean install cobertura:cobertura -Dcobertura.report.format=xml sonar:sonar -Dsonar.host.url=http://34.205.24.188:9000" + } stage('Archive artifact') { archiveArtifacts 'target/spring-petclinic-1.5.1.jar' From e477a3c299b3d84f0e2b77b63bd9d3e3797b16d2 Mon Sep 17 00:00:00 2001 From: Alex Baptista Date: Fri, 1 Dec 2017 19:52:52 -0200 Subject: [PATCH 03/15] include sonarqube step - FIX --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 39a7f9b0c..043d0f83b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ node('Slave_AWS'){ } stage('Sonarqube') { - docker run --rm --name maven -v $(pwd):/app docker.io/maven:alpine bash -c "cd app; mvn clean install cobertura:cobertura -Dcobertura.report.format=xml sonar:sonar -Dsonar.host.url=http://34.205.24.188:9000" + sh 'docker run --rm --name maven -v $(pwd):/app docker.io/maven:alpine bash -c "cd app; mvn clean install cobertura:cobertura -Dcobertura.report.format=xml sonar:sonar -Dsonar.host.url=http://34.205.24.188:9000"' } stage('Archive artifact') { From 6caa8de16ee698c16938eb92ccfa1d20fddd32ca Mon Sep 17 00:00:00 2001 From: Alex Baptista Date: Fri, 1 Dec 2017 19:53:32 -0200 Subject: [PATCH 04/15] include sonarqube step - FIX - JUNIT --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 043d0f83b..82932750b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,14 +7,14 @@ node('Slave_AWS'){ { //sh 'docker run --rm --name build_maven -v $(pwd):/app docker.io/maven:alpine bash -c "cd app;mvn clean install"' } - stage('Unit Test') - { - junit 'target/surefire-reports/*.xml' - } stage('Sonarqube') { sh 'docker run --rm --name maven -v $(pwd):/app docker.io/maven:alpine bash -c "cd app; mvn clean install cobertura:cobertura -Dcobertura.report.format=xml sonar:sonar -Dsonar.host.url=http://34.205.24.188:9000"' } + stage('Unit Test') + { + junit 'target/surefire-reports/*.xml' + } stage('Archive artifact') { archiveArtifacts 'target/spring-petclinic-1.5.1.jar' From 127cb86af73318b00724e86730f61a3c183eb3d2 Mon Sep 17 00:00:00 2001 From: Alex Baptista Date: Sun, 25 Feb 2018 19:24:01 -0300 Subject: [PATCH 05/15] Adicionando Dockerfile --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..f18fe45a0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM java:8 +WORKDIR / +ADD target/spring-petclinic-2.0.0.BUILD-SNAPSHOT.jar . +EXPOSE 8080 +CMD java - jar spring-petclinic-2.0.0.BUILD-SNAPSHOT.jar \ No newline at end of file From 7a86dbd7fa64f139e8850e6daafe929a507c101a Mon Sep 17 00:00:00 2001 From: Alex Baptista Date: Sun, 25 Feb 2018 19:29:47 -0300 Subject: [PATCH 06/15] FIX Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f18fe45a0..12b4ccee0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM java:8 WORKDIR / -ADD target/spring-petclinic-2.0.0.BUILD-SNAPSHOT.jar . +ADD target/spring-petclinic-1.5.1.jar . EXPOSE 8080 -CMD java - jar spring-petclinic-2.0.0.BUILD-SNAPSHOT.jar \ No newline at end of file +CMD java - jar spring-petclinic-1.5.1.jar \ No newline at end of file From 181b5e3ee72ac9fbca1573817a5edcd409c668da Mon Sep 17 00:00:00 2001 From: Alex Baptista Date: Sun, 25 Feb 2018 21:28:29 -0300 Subject: [PATCH 07/15] Ajustes para build com openshift --- Dockerfile | 4 ++-- openshift.build | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 openshift.build diff --git a/Dockerfile b/Dockerfile index 12b4ccee0..54b3afc84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -FROM java:8 +FROM docker.io/maven:latest WORKDIR / ADD target/spring-petclinic-1.5.1.jar . EXPOSE 8080 -CMD java - jar spring-petclinic-1.5.1.jar \ No newline at end of file +CMD java -jar spring-petclinic-1.5.1.jar \ No newline at end of file diff --git a/openshift.build b/openshift.build new file mode 100644 index 000000000..6b13ce6d9 --- /dev/null +++ b/openshift.build @@ -0,0 +1,22 @@ +- apiVersion: v1 + kind: BuildConfig + metadata: + annotations: + description: Define como empacotar o APP + name: petclinic-docker + spec: + output: + to: + kind: ImageStreamTag + name: petclinic-docker:latest + source: + type: Binary + strategy: + dockerStrategy: + dockerfilePath: Dockerfile +- apiVersion: v1 + kind: ImageStream + metadata: + annotations: + description: Acompanha as mudanças na imagem do aplicativo + name: petclinic-docker \ No newline at end of file From 2b52f042be8b5584beb20744d86743139b1e6301 Mon Sep 17 00:00:00 2001 From: Alex Baptista Date: Sun, 25 Feb 2018 22:26:10 -0300 Subject: [PATCH 08/15] =?UTF-8?q?publicando=20vers=C3=A3o=20funcional=20op?= =?UTF-8?q?enshift=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 5 - Jenkinsfile | 22 --- openshift.build | 22 --- openshift/petclinic-web-app.yaml | 237 +++++++++++++++++++++++++++++++ 4 files changed, 237 insertions(+), 49 deletions(-) delete mode 100644 Dockerfile delete mode 100644 Jenkinsfile delete mode 100644 openshift.build create mode 100644 openshift/petclinic-web-app.yaml diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 54b3afc84..000000000 --- a/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM docker.io/maven:latest -WORKDIR / -ADD target/spring-petclinic-1.5.1.jar . -EXPOSE 8080 -CMD java -jar spring-petclinic-1.5.1.jar \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 82932750b..000000000 --- a/Jenkinsfile +++ /dev/null @@ -1,22 +0,0 @@ -node('Slave_AWS'){ - stage('Checkout') - { - git 'https://github.com/spring-projects/spring-petclinic.git' - } - stage('Build') - { - //sh 'docker run --rm --name build_maven -v $(pwd):/app docker.io/maven:alpine bash -c "cd app;mvn clean install"' - } - stage('Sonarqube') - { - sh 'docker run --rm --name maven -v $(pwd):/app docker.io/maven:alpine bash -c "cd app; mvn clean install cobertura:cobertura -Dcobertura.report.format=xml sonar:sonar -Dsonar.host.url=http://34.205.24.188:9000"' - } - stage('Unit Test') - { - junit 'target/surefire-reports/*.xml' - } - stage('Archive artifact') - { - archiveArtifacts 'target/spring-petclinic-1.5.1.jar' - } -} diff --git a/openshift.build b/openshift.build deleted file mode 100644 index 6b13ce6d9..000000000 --- a/openshift.build +++ /dev/null @@ -1,22 +0,0 @@ -- apiVersion: v1 - kind: BuildConfig - metadata: - annotations: - description: Define como empacotar o APP - name: petclinic-docker - spec: - output: - to: - kind: ImageStreamTag - name: petclinic-docker:latest - source: - type: Binary - strategy: - dockerStrategy: - dockerfilePath: Dockerfile -- apiVersion: v1 - kind: ImageStream - metadata: - annotations: - description: Acompanha as mudanças na imagem do aplicativo - name: petclinic-docker \ No newline at end of file diff --git a/openshift/petclinic-web-app.yaml b/openshift/petclinic-web-app.yaml new file mode 100644 index 000000000..2b9b953ae --- /dev/null +++ b/openshift/petclinic-web-app.yaml @@ -0,0 +1,237 @@ +apiVersion: v1 +kind: Template +metadata: + name: petclinic-web-app +parameters: +- name: APP_NAME + description: The name assigned to all of the application objects defined in this template. + displayName: Application Name + required: true + value: petclinic-web-app +- name: GIT_SOURCE_URL + description: The source URL for the application + displayName: Source URL + required: true + value: https://github.com/alexbaptista/spring-petclinic.git +- name: GIT_SOURCE_REF + description: The source Ref for the application + displayName: Source Ref + required: true + value: master +- description: Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted. + displayName: GitHub Webhook Secret + from: '[a-zA-Z0-9]{40}' + generate: expression + name: GITHUB_WEBHOOK_SECRET + required: true +- description: A secret string used to configure the Generic webhook. + displayName: Generic Webhook Secret + from: '[a-zA-Z0-9]{40}' + generate: expression + name: GENERIC_WEBHOOK_SECRET + required: true +objects: +- apiVersion: v1 + kind: ImageStream + metadata: + labels: + app: ${APP_NAME} + name: ${APP_NAME} + spec: {} + status: + dockerImageRepository: "" +- apiVersion: v1 + kind: BuildConfig + metadata: + annotations: + pipeline.alpha.openshift.io/uses: '[{"name": "${NAME}", "namespace": "", "kind": "DeploymentConfig"}]' + creationTimestamp: null + labels: + name: ${APP_NAME}-pipeline + name: ${APP_NAME}-pipeline + spec: + strategy: + jenkinsPipelineStrategy: + jenkinsfile: |- + try { + timeout(time: 20, unit: 'MINUTES') { + def appName="${APP_NAME}" + def project="" + + node { + stage("Initialize") { + project = env.PROJECT_NAME + } + } + + node("maven") { + stage("Checkout") { + git url: "${GIT_SOURCE_URL}", branch: "${GIT_SOURCE_REF}" + } + stage("Build JAR") { + sh "mvn clean install" + stash name:"jar", includes:"target/spring-petclinic-1.5.1.jar" + } + } + + node { + stage("Build Image") { + unstash name:"jar" + sh "oc start-build ${appName}-docker --from-file=target/spring-petclinic-1.5.1.jar -n ${project}" + openshiftVerifyBuild bldCfg: "${appName}-docker", namespace: project, waitTime: '20', waitUnit: 'min' + } + stage("Deploy") { + openshiftDeploy deploymentConfig: appName, namespace: project + } + } + } + } catch (err) { + echo "in catch block" + echo "Caught: ${err}" + currentBuild.result = 'FAILURE' + throw err + } + type: JenkinsPipeline + triggers: + - github: + secret: "${GITHUB_WEBHOOK_SECRET}" + type: GitHub + - generic: + secret: "${GENERIC_WEBHOOK_SECRET}" + type: Generic +- apiVersion: v1 + kind: BuildConfig + metadata: + labels: + app: ${APP_NAME}-docker + name: ${APP_NAME}-docker + spec: + output: + to: + kind: ImageStreamTag + name: ${APP_NAME}:latest + postCommit: {} + resources: {} + runPolicy: Serial + source: + dockerfile: |- + FROM docker.io/maven:alpine + WORKDIR / + ADD spring-petclinic-1.5.1.jar . + EXPOSE 8080 + CMD java -jar spring-petclinic-1.5.1.jar + binary: + asFile: spring-petclinic-1.5.1.jar + type: Docker + strategy: + dockerStrategy: + from: + kind: DockerImage + name: docker.io/maven:alpine + type: Docker + triggers: [] +- apiVersion: v1 + kind: DeploymentConfig + metadata: + labels: + app: ${APP_NAME} + name: ${APP_NAME} + spec: + replicas: 1 + selector: + app: ${APP_NAME} + deploymentconfig: ${APP_NAME} + strategy: + rollingParams: + intervalSeconds: 1 + maxSurge: 25% + maxUnavailable: 25% + timeoutSeconds: 600 + updatePeriodSeconds: 1 + type: Rolling + template: + metadata: + labels: + app: ${APP_NAME} + deploymentconfig: ${APP_NAME} + spec: + containers: + - image: ${APP_NAME}:latest + imagePullPolicy: Always + name: ${APP_NAME} + ports: + - containerPort: 8080 + protocol: TCP + resources: {} + terminationMessagePath: /dev/termination-log + livenessProbe: + httpGet: + path: / + port: 8080 + scheme: HTTP + initialDelaySeconds: 10 + timeoutSeconds: 2 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: / + port: 8080 + scheme: HTTP + initialDelaySeconds: 30 + timeoutSeconds: 2 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + dnsPolicy: ClusterFirst + restartPolicy: Always + securityContext: {} + terminationGracePeriodSeconds: 30 + test: false + triggers: + - type: ConfigChange + - imageChangeParams: + automatic: true + containerNames: + - ${APP_NAME} + from: + kind: ImageStreamTag + name: ${APP_NAME}:latest + type: ImageChange + status: {} +- apiVersion: v1 + kind: Service + metadata: + annotations: + openshift.io/generated-by: OpenShiftNewApp + labels: + app: ${APP_NAME} + name: ${APP_NAME} + spec: + ports: + - name: 8080-tcp + port: 8080 + protocol: TCP + targetPort: 8080 + selector: + app: ${APP_NAME} + deploymentconfig: ${APP_NAME} + sessionAffinity: None + type: ClusterIP + status: + loadBalancer: {} +- apiVersion: v1 + kind: Route + metadata: + name: ${APP_NAME} + labels: + app: ${APP_NAME} + spec: + to: + kind: Service + name: ${APP_NAME} + weight: 100 + port: + targetPort: 8080-tcp + wildcardPolicy: None \ No newline at end of file From 8fb68d50c3d12234eaa8320ae5390ca0b3fe434c Mon Sep 17 00:00:00 2001 From: Alex Baptista Date: Tue, 27 Feb 2018 22:15:50 -0300 Subject: [PATCH 09/15] Adicionando metada no template --- openshift/petclinic-web-app.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openshift/petclinic-web-app.yaml b/openshift/petclinic-web-app.yaml index 2b9b953ae..6acf47e94 100644 --- a/openshift/petclinic-web-app.yaml +++ b/openshift/petclinic-web-app.yaml @@ -1,6 +1,12 @@ apiVersion: v1 kind: Template metadata: + annotations: + openshift.io/display-name: PetClinic Web App + description: |- + Continuous Integration | Build | Package | Deploy + iconClass: icon-spring + tags: petclinic-web-app,java name: petclinic-web-app parameters: - name: APP_NAME From 20fd117b1ed27dd3df362d7837627048ea5b5984 Mon Sep 17 00:00:00 2001 From: Alex Baptista Date: Wed, 28 Feb 2018 08:26:48 -0300 Subject: [PATCH 10/15] =?UTF-8?q?Ajuste=20para=20exibi=C3=A7=C3=A3o=20da?= =?UTF-8?q?=20pipeline=20no=20fluxo=20principal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openshift/petclinic-web-app.yaml | 89 +++++++++++++++----------------- 1 file changed, 43 insertions(+), 46 deletions(-) diff --git a/openshift/petclinic-web-app.yaml b/openshift/petclinic-web-app.yaml index 6acf47e94..1599ea031 100644 --- a/openshift/petclinic-web-app.yaml +++ b/openshift/petclinic-web-app.yaml @@ -1,5 +1,9 @@ apiVersion: v1 kind: Template +labels: + template: petclinic-web-app +message: |- + Template de exemplo para a Talk DevOps metadata: annotations: openshift.io/display-name: PetClinic Web App @@ -14,6 +18,9 @@ parameters: displayName: Application Name required: true value: petclinic-web-app +- name: APPLICATION_DOMAIN + description: Application URL + displayName: Application URL - name: GIT_SOURCE_URL description: The source URL for the application displayName: Source URL @@ -37,20 +44,11 @@ parameters: name: GENERIC_WEBHOOK_SECRET required: true objects: -- apiVersion: v1 - kind: ImageStream - metadata: - labels: - app: ${APP_NAME} - name: ${APP_NAME} - spec: {} - status: - dockerImageRepository: "" - apiVersion: v1 kind: BuildConfig metadata: annotations: - pipeline.alpha.openshift.io/uses: '[{"name": "${NAME}", "namespace": "", "kind": "DeploymentConfig"}]' + pipeline.alpha.openshift.io/uses: '[{"name": "${APP_NAME}", "namespace": "", "kind": "DeploymentConfig"}]' creationTimestamp: null labels: name: ${APP_NAME}-pipeline @@ -105,6 +103,40 @@ objects: - generic: secret: "${GENERIC_WEBHOOK_SECRET}" type: Generic +- apiVersion: v1 + kind: Service + metadata: + name: ${APP_NAME} + spec: + ports: + - name: web + protocol: TCP + port: 8080 + targetPort: 8080 + selector: + name: ${APP_NAME} + deploymentconfig: ${APP_NAME} +- apiVersion: v1 + kind: Route + metadata: + name: ${APP_NAME} + labels: + app: ${APP_NAME} + spec: + host: ${APPLICATION_DOMAIN} + to: + kind: Service + name: ${APP_NAME} + port: + targetPort: web +- apiVersion: v1 + kind: ImageStream + metadata: + annotations: + description: Docker images hub + labels: + app: ${APP_NAME} + name: ${APP_NAME} - apiVersion: v1 kind: BuildConfig metadata: @@ -205,39 +237,4 @@ objects: kind: ImageStreamTag name: ${APP_NAME}:latest type: ImageChange - status: {} -- apiVersion: v1 - kind: Service - metadata: - annotations: - openshift.io/generated-by: OpenShiftNewApp - labels: - app: ${APP_NAME} - name: ${APP_NAME} - spec: - ports: - - name: 8080-tcp - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - app: ${APP_NAME} - deploymentconfig: ${APP_NAME} - sessionAffinity: None - type: ClusterIP - status: - loadBalancer: {} -- apiVersion: v1 - kind: Route - metadata: - name: ${APP_NAME} - labels: - app: ${APP_NAME} - spec: - to: - kind: Service - name: ${APP_NAME} - weight: 100 - port: - targetPort: 8080-tcp - wildcardPolicy: None \ No newline at end of file + - type: ConfigChange \ No newline at end of file From 9d74285758332bd67614423175ebcdd81754fc7f Mon Sep 17 00:00:00 2001 From: Alex Baptista Date: Wed, 28 Feb 2018 12:59:58 -0300 Subject: [PATCH 11/15] Ajuste para exibir rota --- openshift/petclinic-web-app.yaml | 90 ++++++++++++-------------------- 1 file changed, 34 insertions(+), 56 deletions(-) diff --git a/openshift/petclinic-web-app.yaml b/openshift/petclinic-web-app.yaml index 1599ea031..4917011a1 100644 --- a/openshift/petclinic-web-app.yaml +++ b/openshift/petclinic-web-app.yaml @@ -13,43 +13,44 @@ metadata: tags: petclinic-web-app,java name: petclinic-web-app parameters: -- name: APP_NAME - description: The name assigned to all of the application objects defined in this template. +- description: The name assigned to all of the application objects defined in this template. displayName: Application Name + name: APP_NAME required: true value: petclinic-web-app -- name: APPLICATION_DOMAIN - description: Application URL - displayName: Application URL -- name: GIT_SOURCE_URL - description: The source URL for the application +- description: The source URL for the application displayName: Source URL + name: GIT_SOURCE_URL required: true value: https://github.com/alexbaptista/spring-petclinic.git -- name: GIT_SOURCE_REF - description: The source Ref for the application +- description: The source Ref for the application displayName: Source Ref + name: GIT_SOURCE_REF required: true value: master - description: Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted. displayName: GitHub Webhook Secret + name: GITHUB_WEBHOOK_SECRET from: '[a-zA-Z0-9]{40}' generate: expression - name: GITHUB_WEBHOOK_SECRET required: true - description: A secret string used to configure the Generic webhook. displayName: Generic Webhook Secret + name: GENERIC_WEBHOOK_SECRET from: '[a-zA-Z0-9]{40}' generate: expression - name: GENERIC_WEBHOOK_SECRET required: true +- description: OpenShift Namespace + displayName: Namespace + name: NAMESPACE + required: true + value: talkdevops-step2 objects: - apiVersion: v1 kind: BuildConfig metadata: annotations: pipeline.alpha.openshift.io/uses: '[{"name": "${APP_NAME}", "namespace": "", "kind": "DeploymentConfig"}]' - creationTimestamp: null labels: name: ${APP_NAME}-pipeline name: ${APP_NAME}-pipeline @@ -61,13 +62,11 @@ objects: timeout(time: 20, unit: 'MINUTES') { def appName="${APP_NAME}" def project="" - node { stage("Initialize") { project = env.PROJECT_NAME } } - node("maven") { stage("Checkout") { git url: "${GIT_SOURCE_URL}", branch: "${GIT_SOURCE_REF}" @@ -77,7 +76,6 @@ objects: stash name:"jar", includes:"target/spring-petclinic-1.5.1.jar" } } - node { stage("Build Image") { unstash name:"jar" @@ -115,42 +113,33 @@ objects: targetPort: 8080 selector: name: ${APP_NAME} - deploymentconfig: ${APP_NAME} - apiVersion: v1 kind: Route metadata: name: ${APP_NAME} - labels: - app: ${APP_NAME} spec: - host: ${APPLICATION_DOMAIN} + port: + targetPort: web to: kind: Service name: ${APP_NAME} - port: - targetPort: web - apiVersion: v1 kind: ImageStream metadata: annotations: description: Docker images hub - labels: - app: ${APP_NAME} name: ${APP_NAME} - apiVersion: v1 kind: BuildConfig metadata: - labels: - app: ${APP_NAME}-docker + annotations: + description: Define como criar o aplicativo name: ${APP_NAME}-docker spec: output: to: kind: ImageStreamTag name: ${APP_NAME}:latest - postCommit: {} - resources: {} - runPolicy: Serial source: dockerfile: |- FROM docker.io/maven:alpine @@ -171,14 +160,13 @@ objects: - apiVersion: v1 kind: DeploymentConfig metadata: - labels: - app: ${APP_NAME} + annotations: + description: Define como é realizada a implantação do APP name: ${APP_NAME} spec: replicas: 1 selector: - app: ${APP_NAME} - deploymentconfig: ${APP_NAME} + name: ${APP_NAME} strategy: rollingParams: intervalSeconds: 1 @@ -190,8 +178,8 @@ objects: template: metadata: labels: - app: ${APP_NAME} - deploymentconfig: ${APP_NAME} + name: ${APP_NAME} + name: ${APP_NAME} spec: containers: - image: ${APP_NAME}:latest @@ -200,8 +188,6 @@ objects: ports: - containerPort: 8080 protocol: TCP - resources: {} - terminationMessagePath: /dev/termination-log livenessProbe: httpGet: path: / @@ -210,8 +196,6 @@ objects: initialDelaySeconds: 10 timeoutSeconds: 2 periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 readinessProbe: httpGet: path: / @@ -220,21 +204,15 @@ objects: initialDelaySeconds: 30 timeoutSeconds: 2 periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - dnsPolicy: ClusterFirst - restartPolicy: Always - securityContext: {} - terminationGracePeriodSeconds: 30 - test: false - triggers: - - type: ConfigChange - - imageChangeParams: - automatic: true - containerNames: - - ${APP_NAME} - from: - kind: ImageStreamTag - name: ${APP_NAME}:latest - type: ImageChange - - type: ConfigChange \ No newline at end of file + triggers: + - type: ConfigChange + - imageChangeParams: + automatic: true + containerNames: + - ${APP_NAME} + from: + kind: ImageStreamTag + name: '${APP_NAME}:latest' + namespace: ${NAMESPACE} + type: ImageChange + - type: ConfigChange \ No newline at end of file From 362466d43ff10576c5e3702372a50f4e89775615 Mon Sep 17 00:00:00 2001 From: Alex Baptista Date: Wed, 28 Feb 2018 13:08:27 -0300 Subject: [PATCH 12/15] Resolv da imagem --- openshift/petclinic-web-app.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openshift/petclinic-web-app.yaml b/openshift/petclinic-web-app.yaml index 4917011a1..9f3d6ad5a 100644 --- a/openshift/petclinic-web-app.yaml +++ b/openshift/petclinic-web-app.yaml @@ -177,6 +177,8 @@ objects: type: Rolling template: metadata: + annotations: + alpha.image.policy.openshift.io/resolve-names: '*' labels: name: ${APP_NAME} name: ${APP_NAME} From cc32030a42774c5d34709282290a8e16cce7b0ec Mon Sep 17 00:00:00 2001 From: Alex Caio dos Santos Baptista Date: Sun, 1 Apr 2018 21:18:31 -0300 Subject: [PATCH 13/15] Draft create --- .dockerignore | 6 ++ Dockerfile | 6 ++ Jenkinsfile | 90 +++++++++++++++++++ NOTICE | 9 ++ charts/preview/Chart.yaml | 5 ++ charts/preview/Makefile | 22 +++++ charts/preview/requirements.yaml | 13 +++ charts/preview/values.yaml | 22 +++++ charts/spring-petclinic/.helmignore | 21 +++++ charts/spring-petclinic/Chart.yaml | 5 ++ charts/spring-petclinic/Makefile | 48 ++++++++++ charts/spring-petclinic/README.md | 1 + charts/spring-petclinic/templates/NOTES.txt | 4 + .../spring-petclinic/templates/_helpers.tpl | 16 ++++ .../templates/deployment.yaml | 39 ++++++++ .../spring-petclinic/templates/service.yaml | 19 ++++ charts/spring-petclinic/values.yaml | 33 +++++++ openshift/petclinic-web-app.yaml | 3 +- 18 files changed, 360 insertions(+), 2 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 Jenkinsfile create mode 100644 NOTICE create mode 100644 charts/preview/Chart.yaml create mode 100755 charts/preview/Makefile create mode 100755 charts/preview/requirements.yaml create mode 100755 charts/preview/values.yaml create mode 100755 charts/spring-petclinic/.helmignore create mode 100644 charts/spring-petclinic/Chart.yaml create mode 100755 charts/spring-petclinic/Makefile create mode 100755 charts/spring-petclinic/README.md create mode 100755 charts/spring-petclinic/templates/NOTES.txt create mode 100755 charts/spring-petclinic/templates/_helpers.tpl create mode 100755 charts/spring-petclinic/templates/deployment.yaml create mode 100755 charts/spring-petclinic/templates/service.yaml create mode 100755 charts/spring-petclinic/values.yaml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..2d41ec6f0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +Dockerfile +draft.toml +charts/ +NOTICE +LICENSE +README.md \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..edc0d9a80 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM openjdk:8-jdk-alpine +ENV PORT 8080 +EXPOSE 8080 +COPY target/*.jar /opt/app.jar +WORKDIR /opt +CMD ["java", "-jar", "app.jar"] \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..6f03b6062 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,90 @@ +pipeline { + agent { + label "jenkins-maven" + } + environment { + ORG = 'jenkinsx' + APP_NAME = 'spring-petclinic' + GIT_CREDS = credentials('jenkins-x-git') + CHARTMUSEUM_CREDS = credentials('jenkins-x-chartmuseum') + GIT_USERNAME = "$GIT_CREDS_USR" + GIT_API_TOKEN = "$GIT_CREDS_PSW" + } + stages { + stage('CI Build and push snapshot') { + when { + branch 'PR-*' + } + environment { + PREVIEW_VERSION = "0.0.0-SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER" + PREVIEW_NAMESPACE = "$APP_NAME-$BRANCH_NAME".toLowerCase() + HELM_RELEASE = "$PREVIEW_NAMESPACE".toLowerCase() + } + steps { + container('maven') { + sh "mvn versions:set -DnewVersion=$PREVIEW_VERSION" + sh "mvn install" + sh "docker build -t \$JENKINS_X_DOCKER_REGISTRY_SERVICE_HOST:\$JENKINS_X_DOCKER_REGISTRY_SERVICE_PORT/$ORG/$APP_NAME:$PREVIEW_VERSION ." + sh "docker push \$JENKINS_X_DOCKER_REGISTRY_SERVICE_HOST:\$JENKINS_X_DOCKER_REGISTRY_SERVICE_PORT/$ORG/$APP_NAME:$PREVIEW_VERSION" + } + + dir ('./charts/preview') { + container('maven') { + sh "make preview" + sh "jx preview --app $APP_NAME --dir ../.." + } + } + } + } + stage('Build Release') { + when { + branch 'master' + } + steps { + container('maven') { + // ensure we're not on a detached head + sh "git checkout master" + // until we switch to the new kubernetes / jenkins credential implementation use git credentials store + sh "git config --global credential.helper store" + // so we can retrieve the version in later steps + sh "echo \$(jx-release-version) > VERSION" + sh "mvn versions:set -DnewVersion=\$(cat VERSION)" + } + dir ('./charts/spring-petclinic') { + container('maven') { + sh "make tag" + } + } + container('maven') { + sh 'mvn clean deploy' + + sh "docker build -t \$JENKINS_X_DOCKER_REGISTRY_SERVICE_HOST:\$JENKINS_X_DOCKER_REGISTRY_SERVICE_PORT/$ORG/$APP_NAME:\$(cat VERSION) ." + sh "docker push \$JENKINS_X_DOCKER_REGISTRY_SERVICE_HOST:\$JENKINS_X_DOCKER_REGISTRY_SERVICE_PORT/$ORG/$APP_NAME:\$(cat VERSION)" + } + } + } + stage('Promote to Environments') { + when { + branch 'master' + } + steps { + dir ('./charts/spring-petclinic') { + container('maven') { + sh 'jx step changelog --version v\$(cat ../../VERSION)' + + // release the helm chart + sh 'make release' + + // promote through all 'Auto' promotion Environments + sh 'jx promote -b --all-auto --timeout 1h --version \$(cat ../../VERSION)' + } + } + } + } + } + post { + always { + cleanWs() + } + } + } diff --git a/NOTICE b/NOTICE new file mode 100644 index 000000000..d58e45ba5 --- /dev/null +++ b/NOTICE @@ -0,0 +1,9 @@ +MIT License: + +Copyright (C) 2011-2015 Heroku, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/charts/preview/Chart.yaml b/charts/preview/Chart.yaml new file mode 100644 index 000000000..6b684313b --- /dev/null +++ b/charts/preview/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +description: A Helm chart for Kubernetes +icon: https://raw.githubusercontent.com/jenkins-x/jenkins-x-platform/master/images/java.png +name: preview +version: 0.1.0-SNAPSHOT diff --git a/charts/preview/Makefile b/charts/preview/Makefile new file mode 100755 index 000000000..c075e8ca2 --- /dev/null +++ b/charts/preview/Makefile @@ -0,0 +1,22 @@ +OS := $(shell uname) + +preview: + helm init --client-only + helm repo add chartmuseum http://jenkins-x-chartmuseum:8080 + helm repo add chartmuseum https://chartmuseum.build.cd.jenkins-x.io +ifeq ($(OS),Darwin) + sed -i "" -e "s/version:.*/version: $(PREVIEW_VERSION)/" Chart.yaml + sed -i "" -e "s/version:.*/version: $(PREVIEW_VERSION)/" ../*/Chart.yaml + sed -i "" -e "s/tag: .*/tag: $(PREVIEW_VERSION)/" values.yaml +else ifeq ($(OS),Linux) + sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" Chart.yaml + sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" ../*/Chart.yaml + sed -i -e "s/repository: .*/repository: $(JENKINS_X_DOCKER_REGISTRY_SERVICE_HOST):$(JENKINS_X_DOCKER_REGISTRY_SERVICE_PORT)\/$(ORG)\/$(APP_NAME)/" values.yaml + sed -i -e "s/tag: .*/tag: $(PREVIEW_VERSION)/" values.yaml +else + echo "platfrom $(OS) not supported to release from" + exit -1 +endif + echo " version: $(PREVIEW_VERSION)" >> requirements.yaml + helm dependency build + helm lint \ No newline at end of file diff --git a/charts/preview/requirements.yaml b/charts/preview/requirements.yaml new file mode 100755 index 000000000..f44f1a899 --- /dev/null +++ b/charts/preview/requirements.yaml @@ -0,0 +1,13 @@ + +dependencies: +- alias: expose + name: exposecontroller + repository: https://chartmuseum.build.cd.jenkins-x.io + version: 2.3.56 +- alias: cleanup + name: exposecontroller + repository: https://chartmuseum.build.cd.jenkins-x.io + version: 2.3.56 +- alias: preview + name: spring-petclinic + repository: file://../spring-petclinic diff --git a/charts/preview/values.yaml b/charts/preview/values.yaml new file mode 100755 index 000000000..b53ceaa57 --- /dev/null +++ b/charts/preview/values.yaml @@ -0,0 +1,22 @@ + +expose: + Annotations: + helm.sh/hook: post-install,post-upgrade + helm.sh/hook-delete-policy: hook-succeeded + config: + exposer: Ingress + http: true + tlsacme: false + +cleanup: + Args: + - --cleanup + Annotations: + helm.sh/hook: pre-delete + helm.sh/hook-delete-policy: hook-succeeded + +preview: + image: + repository: + tag: + pullPolicy: IfNotPresent \ No newline at end of file diff --git a/charts/spring-petclinic/.helmignore b/charts/spring-petclinic/.helmignore new file mode 100755 index 000000000..f0c131944 --- /dev/null +++ b/charts/spring-petclinic/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/charts/spring-petclinic/Chart.yaml b/charts/spring-petclinic/Chart.yaml new file mode 100644 index 000000000..42b414a78 --- /dev/null +++ b/charts/spring-petclinic/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +description: A Helm chart for Kubernetes +icon: https://raw.githubusercontent.com/jenkins-x/jenkins-x-platform/master/images/java.png +name: spring-petclinic +version: 0.1.0-SNAPSHOT diff --git a/charts/spring-petclinic/Makefile b/charts/spring-petclinic/Makefile new file mode 100755 index 000000000..17b62c3ff --- /dev/null +++ b/charts/spring-petclinic/Makefile @@ -0,0 +1,48 @@ +CHART_REPO := http://jenkins-x-chartmuseum:8080 +CURRENT=$(pwd) +NAME := spring-petclinic +OS := $(shell uname) +RELEASE_VERSION := $(shell cat ../../VERSION) + +build: clean + rm -rf requirements.lock + helm dependency build + helm lint + +install: clean build + helm install . --name ${NAME} + +upgrade: clean build + helm upgrade ${NAME} . + +delete: + helm delete --purge ${NAME} + +clean: + rm -rf charts + rm -rf ${NAME}*.tgz + +release: clean + helm dependency build + helm lint + helm init --client-only + helm package . + curl --fail -u $(CHARTMUSEUM_CREDS_USR):$(CHARTMUSEUM_CREDS_PSW) --data-binary "@$(NAME)-$(shell sed -n 's/^version: //p' Chart.yaml).tgz" $(CHART_REPO)/api/charts + rm -rf ${NAME}*.tgz% + +tag: +ifeq ($(OS),Darwin) + sed -i "" -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml + sed -i "" -e "s/tag: .*/tag: $(RELEASE_VERSION)/" values.yaml +else ifeq ($(OS),Linux) + sed -i -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml + sed -i -e "s/repository: .*/repository: $(JENKINS_X_DOCKER_REGISTRY_SERVICE_HOST):$(JENKINS_X_DOCKER_REGISTRY_SERVICE_PORT)\/$(ORG)\/$(APP_NAME)/" values.yaml + sed -i -e "s/tag: .*/tag: $(RELEASE_VERSION)/" values.yaml +else + echo "platfrom $(OS) not supported to release from" + exit -1 +endif + git add --all + git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed + git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)" + git push origin v$(RELEASE_VERSION) diff --git a/charts/spring-petclinic/README.md b/charts/spring-petclinic/README.md new file mode 100755 index 000000000..7c3946133 --- /dev/null +++ b/charts/spring-petclinic/README.md @@ -0,0 +1 @@ +# Java application \ No newline at end of file diff --git a/charts/spring-petclinic/templates/NOTES.txt b/charts/spring-petclinic/templates/NOTES.txt new file mode 100755 index 000000000..97823be26 --- /dev/null +++ b/charts/spring-petclinic/templates/NOTES.txt @@ -0,0 +1,4 @@ + +Get the application URL by running these commands: + +kubectl get ingress {{ template "fullname" . }} diff --git a/charts/spring-petclinic/templates/_helpers.tpl b/charts/spring-petclinic/templates/_helpers.tpl new file mode 100755 index 000000000..f0d83d2ed --- /dev/null +++ b/charts/spring-petclinic/templates/_helpers.tpl @@ -0,0 +1,16 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/charts/spring-petclinic/templates/deployment.yaml b/charts/spring-petclinic/templates/deployment.yaml new file mode 100755 index 000000000..aa9eaf05d --- /dev/null +++ b/charts/spring-petclinic/templates/deployment.yaml @@ -0,0 +1,39 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ template "fullname" . }} + labels: + draft: {{ default "draft-app" .Values.draft }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + draft: {{ default "draft-app" .Values.draft }} + app: {{ template "fullname" . }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.internalPort }} + livenessProbe: + httpGet: + path: {{ .Values.probePath }} + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + readinessProbe: + httpGet: + path: {{ .Values.probePath }} + port: {{ .Values.service.internalPort }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + resources: +{{ toYaml .Values.resources | indent 12 }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} diff --git a/charts/spring-petclinic/templates/service.yaml b/charts/spring-petclinic/templates/service.yaml new file mode 100755 index 000000000..373fea319 --- /dev/null +++ b/charts/spring-petclinic/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "fullname" . }} + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" +{{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + protocol: TCP + name: {{ .Values.service.name }} + selector: + app: {{ template "fullname" . }} diff --git a/charts/spring-petclinic/values.yaml b/charts/spring-petclinic/values.yaml new file mode 100755 index 000000000..196f02975 --- /dev/null +++ b/charts/spring-petclinic/values.yaml @@ -0,0 +1,33 @@ +# Default values for Maven projects. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +replicaCount: 1 +image: + repository: draft + tag: dev + pullPolicy: IfNotPresent +service: + name: spring-petclinic + type: ClusterIP + externalPort: 80 + internalPort: 8080 + annotations: + fabric8.io/expose: "true" +resources: + limits: + cpu: 500m + memory: 512Mi + requests: + cpu: 400m + memory: 512Mi +probePath: /actuator/health +livenessProbe: + initialDelaySeconds: 60 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 +readinessProbe: + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 +terminationGracePeriodSeconds: 10 diff --git a/openshift/petclinic-web-app.yaml b/openshift/petclinic-web-app.yaml index 9f3d6ad5a..9a2626586 100644 --- a/openshift/petclinic-web-app.yaml +++ b/openshift/petclinic-web-app.yaml @@ -216,5 +216,4 @@ objects: kind: ImageStreamTag name: '${APP_NAME}:latest' namespace: ${NAMESPACE} - type: ImageChange - - type: ConfigChange \ No newline at end of file + type: ImageChange \ No newline at end of file From 220dd07f7fd5894f14ce07b1c7bf1bbe6ae18233 Mon Sep 17 00:00:00 2001 From: Alex Caio dos Santos Baptista Date: Sun, 1 Apr 2018 21:53:48 -0300 Subject: [PATCH 14/15] Ajuste do HC --- charts/spring-petclinic/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/spring-petclinic/values.yaml b/charts/spring-petclinic/values.yaml index 196f02975..efef0e112 100755 --- a/charts/spring-petclinic/values.yaml +++ b/charts/spring-petclinic/values.yaml @@ -20,7 +20,7 @@ resources: requests: cpu: 400m memory: 512Mi -probePath: /actuator/health +probePath: / livenessProbe: initialDelaySeconds: 60 periodSeconds: 10 From aeb7b80f7757233fe6dcc1445cdd507ee89a8e92 Mon Sep 17 00:00:00 2001 From: Alex Caio dos Santos Baptista Date: Mon, 2 Apr 2018 23:27:35 -0300 Subject: [PATCH 15/15] Mudando a cor --- src/main/less/petclinic.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/less/petclinic.less b/src/main/less/petclinic.less index 32d15a5f2..1c3a9c126 100644 --- a/src/main/less/petclinic.less +++ b/src/main/less/petclinic.less @@ -15,7 +15,7 @@ @spring-green: #6db33f; @spring-dark-green: #5fa134; -@spring-brown: #34302D; +@spring-brown: #ff0000; @spring-grey: #838789; @spring-light-grey: #f1f1f1;