From e6b3321c2ab4981193f9e2d72ee6101009a0664d Mon Sep 17 00:00:00 2001 From: Kasper Juul Hermansen Date: Thu, 27 Oct 2022 06:31:33 +0000 Subject: [PATCH 1/2] Update all dependencies --- docker-compose.yml | 4 ++-- infrastructure/create-resources/provider.tf | 2 +- services/db/migrations/Dockerfile | 2 +- services/entry/Dockerfile | 2 +- services/entry/go.mod | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d7c2b78..8e89d96 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -55,7 +55,7 @@ services: # Logging loki: - image: grafana/loki:2.4.2 + image: grafana/loki:2.6.1 ports: - 3100 networks: @@ -66,7 +66,7 @@ services: logging: *loki-logging promtail: - image: grafana/promtail:2.4.2 + image: grafana/promtail:2.6.1 volumes: - ./services/logs/promtail/config.yaml:/mnt/config/promtail-config.yaml - /var/lib/docker/containers:/host/containers diff --git a/infrastructure/create-resources/provider.tf b/infrastructure/create-resources/provider.tf index 5c307d3..16df695 100644 --- a/infrastructure/create-resources/provider.tf +++ b/infrastructure/create-resources/provider.tf @@ -2,7 +2,7 @@ terraform { required_providers { hcloud = { source = "hetznercloud/hcloud" - version = "1.32.2" + version = "1.35.2" } } diff --git a/services/db/migrations/Dockerfile b/services/db/migrations/Dockerfile index abe3e50..9a92098 100644 --- a/services/db/migrations/Dockerfile +++ b/services/db/migrations/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17-bullseye +FROM golang:1.19-bullseye RUN go install github.com/jackc/tern@latest diff --git a/services/entry/Dockerfile b/services/entry/Dockerfile index 4e4a14b..ed04049 100644 --- a/services/entry/Dockerfile +++ b/services/entry/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17-bullseye +FROM golang:1.19-bullseye RUN go install github.com/cosmtrek/air@latest # Development don't need this diff --git a/services/entry/go.mod b/services/entry/go.mod index 4dd1610..f43b1da 100644 --- a/services/entry/go.mod +++ b/services/entry/go.mod @@ -1,6 +1,6 @@ module serverctl -go 1.17 +go 1.19 require ( github.com/Microsoft/go-winio v0.4.17 // indirect -- 2.45.2 From 467993dee384bf0ba60ccd6b831bd98008592779 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Thu, 27 Oct 2022 21:58:23 +0200 Subject: [PATCH 2/2] with updated drone --- .drone.yml | 56 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5182e98..ed3cdfb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,30 +1,36 @@ +type: docker kind: pipeline name: Serverctl steps: - - name: terraform plan - image: alpine - environment: - HCLOUD_TOKEN: - from_secret: serverctl_hcloud_token - ACCESS_KEY: - from_secret: serverctl_access_key - SECRET_KEY: - from_secret: serverctl_secret_key - SSH_ZIP_KEY: - from_secret: serverctl_ssh_zip_key - HCLOUD_SSH_KEY_ID: - from_secret: serverctl_hcloud_ssh_key_id + - name: test + image: harbor.front.kjuulh.io/docker-proxy/library/bash:latest commands: - - apk --update add curl zip ansible python3 - - cd infrastructure && ./unzip-ssh-keys.sh "$SSH_ZIP_KEY" && cd .. - - curl --silent --output terraform.zip "https://releases.hashicorp.com/terraform/1.1.6/terraform_1.1.6_linux_amd64.zip" - - unzip terraform.zip ; rm -f terraform.zip; chmod +x terraform - - mkdir -p ${HOME}/bin ; export PATH=${PATH}:${HOME}/bin; mv terraform ${HOME}/bin/ - - terraform -v - - cd infrastructure/create-resources - - terraform init -backend-config="access_key=$ACCESS_KEY" -backend-config="secret_key=$SECRET_KEY" - - terraform validate - - terraform apply -auto-approve -var "hcloud_token=$HCLOUD_TOKEN" -var "pvt_key=../ssh_keys/id_ed25519" -var "pub_key=../ssh_keys/id_ed25519.pub" -var "hcloud_serverctl_ssh_key_id=$HCLOUD_SSH_KEY_ID" - - cd ansible - - ANSIBLE_HOST_KEY_CHECKING=False /usr/bin/ansible-playbook -u root --key-file '../../ssh_keys/id_ed25519' -e 'pub_key=../../ssh_keys/id_ed25519.pub' site.yml + - echo 'Run tests' + # + # - name: terraform plan + # image: alpine + # environment: + # HCLOUD_TOKEN: + # from_secret: serverctl_hcloud_token + # ACCESS_KEY: + # from_secret: serverctl_access_key + # SECRET_KEY: + # from_secret: serverctl_secret_key + # SSH_ZIP_KEY: + # from_secret: serverctl_ssh_zip_key + # HCLOUD_SSH_KEY_ID: + # from_secret: serverctl_hcloud_ssh_key_id + # commands: + # - apk --update add curl zip ansible python3 + # - cd infrastructure && ./unzip-ssh-keys.sh "$SSH_ZIP_KEY" && cd .. + # - curl --silent --output terraform.zip "https://releases.hashicorp.com/terraform/1.1.6/terraform_1.1.6_linux_amd64.zip" + # - unzip terraform.zip ; rm -f terraform.zip; chmod +x terraform + # - mkdir -p ${HOME}/bin ; export PATH=${PATH}:${HOME}/bin; mv terraform ${HOME}/bin/ + # - terraform -v + # - cd infrastructure/create-resources + # - terraform init -backend-config="access_key=$ACCESS_KEY" -backend-config="secret_key=$SECRET_KEY" + # - terraform validate + # - terraform apply -auto-approve -var "hcloud_token=$HCLOUD_TOKEN" -var "pvt_key=../ssh_keys/id_ed25519" -var "pub_key=../ssh_keys/id_ed25519.pub" -var "hcloud_serverctl_ssh_key_id=$HCLOUD_SSH_KEY_ID" + # - cd ansible + # - ANSIBLE_HOST_KEY_CHECKING=False /usr/bin/ansible-playbook -u root --key-file '../../ssh_keys/id_ed25519' -e 'pub_key=../../ssh_keys/id_ed25519.pub' site.yml -- 2.45.2