add argocd template
This commit is contained in:
parent
88b9a65e21
commit
db8ac8958b
31
.drone.star
31
.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",
|
||||
|
||||
13
argocd.jinja
Normal file
13
argocd.jinja
Normal file
@ -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 %}
|
||||
Reference in New Issue
Block a user