Skip to content

Commit

Permalink
feat: initial version
Browse files Browse the repository at this point in the history
This is mostly copied code from another project with small fixups to
work in a standalone project.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Oct 20, 2022
1 parent a4c2943 commit 2b682ec
Show file tree
Hide file tree
Showing 39 changed files with 5,109 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .codecov.yml
@@ -0,0 +1,18 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2022-10-20T12:09:57Z by kres ef0ba25.

codecov:
require_ci_to_pass: false

coverage:
status:
project:
default:
target: 50%
threshold: 0.5%
base: auto
if_ci_failed: success
patch: off

comment: false
37 changes: 37 additions & 0 deletions .conform.yaml
@@ -0,0 +1,37 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2022-10-20T12:09:57Z by kres ef0ba25.

---
policies:
- type: commit
spec:
dco: true
gpg:
required: true
identity:
gitHubOrganization: siderolabs
spellcheck:
locale: US
maximumOfOneCommit: true
header:
length: 89
imperative: true
case: lower
invalidLastCharacters: .
body:
required: true
conventional:
types: ["chore","docs","perf","refactor","style","test","release"]
scopes: [".*"]
- type: license
spec:
skipPaths:
- .git/
- testdata/
includeSuffixes:
- .go
excludeSuffixes:
- .pb.go
- .pb.gw.go
header: "// This Source Code Form is subject to the terms of the Mozilla Public\u000A// License, v. 2.0. If a copy of the MPL was not distributed with this\u000A// file, You can obtain one at http://mozilla.org/MPL/2.0/.\u000A"
13 changes: 13 additions & 0 deletions .dockerignore
@@ -0,0 +1,13 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2022-10-20T18:46:25Z by kres ef0ba25.

**
!api
!pkg
!go.mod
!go.sum
!.golangci.yml
!README.md
!.markdownlint.json
!.license-header.go.txt
254 changes: 254 additions & 0 deletions .drone.yml
@@ -0,0 +1,254 @@
---
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2022-10-20T12:09:57Z by kres ef0ba25.

kind: pipeline
type: kubernetes
name: default

platform:
os: linux
arch: amd64

steps:
- name: setup-ci
pull: always
image: autonomy/build-container:latest
commands:
- sleep 5
- git fetch --tags
- install-ci-key
- docker buildx create --driver docker-container --platform linux/amd64 --name local --use unix:///var/outer-run/docker.sock
- docker buildx inspect --bootstrap
environment:
SSH_KEY:
from_secret: ssh_key
volumes:
- name: outer-docker-socket
path: /var/outer-run
- name: docker-socket
path: /var/run
- name: buildx
path: /root/.docker/buildx
- name: ssh
path: /root/.ssh

- name: base
pull: always
image: autonomy/build-container:latest
commands:
- make base
volumes:
- name: outer-docker-socket
path: /var/outer-run
- name: docker-socket
path: /var/run
- name: buildx
path: /root/.docker/buildx
- name: ssh
path: /root/.ssh
depends_on:
- setup-ci

- name: unit-tests
pull: always
image: autonomy/build-container:latest
commands:
- make unit-tests
volumes:
- name: outer-docker-socket
path: /var/outer-run
- name: docker-socket
path: /var/run
- name: buildx
path: /root/.docker/buildx
- name: ssh
path: /root/.ssh
depends_on:
- base

- name: unit-tests-race
pull: always
image: autonomy/build-container:latest
commands:
- make unit-tests-race
volumes:
- name: outer-docker-socket
path: /var/outer-run
- name: docker-socket
path: /var/run
- name: buildx
path: /root/.docker/buildx
- name: ssh
path: /root/.ssh
depends_on:
- base

- name: coverage
pull: always
image: autonomy/build-container:latest
commands:
- make coverage
environment:
CODECOV_TOKEN:
from_secret: CODECOV_TOKEN
volumes:
- name: outer-docker-socket
path: /var/outer-run
- name: docker-socket
path: /var/run
- name: buildx
path: /root/.docker/buildx
- name: ssh
path: /root/.ssh
depends_on:
- unit-tests

- name: lint
pull: always
image: autonomy/build-container:latest
commands:
- make lint
volumes:
- name: outer-docker-socket
path: /var/outer-run
- name: docker-socket
path: /var/run
- name: buildx
path: /root/.docker/buildx
- name: ssh
path: /root/.ssh
depends_on:
- base

- name: release-notes
pull: always
image: autonomy/build-container:latest
commands:
- make release-notes
volumes:
- name: outer-docker-socket
path: /var/outer-run
- name: docker-socket
path: /var/run
- name: buildx
path: /root/.docker/buildx
- name: ssh
path: /root/.ssh
when:
event:
- tag
depends_on:
- unit-tests
- coverage
- lint

- name: release
pull: always
image: plugins/github-release
settings:
api_key:
from_secret: github_token
checksum:
- sha256
- sha512
draft: true
files:
- _out/*
note: _out/RELEASE_NOTES.md
volumes:
- name: outer-docker-socket
path: /var/outer-run
- name: docker-socket
path: /var/run
- name: buildx
path: /root/.docker/buildx
- name: ssh
path: /root/.ssh
when:
event:
- tag
depends_on:
- release-notes

services:
- name: docker
image: docker:20.10-dind
entrypoint:
- dockerd
commands:
- --dns=8.8.8.8
- --dns=8.8.4.4
- --mtu=1500
- --log-level=error
privileged: true
volumes:
- name: outer-docker-socket
path: /var/outer-run
- name: docker-socket
path: /var/run
- name: buildx
path: /root/.docker/buildx
- name: ssh
path: /root/.ssh

volumes:
- name: outer-docker-socket
host:
path: /var/ci-docker
- name: docker-socket
temp:
medium: memory
- name: buildx
temp:
medium: memory
- name: ssh
temp:
medium: memory

trigger:
branch:
exclude:
- renovate/*
- dependabot/*

---
kind: pipeline
type: kubernetes
name: notify

platform:
os: linux
arch: amd64

clone:
disable: true

steps:
- name: slack
image: plugins/slack
settings:
channel: proj-talos-maintainers
link_names: true
template: "{{#if build.pull }}\n*{{#success build.status}}✓ Success{{else}}✕ Fail{{/success}}*: {{ repo.owner }}/{{ repo.name }} - <https://github.com/{{ repo.owner }}/{{ repo.name }}/pull/{{ build.pull }}|Pull Request #{{ build.pull }}>\n{{else}}\n*{{#success build.status}}✓ Success{{else}}✕ Fail{{/success}}: {{ repo.owner }}/{{ repo.name }} - Build #{{ build.number }}* (type: `{{ build.event }}`)\n{{/if}}\nCommit: <https://github.com/{{ repo.owner }}/{{ repo.name }}/commit/{{ build.commit }}|{{ truncate build.commit 8 }}>\nBranch: <https://github.com/{{ repo.owner }}/{{ repo.name }}/commits/{{ build.branch }}|{{ build.branch }}>\nAuthor: {{ build.author }}\n<{{ build.link }}|Visit build page>"
webhook:
from_secret: slack_webhook
when:
status:
- success
- failure

trigger:
branch:
exclude:
- renovate/*
- dependabot/*
status:
- success
- failure

depends_on:
- default

...
5 changes: 5 additions & 0 deletions .gitignore
@@ -0,0 +1,5 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2022-10-20T12:09:57Z by kres ef0ba25.

_out

0 comments on commit 2b682ec

Please sign in to comment.