2021-08-29 20:51:04 -07:00
|
|
|
local build(contrib=false) = {
|
|
|
|
"kind": "pipeline",
|
|
|
|
"name": "build" + (if contrib then "-contrib" else ""),
|
|
|
|
"steps": [
|
|
|
|
{
|
|
|
|
"name": "set image tags",
|
|
|
|
"image": "alpine",
|
|
|
|
"environment": {
|
|
|
|
"VERSION": "7.2.10-r2"
|
|
|
|
},
|
|
|
|
"commands": [
|
2021-10-07 18:52:42 -07:00
|
|
|
"./write-tags.sh $VERSION" + (if contrib then " contrib" else " ") + "> .tags",
|
2021-08-29 20:51:04 -07:00
|
|
|
"# Will build the following tags:",
|
|
|
|
"cat .tags"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "build docker image",
|
|
|
|
"image": "ovdnet/drone-docker",
|
|
|
|
"settings": {
|
|
|
|
"repo": "ovdnet/atheme",
|
|
|
|
"username": {
|
|
|
|
"from_secret": "docker_user"
|
|
|
|
},
|
|
|
|
"password": {
|
|
|
|
"from_secret": "docker_password"
|
|
|
|
},
|
|
|
|
"build_args": std.prune([
|
|
|
|
"ATHEME_VERSION=7.2.10-r2",
|
|
|
|
(if contrib then "BUILD_CONTRIB_MODULES=true")
|
|
|
|
])
|
|
|
|
},
|
|
|
|
"trigger": {
|
|
|
|
"branch": [
|
|
|
|
"master"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"volumes": [
|
|
|
|
{
|
|
|
|
"name": "docker-socket",
|
|
|
|
"path": "/var/run/docker.sock"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"volumes": [
|
|
|
|
{
|
|
|
|
"name": "docker-socket",
|
|
|
|
"host": {
|
|
|
|
"path": "/var/run/docker.sock"
|
|
|
|
}
|
|
|
|
}
|
2021-10-07 19:17:20 -07:00
|
|
|
],
|
|
|
|
"depends_on": std.prune([if contrib then "build"]),
|
2021-08-29 20:51:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
[
|
|
|
|
build(),
|
|
|
|
build(contrib=true)
|
|
|
|
]
|
|
|
|
|