test
This commit is contained in:
parent
3a467b5c55
commit
964994fc4c
15
.drone.star
15
.drone.star
@ -1,11 +1,13 @@
|
|||||||
CODER_URL = "https://github.com/coder/coder/releases/download/v0.24.1/coder_0.24.1_linux_amd64.tar.gz"
|
CODER_URL = "https://github.com/coder/coder/releases/download/v2.0.0/coder_2.0.0_linux_amd64.tar.gz"
|
||||||
|
|
||||||
TEMPLATES = {
|
TEMPLATES = {
|
||||||
"base": {
|
"base": {
|
||||||
# "android": {"image": "codercom/enterprise-android:ubuntu"},
|
# "android": {"image": "codercom/enterprise-android:ubuntu"},
|
||||||
# "kubernetes": {"image": "codercom/enterprise-base:ubuntu"},
|
# "kubernetes": {"image": "codercom/enterprise-base:ubuntu"},
|
||||||
"python-38": {"image": "cr.smcm.xyz/coder-images/python-38:latest"},
|
"python-38": {"image": "cr.smcm.xyz/coder-images/python-3.8:latest"},
|
||||||
"python-311": {"image": "cr.smcm.xyz/coder-images/python-311:latest"},
|
"python-38-alpine3.18": {"image": "cr.smcm.xyz/coder-images/python-3.8-alpine3.18:latest"},
|
||||||
|
"python-311": {"image": "cr.smcm.xyz/coder-images/python-3.11:latest"},
|
||||||
|
"python-311-alpine3.18": {"image": "cr.smcm.xyz/coder-images/python-3.11-alpine3.18:latest"},
|
||||||
},
|
},
|
||||||
"alpine": {
|
"alpine": {
|
||||||
"alpine": {"image": "cr.smcm.xyz/coder-images/alpine:latest"},
|
"alpine": {"image": "cr.smcm.xyz/coder-images/alpine:latest"},
|
||||||
@ -25,6 +27,13 @@ TEMPLATES = {
|
|||||||
"coder_user_gid": "3434",
|
"coder_user_gid": "3434",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"python": {
|
||||||
|
"python": {
|
||||||
|
"image": "cr.smcm.xyz/coder-images/python${data.coder_parameter.python_version.value}${locals.alpine}:latest",
|
||||||
|
"python_versions": "3.8,3.11",
|
||||||
|
"alpine_version": "3.18"
|
||||||
|
}
|
||||||
|
}
|
||||||
"splunk": {
|
"splunk": {
|
||||||
"splunk": {"image": "cr.smcm.xyz/coder-images/splunk:latest"},
|
"splunk": {"image": "cr.smcm.xyz/coder-images/splunk:latest"},
|
||||||
"splunk-82": {"image": "cr.smcm.xyz/coder-images/splunk-8.2:latest"},
|
"splunk-82": {"image": "cr.smcm.xyz/coder-images/splunk-8.2:latest"},
|
||||||
|
|||||||
@ -13,6 +13,11 @@ terraform {
|
|||||||
}
|
}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
locals {
|
||||||
|
{% block locals %}
|
||||||
|
{% endblock %}
|
||||||
|
}
|
||||||
|
|
||||||
{% block parameters %}
|
{% block parameters %}
|
||||||
{% block cpu_parameter %}
|
{% block cpu_parameter %}
|
||||||
data "coder_parameter" "cpu" {
|
data "coder_parameter" "cpu" {
|
||||||
@ -274,7 +279,9 @@ resource "kubernetes_deployment" "main" {
|
|||||||
{% block kubernetes_pod_main_container %}
|
{% block kubernetes_pod_main_container %}
|
||||||
container {
|
container {
|
||||||
name = "dev"
|
name = "dev"
|
||||||
|
{% block kubernetes_pod_main_image %}
|
||||||
image = "{{image}}"
|
image = "{{image}}"
|
||||||
|
{% endblock %}
|
||||||
{% block kubernetes_pod_main_command %}
|
{% block kubernetes_pod_main_command %}
|
||||||
command = ["bash", "-c", coder_agent.main.init_script]
|
command = ["bash", "-c", coder_agent.main.init_script]
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
28
python.jinja
Normal file
28
python.jinja
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{% extends "base.tf.jinja" %}
|
||||||
|
|
||||||
|
{% block locals %}
|
||||||
|
alpine = $data.coder_parameter.use_alpine.value ? "-alpine{{ alpine_version | replace(".", ",") }}" : ""
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block parameters %}
|
||||||
|
{{ super() }}
|
||||||
|
|
||||||
|
data "coder_parameter" "python_version" {
|
||||||
|
name = "Python Version"
|
||||||
|
description = "Python Version"
|
||||||
|
type = "string"
|
||||||
|
default = ""
|
||||||
|
|
||||||
|
mutable = true
|
||||||
|
option {
|
||||||
|
name = "Latest"
|
||||||
|
value = ""
|
||||||
|
}
|
||||||
|
{% for version in python_versions.split(",") %}
|
||||||
|
option {
|
||||||
|
name = "{{ version }}"
|
||||||
|
value = "-{{ version | replace(".", "") }}"
|
||||||
|
}
|
||||||
|
{% endfor %}
|
||||||
|
}
|
||||||
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user