Skip to content
Snippets Groups Projects
Commit 85872bc4 authored by OZGCloud's avatar OZGCloud
Browse files

add jenkinsfile

parent 7040541c
No related merge requests found
pipeline {
agent {
node {
label 'goofy'
}
}
options {
timeout(time: 1, unit: 'HOURS')
disableConcurrentBuilds()
}
stages {
stage('client build') {
steps {
sh 'npm --version'
dir('goofy-client') {
sh 'npm install'
sh 'npm run build'
sh 'npm run test'
}
}
}
stage('server build') {
steps {
container("maven"){
sh 'mvn --version'
sh 'mvn clean install'
}
}
}
stage('openshift deploy') {
steps {
script {
def pom = readMavenPom file: 'pom.xml'
def version = pom.version
openshift.withCluster() {
openshift.withProject() {
dir('goofy-server') {
openshift.startBuild("goofy-builder", "--from-dir=.", "--follow")
}
openshift.tag("goofy-builder:latest", "goofy-builder:${env.BRANCH_NAME}-${version}")
openshift.tag("goofy-builder:${env.BRANCH_NAME}-${version}", "sh-kiel-dev/goofy:${env.BRANCH_NAME}-${version}")
}
}
}
}
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment