This commit is contained in:
Steve McMaster 2023-02-24 23:27:45 -05:00
parent 9344b539e3
commit ee4720e7fa

View File

@ -18,41 +18,14 @@ TEMPLATES = {
"splunk-82": {"image": "cr.smcm.xyz/coder-images/splunk-8.2:latest"},
"splunk-90": {"image": "cr.smcm.xyz/coder-images/splunk-9.0:latest"},
},
"proxychains": {
"splunk-python": {"image": "cr.smcm.xyz/coder-images/python-38:latest"},
},
# "proxychains": {
# "splunk-python": {"image": "cr.smcm.xyz/coder-images/python-38:latest"},
# },
"jupyter": {
"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):
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 = []
# 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 coder_template in TEMPLATES[jinja_template]:
@ -86,7 +55,7 @@ def main(ctx):
))
pipeline["steps"].append({
"name": "push {coder_template}".format(coder_template = coder_template),
"name": "push {name}".format(name = coder_template),
"image": "alpine:latest",
"environment": {
"CODER_URL": "http://coder.coder.svc.cluster.local",