This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openjdk:8 | |
ADD build/libs/ci-course-0.0.1-SNAPSHOT.jar ci-course.jar | |
EXPOSE 8085 | |
ENTRYPOINT ["java", "-jar", "ci-course.jar"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent any | |
stages { | |
stage('Cloning the repo') { | |
steps { | |
git url: 'https://github.com/pedrovitorlima/ci-course.git' | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ci.cd.example.cicourse.com.ci.cd.example.cicourse.controller; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
@RestController | |
@RequestMapping("ci-course") | |
public class CiCourseController { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.pedro.springboot.springvault.domain; | |
import javax.persistence.*; | |
import java.math.BigInteger; | |
@Entity | |
@Table(name="foo", schema = "public") | |
public class Foo { | |
@Id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring.cloud.vault.token=myroot | |
spring.cloud.vault.scheme=http | |
spring.cloud.vault.uri=http://localhost:8200 | |
spring.datasource.url=jdbc:postgresql://localhost:15432/dbtest | |
#spring.datasource.username=postgres | |
#spring.datasource.password=postgres | |
spring.application.name=spring-vault-sample |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.pedro.springboot.springvault; | |
import br.pedro.springboot.springvault.domain.Secrets; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import javax.annotation.PostConstruct; | |
@SpringBootApplication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.pedro.springboot.springvault.domain; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.stereotype.Component; | |
@Component | |
public class Secrets { | |
@Value("${myrepo.username}") | |
private String gitUser; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring.cloud.vault.token=myroot | |
spring.cloud.vault.scheme=http | |
spring.cloud.vault.uri=http://localhost:8200 | |
spring.datasource.url=jdbc:postgresql://localhost:15432/dbtest | |
spring.datasource.username=postgres | |
spring.datasource.password=postgres | |
spring.application.name=spring-vault-sample |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(...) | |
<properties> | |
<java.version>1.8</java.version> | |
<spring-cloud.version>Greenwich.SR1</spring-cloud.version> | |
</properties> | |
<dependencies> | |
<dependency> | |
<groupId>org.springframework.boot</groupId> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.5' | |
services: | |
vault-compose: | |
image: vault:0.9.6 | |
build: | |
context: ./vault | |
ports: | |
- 8200:8200 |