Skip to content

Commit

Permalink
chore: initial version as imported from talos-systems/talos
Browse files Browse the repository at this point in the history
Verbatim copy from `talos-systems/talos/pkg/crypto` plus
build instructions generated by Kres.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
  • Loading branch information
smira authored and talos-bot committed Aug 13, 2020
1 parent 835063e commit 1ff6242
Show file tree
Hide file tree
Showing 13 changed files with 1,766 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2020-08-13T17:14:02Z by kres f4c4987.

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
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2020-08-13T17:40:42Z by kres f4c4987-dirty.

**
!x509
!go.mod
!go.sum
!.golangci.yml
195 changes: 195 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
---
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2020-08-13T17:14:02Z by kres f4c4987.

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: ssh
path: /root/.ssh
- name: buildx
path: /root/.docker/buildx

- 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: ssh
path: /root/.ssh
- name: buildx
path: /root/.docker/buildx
depends_on:
- setup-ci

- 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: ssh
path: /root/.ssh
- name: buildx
path: /root/.docker/buildx
depends_on:
- base

- 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: ssh
path: /root/.ssh
- name: buildx
path: /root/.docker/buildx
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: ssh
path: /root/.ssh
- name: buildx
path: /root/.docker/buildx
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: ssh
path: /root/.ssh
- name: buildx
path: /root/.docker/buildx
depends_on:
- unit-tests

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

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

---
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:
status:
- success
- failure

depends_on:
- default

...
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2020-08-13T17:14:02Z by kres f4c4987.

_out
145 changes: 145 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2020-08-13T17:14:02Z by kres f4c4987.


# options for analysis running
run:
timeout: 10m
issues-exit-code: 1
tests: true
build-tags: []
skip-dirs: []
skip-dirs-use-default: true
skip-files: []
modules-download-mode: readonly

# output configuration options
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
path-prefix: ""


# all available settings of specific linters
linters-settings:
dogsled:
max-blank-identifiers: 2
dupl:
threshold: 150
errcheck:
check-type-assertions: true
check-blank: true
exhaustive:
default-signifies-exhaustive: false
funlen:
lines: 60
statements: 40
gci:
local-prefixes: github.com/talos-systems/crypto
gocognit:
min-complexity: 30
nestif:
min-complexity: 5
goconst:
min-len: 3
min-occurrences: 3
gocritic:
disabled-checks: []
gocyclo:
min-complexity: 20
godot:
check-all: false
godox:
keywords: # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting
- NOTE
- OPTIMIZE # marks code that should be optimized before merging
- HACK # marks hack-arounds that should be removed before merging
gofmt:
simplify: true
goimports:
local-prefixes: github.com/talos-systems/crypto
golint:
min-confidence: 0.8
gomnd:
settings: {}
gomodguard: {}
govet:
check-shadowing: true
enable-all: true
depguard:
list-type: blacklist
include-go-root: false
lll:
line-length: 200
tab-width: 4
maligned:
suggest-new: true
misspell:
locale: US
ignore-words: []
nakedret:
max-func-lines: 30
prealloc:
simple: true
range-loops: true # Report preallocation suggestions on range loops, true by default
for-loops: false # Report preallocation suggestions on for loops, false by default
nolintlint:
allow-unused: false
allow-leading-space: false
allow-no-explanation: []
require-explanation: false
require-specific: true
rowserrcheck: {}
testpackage:
unparam:
check-exported: false
unused:
check-exported: false
whitespace:
multi-if: false # Enforces newlines (or comments) after every multi-line if statement
multi-func: false # Enforces newlines (or comments) after every multi-line function signature
wsl:
strict-append: true
allow-assign-and-call: true
allow-multiline-assign: true
allow-cuddle-declarations: false
allow-trailing-comment: false
force-case-trailing-whitespace: 0
force-err-cuddling: false
allow-separated-leading-comment: false
gofumpt:
extra-rules: false

linters:
enable-all: true
disable:
- gas
- typecheck
- gochecknoglobals
- gochecknoinits
- funlen
- godox
- gomnd
- goerr113
- nestif
disable-all: false
fast: false


issues:
exclude: []
exclude-rules: []
exclude-use-default: false
exclude-case-sensitive: false
max-issues-per-linter: 10
max-same-issues: 3

new: false

severity:
default-severity: error

case-sensitive: false
Loading

0 comments on commit 1ff6242

Please sign in to comment.