-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.drone.jsonnet
99 lines (93 loc) · 2.09 KB
/
.drone.jsonnet
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// Function - Git Clone
local githubClone() = {
name: "Clone",
image: "ubuntu",
environment: { DEBIAN_FRONTEND: "noninteractive" },
commands: [ "scripts/github_clone.sh" ]
};
// Function - Set PKGBUILD functions for PKGBUILDs in src/PKGBUILDs
local configurePKGBUILD() = {
name: "Configure PKGBUILDs",
kind: "pipeline",
type: "docker",
// clone: { disable: true },
steps: [
// githubClone(),
{
name: "Set Variables in PKGBUILDs",
image: "ubuntu",
commands: [ "scripts/pkgbuild_gen.sh" ]
}
]
};
// Function - Build and Publish
local buildAndPublish(nameCap, name) = {
name: "Build and Publish to APT Repository (" + nameCap + " Release)",
kind: "pipeline",
type: "docker",
// clone: { disable: true },
depends_on: [ "Configure PKGBUILDs" ],
trigger: {
branch: name
},
steps: [
// githubClone(),
{
name: "Build",
image: "ubuntu",
environment: {
release_type: name,
DEBIAN_FRONTEND: "noninteractive"
},
commands: [ "scripts/build.sh" ]
},
{
name: "Publish",
image: "ubuntu",
environment: {
nexus_repository_password: {
from_secret: "nexus_repository_password"
},
DEBIAN_FRONTEND: "noninteractive"
},
commands: [ "scripts/publish.sh" ]
}
]
};
// Function - Make GitHub Release
local makeGitHubRelease() = {
name: "Publish GitHub Release",
kind: "pipeline",
type: "docker",
depends_on: [ "Build and Publish to APT Repository (Stable Release)" ],
trigger: {
branch: "stable"
},
steps: [
{
name: "build",
image: "ubuntu",
environment: {
DEBIAN_FRONTEND: "noninteractive"
},
commands: [ "scripts/build.sh" ]
},
{
name: "publish",
image: "ubuntu",
environment: {
kavplex_github_pat: {
from_secret: "kavplex_github_pat"
}
},
commands: [ "scripts/github_release.sh" ]
}
]
};
// Run Functions
[
configurePKGBUILD(),
buildAndPublish("Stable", "stable"),
buildAndPublish("Alpha", "alpha"),
makeGitHubRelease(),
]