-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
37 lines (33 loc) · 835 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
library identifier: "[email protected]",
retriever: modernSCM(
[
$class: "GitSCMSource",
remote: "https://github.com/redhat-cop/pipeline-library.git"
]
)
openshift.withCluster() {
env.NAMESPACE = openshift.project()
env.APP_NAME = "${JOB_NAME}".replaceAll(/-build.*/, '')
echo "Starting Pipeline for ${APP_NAME}..."
env.BUILD = "${env.NAMESPACE}"
env.BUILD_CONFIG = "hello-chris-build"
}
pipeline {
agent {
label 'nodejs'
}
stages {
stage('Build Container Image'){
steps {
// Copy the resulting artifacts into common directory
sh """
mkdir oc-build
ls
pwd
cp ./* ./oc-build 2>/dev/null || :
"""
binaryBuild(projectName: env.BUILD, buildConfigName: env.BUILD_CONFIG, buildFromPath: "oc-build")
}
}
}
}