feat(ci): add renovate cron
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Peter 2023-07-18 18:36:33 +00:00
parent e9e41fb245
commit e477483e9c
4 changed files with 27 additions and 121 deletions

View file

@ -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

View file

@ -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

View file

@ -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 ./...

View file

@ -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 ./...
- 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