fix
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
resource "kubectl_manifest" "post_install_job" {
|
resource "kubectl_manifest" "post_install_job" {
|
||||||
|
force_new = true
|
||||||
yaml_body = <<-EOF
|
yaml_body = <<-EOF
|
||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ fn check_domain() {
|
|||||||
fn pre_check() {
|
fn pre_check() {
|
||||||
check_domain();
|
check_domain();
|
||||||
}
|
}
|
||||||
|
fn have_taiga() {
|
||||||
|
have_namespace(`${global::DOMAIN}-ci`) && have_install(`${global::DOMAIN}-ci`, "taiga") && have_service(`${global::DOMAIN}-ci`, "taiga-taiga") && have_secret(`${global::DOMAIN}-ci`, "taiga-taiga")
|
||||||
|
}
|
||||||
fn conditions() {
|
fn conditions() {
|
||||||
let org = global::NAME;
|
let org = global::NAME;
|
||||||
org.replace("org-","");
|
org.replace("org-","");
|
||||||
@@ -22,6 +25,7 @@ fn conditions() {
|
|||||||
log_info(`Found ${repos.len} repos`);
|
log_info(`Found ${repos.len} repos`);
|
||||||
}
|
}
|
||||||
json_encode(#{
|
json_encode(#{
|
||||||
repos: repos
|
repos: repos,
|
||||||
|
have_taiga: have_taiga()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
resource "kubectl_manifest" "post_install_job_taiga" {
|
resource "kubectl_manifest" "post_install_job_taiga" {
|
||||||
count = var.conditions.have_taiga ? 1:0
|
count = var.conditions.have_taiga ? 1:0
|
||||||
|
force_new = true
|
||||||
yaml_body = <<-EOF
|
yaml_body = <<-EOF
|
||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
@@ -12,7 +13,7 @@ resource "kubectl_manifest" "post_install_job_taiga" {
|
|||||||
spec:
|
spec:
|
||||||
restartPolicy: OnFailure
|
restartPolicy: OnFailure
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: wait-for-sonar
|
- name: wait-for-taiga
|
||||||
image: "${var.images.kubectl.registry}/${var.images.kubectl.repository}:${var.images.kubectl.tag}"
|
image: "${var.images.kubectl.registry}/${var.images.kubectl.repository}:${var.images.kubectl.tag}"
|
||||||
imagePullPolicy: ${var.images.kubectl.pull_policy}
|
imagePullPolicy: ${var.images.kubectl.pull_policy}
|
||||||
securityContext:
|
securityContext:
|
||||||
|
|||||||
Reference in New Issue
Block a user