/build.gradle (fbc3d847408c0b534e931f5e5a16c6299c131627) (4930 bytes) (mode 100644) (type blob)
import javax.crypto.spec.IvParameterSpec
import javax.crypto.spec.SecretKeySpec
import javax.crypto.Cipher
import javax.crypto.spec.DESKeySpec;
buildscript {
ext {
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
flatDir {
dirs 'libs'
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath 'com.oracle:ojdbc8:12.2.0.2'
classpath "org.liquibase:liquibase-gradle-plugin:1.1.1"
}
}
apply plugin: 'java'
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
compileJava {
options.encoding = "UTF-8"
}
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.kingfisher'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile files('libs/ojdbc8.jar')
compile 'org.apache.httpcomponents:httpclient:4.5.6'
compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.8.0'
compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.8.0'
compile group: 'org.apache.poi', name: 'poi-ooxml', version: '4.0.0'
implementation('org.springframework.boot:spring-boot-starter-actuator')
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
implementation('org.springframework.boot:spring-boot-starter-security')
implementation('org.springframework.boot:spring-boot-starter-web')
testImplementation('org.springframework.boot:spring-boot-starter-test')
testImplementation('org.springframework.security:spring-security-test')
testCompile group: 'org.hamcrest', name: 'hamcrest-core', version: '1.3'
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
testCompile group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.19.0'
testCompile ('io.rest-assured:rest-assured:3.0.2')
testCompile ('io.rest-assured:spring-web-test-client:3.3.0')
testCompile('io.rest-assured:rest-assured:3.1.0')
}
/******** JACOCO ********/
apply plugin: 'jacoco'
jacoco {
toolVersion = "0.8.2"
reportsDir = file("$buildDir/reports/jacoco")
}
test {
jacoco {
excludes = ['com.kingfisher.deployment.audit.model.*','com.kingfisher.deployment.audit.exception.model.*']
}
}
jacocoTestReport {
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'com/kingfisher/deployment/audit/model/**',
'com/kingfisher/deployment/audit/exception/model/**'
])
})
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
excludes = ['com.kingfisher.deployment.audit.model.*','com.kingfisher.deployment.audit.exception.model.*']
}
}
}
check.dependsOn jacocoTestCoverageVerification
jacocoTestReport.dependsOn jacocoTestCoverageVerification
/******** Load the properties file ********/
def devProps = new Properties()
file("src/main/resources/application-dev.properties").withInputStream {
stream -> devProps.load(stream)
}
def prodProps = new Properties()
file("src/main/resources/application-prod.properties").withInputStream {
stream -> prodProps.load(stream)
}
/******** Get Key and IV from environment for password decryption ********/
def ENV = System.getenv()
def codecKeyDev = ENV['codecKey']
def codecIVDev = ENV['codecIV']
def codecKeyProd = ENV['codecKey_prod']
def codecIVProd = ENV['codecIV_prod']
/******** LIQUIBASE ********/
apply plugin: 'liquibase'
liquibase {
/******** Setup password decryptor by key and IV available in system environment ********/
Cipher deCipher = Cipher.getInstance("DES/CBC/PKCS5Padding")
deCipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(new DESKeySpec(codecKeyDev.getBytes()).getKey(), "DES"), new IvParameterSpec(codecIVDev.getBytes()))
def dbPassword = new String(deCipher.doFinal(devProps.getProperty('spring.datasource.password').decodeBase64()))
def dbPasswordProd = new String(deCipher.doFinal(prodProps.getProperty('spring.datasource.password').decodeBase64()))
activities {
dev {
url devProps.getProperty('spring.datasource.url')
username devProps.getProperty('spring.datasource.username')
password dbPassword
changeLogFile new File(rootProject.projectDir,devProps.getProperty('liquibase.change.log.file'))
}
prod {
url prodProps.getProperty('spring.datasource.url')
username prodProps.getProperty('spring.datasource.username')
password dbPasswordProd
changeLogFile new File(rootProject.projectDir,prodProps.getProperty('liquibase.change.log.file'))
}
runList project.hasProperty('runList') ? project.runList : ''
}
}
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
1824 |
0e6477d39449644a27aa5eff5ef7170850da72de |
.dbeaver-data-sources.xml |
100644 |
blob |
309 |
1b68f0d496b830226ffa8639c0a9f80a4ceea0bb |
.gitignore |
100644 |
blob |
653 |
fc70cf39db9b88a8a0ae87dde39839ed925cf671 |
.project |
100644 |
blob |
527 |
6fa98bba55e5d7d7b9a68d5a6e1f4f80ef50eff4 |
Dockerfile |
100644 |
blob |
6179 |
ee6e212dcc1673b64867e100f15c0e04c32521f3 |
Jenkinsfile |
100644 |
blob |
101 |
c96be08c0f191458d581524dacbf2f49b0af23d5 |
README.md |
100644 |
blob |
4930 |
fbc3d847408c0b534e931f5e5a16c6299c131627 |
build.gradle |
100644 |
blob |
74 |
60f05f64aba6030ba1b150e19d8745c1ae3a989b |
gradle.properties |
040000 |
tree |
- |
1c1de0a110e0ed0c7edcf8d9e1cef9be2a0ca4aa |
gradle |
100644 |
blob |
5296 |
cccdd3d517fc5249beaefa600691cf150f2fa3e6 |
gradlew |
100644 |
blob |
2260 |
e95643d6a2ca62258464e83c72f5156dc941c609 |
gradlew.bat |
040000 |
tree |
- |
5a48badf3ef9efc9aca0ad775f9060ec7c2e9f4c |
libs |
100644 |
blob |
45 |
0a2d590f6d69c33bbe7a0a7f1890e4ded54cf13d |
settings.gradle |
040000 |
tree |
- |
c9470982d3cfc2f27f93ee364474d9642cf0958e |
src |
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/Sumangal-IN/deployment-audit
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/Sumangal-IN/deployment-audit
Clone this repository using git:
git clone git://git.rocketgit.com/user/Sumangal-IN/deployment-audit
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main