Skip to content

Commit 55e217f

Browse files
committed
php: uncomment packaging code
1 parent 193d6ca commit 55e217f

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

php/Jenkinsfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pipeline {
88
booleanParam(name: "IS_RELEASE", defaultValue: false)
99
booleanParam(name: "IS_GERRIT_TRIGGER", defaultValue: false)
1010
string(name: "REFSPEC", defaultValue: "+refs/heads/*:refs/remotes/origin/*")
11+
booleanParam(name: "SKIP_TESTS", defaultValue: false)
1112
}
1213
stages {
1314
stage('prep') {
@@ -16,6 +17,41 @@ pipeline {
1617
script {
1718
buildName(params.IS_GERRIT_TRIGGER.toBoolean() ? "cv-${BUILD_NUMBER}" : "full-${BUILD_NUMBER}")
1819
}
20+
dir("couchbase-php-client") {
21+
checkout([
22+
$class: "GitSCM",
23+
branches: [[name: params.SHA]],
24+
extensions: [[
25+
$class: "SubmoduleOption",
26+
disableSubmodules: false,
27+
parentCredentials: true,
28+
recursiveSubmodules: true,
29+
]],
30+
userRemoteConfigs: [[
31+
refspec: params.REFSPEC,
32+
url: params.REPO
33+
]]])
34+
}
35+
stash includes: 'couchbase-php-client/', name: 'source-tree', useDefaultExcludes: false
36+
}
37+
}
38+
stage("package") {
39+
agent { label 'centos7' }
40+
steps {
41+
dir("package--${BUILD_NUMBER}") {
42+
unstash("source-tree")
43+
dir("couchbase-php-client") {
44+
cbdep_config()
45+
install_php('8.1.4', 'nts')
46+
withEnv(calculate_env('centos7', '8.1.4', 'nts')) {
47+
withEnv(["CB_CONFIGURE_ONLY=true"]) {
48+
execute("ruby bin/build")
49+
}
50+
execute("ruby bin/package")
51+
}
52+
archiveArtifacts(artifacts: "couchbase-*.tgz", fingerprint: true)
53+
}
54+
}
1955
}
2056
}
2157
stage('build') {
@@ -130,6 +166,11 @@ pipeline {
130166
}
131167
}
132168
stage('combination') {
169+
when {
170+
expression {
171+
return !SKIP_TESTS.toBoolean()
172+
}
173+
}
133174
matrix {
134175
axes {
135176
axis {

0 commit comments

Comments
 (0)