Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ecsd-matthew-song committed Jan 21, 2019
0 parents commit 3f5c348
Show file tree
Hide file tree
Showing 48 changed files with 976 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*terraform.tfstate*
*.tfvars
.terraform
*.tfstate
*.tfstate.backup
*.DS_STORE
74 changes: 74 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Initiating maven build'
sh 'mvn clean install -Dlicense.skip=true'
echo 'Maven build complete'
}
}

stage('Testing') {
parallel {
stage('SonarQube Test') {
steps {
echo 'Initiating SonarQube test'
sh 'mvn sonar:sonar -Dsonar.host.url=http://<IP address>:8081 -Dlicense.skip=true'
echo 'SonarQube test Complete'
}
}

stage('Print Tester credentials') {
steps {
sleep 10
echo "The tester is ${TESTER}"
}
}
stage('Print Build Number') {
steps {
sleep 20
echo "This is build number ${BUILD_ID}"
}
}
}
}

stage('JFrog Push') {
steps {
echo 'Starting JFrog push'
script {
def server = Artifactory.server "artifactory"
def buildInfo = Artifactory.newBuildInfo()
def rtMaven = Artifactory.newMavenBuild()

rtMaven.tool = 'maven'
rtMaven.deployer server: server, releaseRepo: 'libs-release-local', snapshotRepo: 'libs-snapshot-local'

buildInfo = rtMaven.run pom: 'pom.xml', goals: "clean install -Dlicense.skip=true"
buildInfo.env.capture = true
buildInfo.name = 'jpetstore-6'
server.publishBuildInfo buildInfo
}
echo 'JFrog push complete'
}
}
stage('Deploy prompt') {
steps {
input 'Deploy to Production?'
}
}
stage('Deploy') {
steps {
echo 'Initiating Deployment'
echo 'Deployment Complete'
}
}
}
tools {
maven 'maven'
}
environment {
TESTER = 'placeholder'
}
}
Loading

0 comments on commit 3f5c348

Please sign in to comment.