Skip to content

Commit

Permalink
Fixes workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
djschleen committed May 22, 2022
1 parent 5f6618e commit 303d0a3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 25 deletions.
28 changes: 16 additions & 12 deletions .hookz.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
version: 2.3.0
version: 2.4.0
sources:
- source: github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest
- source: github.com/devops-kung-fu/lucha@latest
- source: github.com/devops-kung-fu/hinge@latest
- source: github.com/kisielk/errcheck@latest
- source: golang.org/x/lint/golint@latest
- source: github.com/fzipp/gocyclo/cmd/gocyclo@latest
hooks:
- type: pre-commit
actions:
- name: "git: Pull (Ensure there are no upstream changes that are not local)"
exec: git
args: ["pull"]
- name: "go: Tidy (Recursive)"
script: "
#!/bin/bash \n
echo -e Tidying all found go.mod occurrences\n
find . -name go.mod -print0 | xargs -0 -n1 dirname | xargs -L 1 bash -c 'cd \"$0\" && pwd && go mod tidy' \n
"
args: ["pull"]
- name: "go: Tidy mod file"
exec: go
args: ["mod", "tidy"]
- name: "go: Update all dependencies to latest"
exec: go
args: ["get", "-u", "./..."]
Expand All @@ -20,12 +24,15 @@
- name: "golint: Lint all go files"
exec: golint
args: ["./..."] #to error out, add the arg "-set_exit_status"
- name: "errcheck: Check that errors are checked"
- name: "errcheck: Ensure that errors are checked"
exec: errcheck
args: ["-ignoretests", "./..."]
- name: "gocyclo: Check cyclomatic complexities"
exec: gocyclo
args: ["-over", "7", "."]
- name: Hinge
exec: hinge
args: ["."]
- name: "go: Build (Ensure pulled modules do not break the build)"
exec: go
args: ["build", "-v"]
Expand All @@ -38,9 +45,6 @@
- name: "cyclone-dx: Generate a Software Bill of Materials (SBoM)"
exec: cyclonedx-gomod
args: ["app", "-json", "-output", "gardener-sbom.json"]
- name: Hinge
url: https://github.com/devops-kung-fu/hinge/releases/download/v0.1.1/hinge-0.1.1-%%PLATFORM%%-amd64
args: ["."]
- name: "git: Add all changed files during the pre-commit stage"
exec: git
args: ["add", "."]
24 changes: 12 additions & 12 deletions gardener-sbom.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"bomFormat": "CycloneDX",
"specVersion": "1.4",
"serialNumber": "urn:uuid:b4cd9679-51dc-414f-8578-538a9de77ee3",
"serialNumber": "urn:uuid:da31ef82-1a48-441d-9e48-c7c054b35337",
"version": 1,
"metadata": {
"timestamp": "2022-04-18T21:10:46-06:00",
"timestamp": "2022-05-22T13:37:24-06:00",
"tools": [
{
"vendor": "CycloneDX",
Expand All @@ -13,23 +13,23 @@
"hashes": [
{
"alg": "MD5",
"content": "3608f1314d2c9593715b014e703ed4c7"
"content": "fef17a9f71e43c899c3b0cb179fdbd1d"
},
{
"alg": "SHA-1",
"content": "0c158788c3d29a4f7ec956d9ad00b39af3e26766"
"content": "1a28e1a8992dc85ed1e7b9662098d2f2209f3b42"
},
{
"alg": "SHA-256",
"content": "d09fb57bb683db1a5f6a242147137b4b2572e37330d04e5425fbe13e2dec802d"
"content": "0f77e1e26d8ac88e210b19f67095a3068bf33e9216a8ce17b9f8f9d7b5c8d014"
},
{
"alg": "SHA-384",
"content": "7989295d54fc827f0fdffa6f692fe407db8f1f2f554eecb2e2acad18c81f9a1ac2c872d1ffe7a9dfadc2f8393c5fc5c7"
"content": "a2d423df9bf4e5a92fcafe2eb9a9a97e4de5d62f7c4b1e002cbba6729546af4ec67251e23770895cace2c1f189c162e7"
},
{
"alg": "SHA-512",
"content": "154c7bb55ac5e8935d8ca3355dfa8984a7923053996f1128d89654e4267149a31f5a29136a0bdb665ee697e0e642b81cc9bafab4c55daccda901676be87124a6"
"content": "1b1ddce1c9d3aa659e428c2afcc9d5f3ba3fca6b507517d3e988ba73515869ee623289c5829e21c9b45bc58dbf1446ee668865dcf47aa0fce503f2d660098228"
}
],
"externalReferences": [
Expand All @@ -45,11 +45,11 @@
}
],
"component": {
"bom-ref": "pkg:golang/github.com/devops-kung-fu/gardener@v0.2.2-0.20210616154015-f028f0cfcc25?type=module",
"bom-ref": "pkg:golang/github.com/devops-kung-fu/gardener@v1.0.1-0.20220419031709-11385b9e115f?type=module",
"type": "application",
"name": "github.com/devops-kung-fu/gardener",
"version": "v0.2.2-0.20210616154015-f028f0cfcc25",
"purl": "pkg:golang/github.com/devops-kung-fu/gardener@v0.2.2-0.20210616154015-f028f0cfcc25?type=module",
"version": "v1.0.1-0.20220419031709-11385b9e115f",
"purl": "pkg:golang/github.com/devops-kung-fu/gardener@v1.0.1-0.20220419031709-11385b9e115f?type=module",
"externalReferences": [
{
"url": "https://github.com/devops-kung-fu/gardener",
Expand All @@ -71,7 +71,7 @@
},
{
"name": "cdx:gomod:build:env:GOVERSION",
"value": "go1.18.1"
"value": "go1.18.2"
}
]
}
Expand Down Expand Up @@ -194,7 +194,7 @@
],
"dependencies": [
{
"ref": "pkg:golang/github.com/devops-kung-fu/gardener@v0.2.2-0.20210616154015-f028f0cfcc25?type=module",
"ref": "pkg:golang/github.com/devops-kung-fu/gardener@v1.0.1-0.20220419031709-11385b9e115f?type=module",
"dependsOn": [
"pkg:golang/github.com/gookit/color@v1.5.0?type=module",
"pkg:golang/github.com/spf13/afero@v1.8.2?type=module",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ require (
github.com/spf13/afero v1.8.2
github.com/spf13/pflag v1.0.5 // indirect
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down

0 comments on commit 303d0a3

Please sign in to comment.