Skip to content

Commit

Permalink
chore: test ci
Browse files Browse the repository at this point in the history
test ci.

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Apr 18, 2024
1 parent 7c5ed1e commit d1c7946
Show file tree
Hide file tree
Showing 8 changed files with 225 additions and 72 deletions.
40 changes: 27 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-03-11T06:25:06Z by kres latest.
# Generated on 2024-04-18T16:22:00Z by kres 92eef68-dirty.

name: default
concurrency:
Expand All @@ -13,7 +13,10 @@ concurrency:
- release-*
tags:
- v*
workflow_dispatch:
pull_request:
branches:
- main
- release-*
jobs:
default:
permissions:
Expand All @@ -30,7 +33,7 @@ jobs:
labels: ${{ steps.retrieve-pr-labels.outputs.result }}
services:
buildkitd:
image: moby/buildkit:v0.12.5
image: moby/buildkit:v0.13.1
options: --privileged
ports:
- 1234:1234
Expand All @@ -44,12 +47,21 @@ jobs:
run: |
git fetch --prune --unshallow
- name: Set up Docker Buildx
id: setup-buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: tcp://127.0.0.1:1234
buildkitd-flags: --debug
timeout-minutes: 1
timeout-minutes: 10
- name: Set secrets for job
run: |
sops -d .secrets.yaml | yq '.secrets | to_entries[] | .key + "=" + .value' >> "$GITHUB_ENV"
- name: mask secrets
run: |
echo -e "$(sops -d .secrets.yaml | yq '.secrets | to_entries[] | "::add-mask::" + .value')"
- name: base-d
run: |
echo $FOO
- name: base
run: |
make base
Expand Down Expand Up @@ -86,12 +98,12 @@ jobs:
run: |
make image-roller-derby
- name: push-roller-derby-latest
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
env:
PLATFORM: linux/amd64,linux/arm64
PUSH: "true"
run: |
make image-roller-derby TAG=latest
make image-roller-derby IMAGE_TAG=latest
- name: dummy
run: |
make dummy
Expand Down Expand Up @@ -136,7 +148,7 @@ jobs:
- default
services:
buildkitd:
image: moby/buildkit:v0.12.5
image: moby/buildkit:v0.13.1
options: --privileged
ports:
- 1234:1234
Expand All @@ -150,11 +162,12 @@ jobs:
run: |
git fetch --prune --unshallow
- name: Set up Docker Buildx
id: setup-buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: tcp://localhost:1234
timeout-minutes: 1
endpoint: tcp://127.0.0.1:1234
timeout-minutes: 10
- name: dummy
run: |
make dummy
Expand All @@ -166,7 +179,7 @@ jobs:
- default
services:
buildkitd:
image: moby/buildkit:v0.12.5
image: moby/buildkit:v0.13.1
options: --privileged
ports:
- 1234:1234
Expand All @@ -180,11 +193,12 @@ jobs:
run: |
git fetch --prune --unshallow
- name: Set up Docker Buildx
id: setup-buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: tcp://localhost:1234
timeout-minutes: 1
endpoint: tcp://127.0.0.1:1234
timeout-minutes: 10
- name: dummy
run: |
make dummy
92 changes: 92 additions & 0 deletions .github/workflows/slack-notify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-04-18T16:20:19Z by kres 92eef68-dirty.

name: slack-notify
"on":
workflow_run:
workflows:
- default
types:
- completed
jobs:
slack-notify:
runs-on:
- self-hosted
- generic
if: github.event.workflow_run.conclusion != 'skipped'
steps:
- name: Get PR number
id: get-pr-number
if: github.event.workflow_run.event == 'pull_request'
env:
GH_TOKEN: ${{ github.token }}
run: |
echo pull_request_number=$(gh pr view -R ${{ github.repository }} ${{ github.event.workflow_run.head_repository.owner.login }}:${{ github.event.workflow_run.head_branch }} --json number --jq .number) >> $GITHUB_OUTPUT
- name: Slack Notify
uses: slackapi/slack-github-action@v1
with:
channel-id: proj-talos-maintainers
payload: |
{
"attachments": [
{
"color": "${{ github.event.workflow_run.conclusion == 'success' && '#2EB886' || github.event.workflow_run.conclusion == 'failure' && '#A30002' || '#FFCC00' }}",
"fallback": "test",
"blocks": [
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "${{ github.event.workflow_run.event == 'pull_request' && format('*Pull Request:* {0} (`{1}`)\n<{2}/pull/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, steps.get-pr-number.outputs.pull_request_number, github.event.workflow_run.display_title) || format('*Build:* {0} (`{1}`)\n<{2}/commit/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, github.sha, github.event.workflow_run.display_title) }}"
},
{
"type": "mrkdwn",
"text": "*Status:*\n`${{ github.event.workflow_run.conclusion }}`"
}
]
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Author:*\n`${{ github.actor }}`"
},
{
"type": "mrkdwn",
"text": "*Event:*\n`${{ github.event.workflow_run.event }}`"
}
]
},
{
"type": "divider"
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Logs"
},
"url": "${{ github.event.workflow_run.html_url }}"
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Commit"
},
"url": "${{ github.event.repository.html_url }}/commit/${{ github.sha }}"
}
]
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
78 changes: 30 additions & 48 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-03-10T20:17:55Z by kres latest.
# Generated on 2024-04-18T16:20:19Z by kres 92eef68-dirty.

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

# output configuration options
output:
format: colored-line-number
formats:
- format: colored-line-number
path: stdout
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
Expand All @@ -32,54 +31,38 @@ linters-settings:
check-blank: true
exhaustive:
default-signifies-exhaustive: false
funlen:
lines: 60
statements: 40
gci:
local-prefixes: github.com/siderolabs/roller-derby/
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(github.com/siderolabs/roller-derby/) # Custom section: groups all imports with the specified Prefix.
gocognit:
min-complexity: 30
ireturn:
allow:
- anon
- error
- empty
- stdlib
- github.com\/talos-systems\/kres\/internal\/dag.Node
nestif:
min-complexity: 5
goconst:
min-len: 3
min-occurrences: 3
gocritic:
disabled-checks: []
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
scope: declarations
gofmt:
simplify: true
goimports:
local-prefixes: github.com/siderolabs/roller-derby/
golint:
min-confidence: 0.8
gomnd:
settings: {}
gomodguard: {}
gomodguard: { }
gomnd: { }
govet:
check-shadowing: true
enable-all: true
lll:
line-length: 200
tab-width: 4
misspell:
locale: US
ignore-words: []
ignore-words: [ ]
nakedret:
max-func-lines: 30
prealloc:
Expand All @@ -88,16 +71,15 @@ linters-settings:
for-loops: false # Report preallocation suggestions on for loops, false by default
nolintlint:
allow-unused: false
allow-leading-space: false
allow-no-explanation: []
allow-no-explanation: [ ]
require-explanation: false
require-specific: true
rowserrcheck: {}
testpackage: {}
rowserrcheck: { }
testpackage: { }
unparam:
check-exported: false
unused:
check-exported: false
local-variables-are-used: 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
Expand All @@ -113,8 +95,8 @@ linters-settings:
gofumpt:
extra-rules: false
cyclop:
# the maximal code complexity to report
max-complexity: 20
# the maximal code complexity to report
max-complexity: 20
# depguard:
# Main:
# deny:
Expand All @@ -125,48 +107,48 @@ linters:
disable-all: false
fast: false
disable:
- exhaustruct
- exhaustivestruct
- exhaustruct
- forbidigo
- funlen
- gas
- gochecknoglobals
- gochecknoinits
- godox
- goerr113
- gomnd
- gomoddirectives
- gosec
- inamedparam
- ireturn
- nestif
- nonamedreturns
- nosnakecase
- paralleltest
- tagalign
- tagliatelle
- thelper
- typecheck
- varnamelen
- wrapcheck
- depguard # Disabled because starting with golangci-lint 1.53.0 it doesn't allow denylist alone anymore
- tagalign
- inamedparam
- testifylint # complains about our assert recorder and has a number of false positives for assert.Greater(t, thing, 1)
- protogetter # complains about us using Value field on typed spec, instead of GetValue which has a different signature
- perfsprint # complains about us using fmt.Sprintf in non-performance critical code, updating just kres took too long
# abandoned linters for which golangci shows the warning that the repo is archived by the owner
- deadcode
- golint
- ifshort
- interfacer
- maligned
- golint
- scopelint
- varcheck
- deadcode
- structcheck
- ifshort
- varcheck
# disabled as it seems to be broken - goes into imported libraries and reports issues there
- musttag

issues:
exclude: []
exclude-rules: []
exclude: [ ]
exclude-rules: [ ]
exclude-use-default: false
exclude-case-sensitive: false
max-issues-per-linter: 10
Expand Down
Loading

0 comments on commit d1c7946

Please sign in to comment.