drone ci to push to github

This commit is contained in:
viktorbarzin 2021-02-14 18:23:49 +00:00
parent 03f8b5a9ac
commit f414a214de
2 changed files with 12 additions and 42 deletions

View file

@ -3,7 +3,7 @@ type: kubernetes
name: default name: default
steps: steps:
- name: PRepare terraform files - name: Prepare terraform files
image: alpine image: alpine
commands: commands:
- "apk update && apk add jq curl git git-crypt" - "apk update && apk add jq curl git git-crypt"
@ -16,29 +16,15 @@ steps:
TF_VAR_prod: "true" TF_VAR_prod: "true"
commands: commands:
- "terraform init" - "terraform init"
- "terraform plan -target=module.kubernetes_cluster" - "terraform apply -target=module.kubernetes_cluster -auto-approve"
# - name: Update configmap - name: Push commit
# image: alpine image: alpine
# commands: commands:
# - "apk update && apk add curl" - "apk update && apk add openssh-client git git-crypt"
# - "head terraform.tfstate" - "mkdir ~/.ssh && ssh-keyscan -H github.com >> ~/.ssh/known_hosts"
# plan: true - 'chmod 400 secrets/deploy_key'
# root_dir: "/data/src" - "git add ."
# var_files: - "git remote set-url origin git@github.com:ViktorBarzin/infra.git"
# - "/terraform.tfvars" - "git commit -m 'Drone CI deploy commit' || echo 'No changes'"
# remote: - "GIT_SSH_COMMAND='ssh -i ./secrets/deploy_key -o IdentitiesOnly=yes' git push origin master"
# backend:
# ---
# kind: secret
# name: tfstate
# get:
# path: tfstate-default-state
# name: tfstate
# ---
# kind: secret
# name: tfstate
# data: zQSRlrUlUyY/lJL4AADpjTt+CfLmybuZqI4uHbPKv8kn2Aq4jomsNmseYgvrxbOF

View file

@ -292,22 +292,6 @@ resource "kubernetes_deployment" "drone_runner" {
value = "true" value = "true"
} }
} }
# volume {
# name = "tfvars"
# config_map {
# name = "tfvars"
# }
# }
# volume {
# name = "data"
# iscsi {
# target_portal = "iscsi.viktorbarzin.lan:3260"
# fs_type = "ext4"
# iqn = "iqn.2020-12.lan.viktorbarzin:storage:drone:tfstate"
# lun = 0
# read_only = false
# }
# }
} }
} }
} }