From e477483e9cbd3e9b1a75339dec0a2a70858a32b2 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Tue, 18 Jul 2023 18:36:33 +0000 Subject: [PATCH] feat(ci): add renovate cron --- .concourse/branch-validate.yml | 64 ---------------------------------- .concourse/tasks/lint.yml | 28 --------------- .concourse/tasks/test.yml | 28 --------------- .drone.yml | 28 ++++++++++++++- 4 files changed, 27 insertions(+), 121 deletions(-) delete mode 100644 .concourse/branch-validate.yml delete mode 100644 .concourse/tasks/lint.yml delete mode 100644 .concourse/tasks/test.yml diff --git a/.concourse/branch-validate.yml b/.concourse/branch-validate.yml deleted file mode 100644 index e876c22..0000000 --- a/.concourse/branch-validate.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -resources: - - name: gapr.git - type: git - icon: github - source: - uri: https://code.icb4dc0.de/prskr/gapr.git - branch: ((branch)) - - - name: templates.git - type: git - icon: github - source: - uri: https://code.icb4dc0.de/prskr/pipeline-templates.git - -jobs: - - name: validate - plan: - - get: gapr.git - trigger: true - - get: templates.git - - task: lint - file: gapr.git/.concourse/tasks/lint.yml - input_mapping: {repo: gapr.git} - on_success: - task: report-success - file: templates.git/tasks/gitea-status.yml - input_mapping: {repo: gapr.git} - vars: - project_path: prskr/gapr - context: concourse-ci/lint/golangci-lint - description: Lint Go files - state: success - on_failure: - task: report-failure - file: templates.git/tasks/gitea-status.yml - input_mapping: {repo: gapr.git} - vars: - project_path: prskr/gapr - context: concourse-ci/lint/golangci-lint - description: Lint Go files - state: failure - - task: test - file: gapr.git/.concourse/tasks/test.yml - privileged: true - input_mapping: {repo: gapr.git} - on_success: - task: report-success - file: templates.git/tasks/gitea-status.yml - input_mapping: {repo: gapr.git} - vars: - project_path: prskr/gapr - context: concourse-ci/test/gotestsum - description: Run unit tests - state: success - on_failure: - task: report-failure - file: templates.git/tasks/gitea-status.yml - input_mapping: {repo: gapr.git} - vars: - project_path: prskr/gapr - context: concourse-ci/test/gotestsum - description: Run unit tests - state: failure diff --git a/.concourse/tasks/lint.yml b/.concourse/tasks/lint.yml deleted file mode 100644 index 9513e64..0000000 --- a/.concourse/tasks/lint.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -platform: linux - -image_resource: - type: registry-image - source: - repository: docker.io/golangci/golangci-lint - tag: latest - -inputs: - - name: repo - path: . - -params: - GO111MODULE: "on" - CGO_ENABLED: "0" - GOMEMLIMIT: "1150MiB" - GITEA_TOKEN: ((gitea-credentials.token)) - -container_limits: - memory: 1258291200 # 1200MB - -run: - path: bash - args: - - -ce - - | - golangci-lint run -v diff --git a/.concourse/tasks/test.yml b/.concourse/tasks/test.yml deleted file mode 100644 index 7989819..0000000 --- a/.concourse/tasks/test.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -platform: linux - -image_resource: - type: registry-image - source: - repository: docker.io/golang - tag: 1.20-buster - -inputs: - - name: repo - path: . - -params: - GO111MODULE: "on" - CGO_ENABLED: "1" - GOMEMLIMIT: "1150MiB" - GITEA_TOKEN: ((gitea-credentials.token)) - -container_limits: - memory: 1258291200 # 1200MB - -run: - path: bash - args: - - -ce - - | - go run gotest.tools/gotestsum@latest -f pkgname-and-test-fails -- -race -shuffle=on ./... diff --git a/.drone.yml b/.drone.yml index f52c776..dcafc65 100644 --- a/.drone.yml +++ b/.drone.yml @@ -17,4 +17,30 @@ steps: image: docker.io/golang:1.20-buster commands: - go mod download - - go run gotest.tools/gotestsum@latest -f pkgname-and-test-fails -- -race -shuffle=on ./... \ No newline at end of file + - go run gotest.tools/gotestsum@latest -f pkgname-and-test-fails -- -race -shuffle=on ./... + +--- +kind: pipeline +type: docker +name: housekeeping + +trigger: + event: + - cron + cron: + - housekeeping + +steps: + - name: Renovate + image: code.icb4dc0.de/prskr/ci-images/renovate:latest + commands: + - renovate "${DRONE_REPO}" + environment: + RENOVATE_TOKEN: + from_secret: gitea_token + GITHUB_COM_TOKEN: + from_secret: github_token + RENOVATE_PLATFORM: gitea + RENOVATE_AUTODISCOVER: "false" + RENOVATE_ENDPOINT: https://code.icb4dc0.de/api/v1 + LOG_LEVEL: info \ No newline at end of file