fix
This commit is contained in:
parent
9344b539e3
commit
ee4720e7fa
39
.drone.star
39
.drone.star
@ -18,41 +18,14 @@ TEMPLATES = {
|
|||||||
"splunk-82": {"image": "cr.smcm.xyz/coder-images/splunk-8.2:latest"},
|
"splunk-82": {"image": "cr.smcm.xyz/coder-images/splunk-8.2:latest"},
|
||||||
"splunk-90": {"image": "cr.smcm.xyz/coder-images/splunk-9.0:latest"},
|
"splunk-90": {"image": "cr.smcm.xyz/coder-images/splunk-9.0:latest"},
|
||||||
},
|
},
|
||||||
"proxychains": {
|
# "proxychains": {
|
||||||
"splunk-python": {"image": "cr.smcm.xyz/coder-images/python-38:latest"},
|
# "splunk-python": {"image": "cr.smcm.xyz/coder-images/python-38:latest"},
|
||||||
},
|
# },
|
||||||
"jupyter": {
|
"jupyter": {
|
||||||
"jupyter-scipy-notebook": {"image": "cr.smcm.xyz/coder-images/jupyter-scipy-notebook:latest"},
|
"jupyter-scipy-notebook": {"image": "cr.smcm.xyz/coder-images/jupyter-scipy-notebook:latest"},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_build_step(ctx, dockerfile, coder_template, path):
|
|
||||||
# {
|
|
||||||
# "name": "push templates",
|
|
||||||
# "image": "alpine:latest",
|
|
||||||
# "environment": {
|
|
||||||
# "CODER_URL": "http://coder.coder.svc.cluster.local",
|
|
||||||
# "CODER_SESSION_TOKEN": {
|
|
||||||
# "from_secret": "CODER_SESSION_TOKEN",
|
|
||||||
# },
|
|
||||||
# "CODER_TEMPLATE_VERSION": ctx.build.commit,
|
|
||||||
# },
|
|
||||||
# "commands": coder_commands,
|
|
||||||
# },
|
|
||||||
|
|
||||||
build_step =
|
|
||||||
|
|
||||||
for command in BUILD_COMMANDS:
|
|
||||||
build_step["commands"].append(command.format(
|
|
||||||
image = image,
|
|
||||||
DRONE_COMMIT_SHA = ctx.build.commit,
|
|
||||||
dockerfile = dockerfile,
|
|
||||||
path = path,
|
|
||||||
registry_base = registry_base,
|
|
||||||
))
|
|
||||||
|
|
||||||
return build_step
|
|
||||||
|
|
||||||
def get_jinja_command(template, output, context):
|
def get_jinja_command(template, output, context):
|
||||||
jinja2args = " ".join(["-D {key}={value}".format(key = key, value = value) for (key, value) in context.items()])
|
jinja2args = " ".join(["-D {key}={value}".format(key = key, value = value) for (key, value) in context.items()])
|
||||||
|
|
||||||
@ -71,10 +44,6 @@ def main(ctx):
|
|||||||
}
|
}
|
||||||
|
|
||||||
jinja_commands = []
|
jinja_commands = []
|
||||||
# coder_commands = [
|
|
||||||
# "apk add git",
|
|
||||||
# "wget -q -O- {url} | tar -xzf - -C /usr/local/bin ./coder".format(url = CODER_URL),
|
|
||||||
# ]
|
|
||||||
|
|
||||||
for jinja_template in TEMPLATES:
|
for jinja_template in TEMPLATES:
|
||||||
for coder_template in TEMPLATES[jinja_template]:
|
for coder_template in TEMPLATES[jinja_template]:
|
||||||
@ -86,7 +55,7 @@ def main(ctx):
|
|||||||
))
|
))
|
||||||
|
|
||||||
pipeline["steps"].append({
|
pipeline["steps"].append({
|
||||||
"name": "push {coder_template}".format(coder_template = coder_template),
|
"name": "push {name}".format(name = coder_template),
|
||||||
"image": "alpine:latest",
|
"image": "alpine:latest",
|
||||||
"environment": {
|
"environment": {
|
||||||
"CODER_URL": "http://coder.coder.svc.cluster.local",
|
"CODER_URL": "http://coder.coder.svc.cluster.local",
|
||||||
|
|||||||
Reference in New Issue
Block a user