diff --git a/.drone.star b/.drone.star index 9c91eb7..d13bafb 100644 --- a/.drone.star +++ b/.drone.star @@ -1,7 +1,4 @@ -CODER_URL = "https://github.com/coder/coder/releases/download/v2.0.0/coder_2.0.0_linux_amd64.tar.gz" - TEMPLATES = { - "base": {}, "_lang": { "golang": { "lang": "golang", @@ -29,6 +26,11 @@ TEMPLATES = { "coder_user_gid": "1002", }, }, + "argocd": { + "argocd": { + "image": "cr.smcm.xyz/coder-images/alpine-3.18" + } + } "jupyter": { "jupyter-scipy-notebook": {"image": "cr.smcm.xyz/coder-images/jupyter-scipy-notebook"}, }, @@ -71,29 +73,6 @@ def main(ctx): "output": "{coder_template}/main.tf".format(coder_template = coder_template), }, }, - # { - # "name": "push {coder_template}".format(coder_template = coder_template), - # "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": [ - # "apk add git", - # "wget -q -O- {url} | tar -xzf - -C /usr/local/bin ./coder".format(url = CODER_URL), - # "sleep $(( $RANDOM % 15 ))", - # " || ".join([ - # "coder templates push -d {name} --yes {name}".format(name = coder_template), - # "coder templates create -d {name} --yes {name}".format(name = coder_template), - # ]), - # ], - # "depends_on": [ - # "generate {coder_template}".format(coder_template = coder_template), - # ], - # }, { "name": "push {coder_template}".format(coder_template = coder_template), "image": "cr.smcm.xyz/drone-plugins/coder", diff --git a/argocd.jinja b/argocd.jinja new file mode 100644 index 0000000..c0c33aa --- /dev/null +++ b/argocd.jinja @@ -0,0 +1,13 @@ +{% extends "base.tf.jinja" %} + +{% block post_startup_script_setup_home %} + [ -d "argocd" ] || mkdir argocd + + for REPO in kub odjur kortslutning strukturera ; do + [ -d "argocd/${REPO}" ] || git clone git@git-ssh.smcm.xyz:argocd/${REPO}.git + ( cd argocd/$REPO && git pull ) + done + + git config --global user.name "Steve McMaster" + git config --global user.email "steve@mcmaster.io" +{% endblock %} \ No newline at end of file