53 lines
1.8 KiB
Plaintext
53 lines
1.8 KiB
Plaintext
def main(ctx):
|
|
out = []
|
|
out += pipeline("5.2.2", "https://d.barracudanetworks.com/VPN/Linux/VPNClient_5.2.2_Linux.tar.gz", "barracudavpn_5.2.2_amd64.deb", True )
|
|
out += pipeline("5.1.4", "https://d.barracudanetworks.com/VPN/Linux/VPNClient_5.1.4_Linux.tar.gz", "barracudavpn_5.1.4_amd64.deb" )
|
|
out += pipeline("5.0.2.7", "https://d.barracudanetworks.com/VPN/Linux/VPNClient_5.0.2.7_Linux.tar.gz", "barracudavpn_5.0.2.7_amd64.deb" )
|
|
return out
|
|
|
|
def pipeline(tag, url, debname, latest=False):
|
|
out = [{
|
|
"kind": "pipeline",
|
|
"type": "docker",
|
|
"name": "barracudavpn-%s" % (tag),
|
|
"platform": {
|
|
"arch": "amd64",
|
|
"os": "linux",
|
|
},
|
|
"steps": [{
|
|
"name": "build_on_push",
|
|
"image": "plugins/docker:linux-amd64",
|
|
"settings": {
|
|
"context": "src",
|
|
"dockerfile": "src/Dockerfile",
|
|
"build_args": [
|
|
"URL=" + url,
|
|
"DEBNAME=" + debname
|
|
],
|
|
"username": {
|
|
"from_secret": "docker_username",
|
|
},
|
|
"password": {
|
|
"from_secret": "docker_password",
|
|
},
|
|
"registry": "docker.asperti.com",
|
|
"repo": "docker.asperti.com/paspo/barracudavpn",
|
|
"tags": [
|
|
"%s" % (tag)
|
|
],
|
|
"auto_tag": False,
|
|
"force_tag": True,
|
|
"daemon_off": False,
|
|
},
|
|
}],
|
|
"trigger": {
|
|
"ref": [
|
|
"refs/heads/master",
|
|
"refs/tags/**",
|
|
],
|
|
}
|
|
}]
|
|
if latest:
|
|
out[0]["steps"][0]["settings"]["tags"].append("latest")
|
|
return out
|