forked from frappe/frappe_docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
58 lines (52 loc) · 1.19 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
pipeline {
agent {
label 'linux'
}
options {
ansiColor('xterm')
}
environment {
TARGET_IMAGE_NAME= "git.vspace.one/spaceit/frappe_docker/erpnext:2"
}
stages {
stage('Build new container') {
steps{
script {
def apps_json = """
[
{
"url": "https://github.com/frappe/payments",
"branch": "develop"
},
{
"url": "https://github.com/frappe/erpnext",
"branch": "version-15"
},
{
"url": "https://github.com/frappe/non_profit",
"branch": "develop"
},
{
"url": "https://github.com/jHetzer/erpnextfints",
"tag": "0.4.1"
}
]
"""
sh "echo '$apps_json'"
def apps_json_enc = sh(script: "echo '$apps_json' | base64", returnStdout: true, returnStatus: false)
echo apps_json_enc
sh """buildah build \\
--build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \\
--build-arg=FRAPPE_BRANCH=version-15 \\
--build-arg=PYTHON_VERSION=3.10.12 \\
--build-arg=NODE_VERSION=20.11.0 \\
--build-arg=APPS_JSON_BASE64="$apps_json_enc" \\
--tag=$TARGET_IMAGE_NAME \\
--file=images/custom/Containerfile .
"""
sh "buildah push $TARGET_IMAGE_NAME"
}
}
}
}
}