Skip to content

Sandeep #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
12 changes: 12 additions & 0 deletions .circleci/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
jobs:
build:
docker:
- image: openjdk:latest
steps:
- checkout
- run: echo "this is the build job"

workflows:
build_and_test:
jobs:
- build
51 changes: 51 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env groovy
@Library('OGJenkinsLib@git-caching') _

def scmVars
def tags
def containers = [
OGContainer('jdk', 'openjdk', '11.0.9', [
environmentVariables: [JAVA_OPTS: '-XshowSettings:vm'],
resourceLimitCpu: '3000m',
resourceLimitMemory: '5.0Gi']
),

OGContainer('postgres', 'postgres', '9.6', [
command: null, // To use the default command
environmentVariables: [POSTGRES_PASSWORD: 'postgres'],
resourceLimitCpu: '500m',
resourceLimitMemory: '512Mi']
),

OGContainer('mongo', 'mongo', '3.6-stretch', [
command: null,
resourceLimitCpu: '500m',
resourceLimitMemory: '512Mi']
),

OGContainer('dynamodb', 'amazon/dynamodb-local', '1.17.2', [
command: null,
resourceLimitCpu: '500m',
resourceLimitMemory: '512Mi'
])
]

// The container tag that shall be used for when the Git branch name contains a `/`
def branchTagFriendly

OGAgentPipeline(containers) {
stage('Setup') {
scmVars = checkout scm
}

stage('SonarQube Analysis') {
container('jdk') {
def scannerHome = tool 'SonarScanner';
withSonarQubeEnv() {
sh "${scannerHome}/bin/sonar-scanner "
}
}
} // stage('Build Jar')


} // OGAgentPipeline(containers)
5 changes: 5 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sonar.organization=opengov
sonar.projectKey=opengov
sonar.sources=src/
sonar.java.binaries=.
sonar.verbose=true