Skip to content

Commit

Permalink
bk pipeline updates (#43)
Browse files Browse the repository at this point in the history
* bk pipeline updates

Signed-off-by: Sarah Funkhouser <[email protected]>

* set  buildplatform

Signed-off-by: Sarah Funkhouser <[email protected]>

* set  buildplatform

Signed-off-by: Sarah Funkhouser <[email protected]>

* Test a different image

Signed-off-by: Sarah Funkhouser <[email protected]>

* remove arg

Signed-off-by: Sarah Funkhouser <[email protected]>

* what

Signed-off-by: Sarah Funkhouser <[email protected]>

* put back

Signed-off-by: Sarah Funkhouser <[email protected]>

* remove agents from top

Signed-off-by: Sarah Funkhouser <[email protected]>

---------

Signed-off-by: Sarah Funkhouser <[email protected]>
  • Loading branch information
golanglemonade authored Dec 15, 2024
1 parent d5e325d commit a0ac114
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 26 deletions.
47 changes: 23 additions & 24 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,14 @@ steps:
environment:
- "GOTOOLCHAIN=auto"
artifact_paths: ["coverage.out"]
- group: ":closed_lock_with_key: Security Checks"
depends_on: "go_test"
key: "security"
steps:
- label: ":closed_lock_with_key: gosec"
key: "gosec"
plugins:
- docker#v5.12.0:
image: "securego/gosec:2.20.0"
command: ["-no-fail", "-exclude-generated", "-fmt sonarqube", "-out", "results.txt", "./..."]
environment:
- "GOTOOLCHAIN=auto"
artifact_paths: ["results.txt"]
- label: ":github: upload PR reports"
key: "scan-upload-pr"
if: build.pull_request.id != null
depends_on: ["gosec", "go_test"]
depends_on: ["go_test"]
plugins:
- artifacts#v1.9.4:
download: "results.txt"
- cluster-secrets#v1.0.0:
variables:
SONAR_TOKEN: SONAR_TOKEN
- artifacts#v1.9.4:
download: "coverage.out"
step: "go_test"
Expand All @@ -61,10 +49,11 @@ steps:
- label: ":github: upload reports"
key: "scan-upload"
if: build.branch == "main"
depends_on: ["gosec", "go_test"]
depends_on: ["go_test"]
plugins:
- artifacts#v1.9.4:
download: results.txt
- cluster-secrets#v1.0.0:
variables:
SONAR_TOKEN: SONAR_TOKEN
- artifacts#v1.9.4:
download: coverage.out
step: "go_test"
Expand Down Expand Up @@ -104,6 +93,13 @@ steps:
#!/bin/bash
ls
plugins:
- cluster-secrets#v1.0.0:
variables:
SECRET_GHCR_PUBLISH_TOKEN: SECRET_GHCR_PUBLISH_TOKEN
- docker-login#v3.0.0:
username: openlane-bender
password-env: SECRET_GHCR_PUBLISH_TOKEN
server: ghcr.io
- theopenlane/docker-metadata#v1.0.0:
images:
- "${IMAGE_REPO}"
Expand All @@ -121,6 +117,7 @@ steps:
ignore-unfixed: true
security-checks: config,secret,vuln
skip-files: "cosign.key,Dockerfile.dev"
trivy-version: "0.57.1"
- label: ":docker: docker build and publish"
key: "docker-build"
cancel_on_build_failing: true
Expand All @@ -134,6 +131,9 @@ steps:
#!/bin/bash
ls
plugins:
- cluster-secrets#v1.0.0:
variables:
SECRET_GHCR_PUBLISH_TOKEN: SECRET_GHCR_PUBLISH_TOKEN
- docker-login#v3.0.0:
username: openlane-bender
password-env: SECRET_GHCR_PUBLISH_TOKEN
Expand All @@ -156,6 +156,7 @@ steps:
ignore-unfixed: true
security-checks: config,secret,vuln
skip-files: "cosign.key,Dockerfile.dev"
trivy-version: "0.57.1"
- label: ":docker: docker build and publish"
key: "docker-build-and-tag"
if: build.tag != null
Expand All @@ -167,6 +168,9 @@ steps:
commands: |
#!/bin/bash
plugins:
- cluster-secrets#v1.0.0:
variables:
SECRET_GHCR_PUBLISH_TOKEN: SECRET_GHCR_PUBLISH_TOKEN
- docker-login#v3.0.0:
username: openlane-bender
password-env: SECRET_GHCR_PUBLISH_TOKEN
Expand All @@ -183,8 +187,3 @@ steps:
platforms: linux/{{matrix.platform}}
build-args:
- NAME=${APP_NAME}
- equinixmetal-buildkite/trivy#v1.19.0:
severity: CRITICAL,HIGH
ignore-unfixed: true
security-checks: config,secret,vuln
skip-files: "cosign.key,Dockerfile.dev"
3 changes: 1 addition & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ sonar.test.inclusions=**/*_test.go
sonar.test.exclusions=**/vendor/**

sonar.sourceEncoding=UTF-8
sonar.go.coverage.reportPaths=coverage.out
sonar.externalIssuesReportPaths=results.txt
sonar.go.coverage.reportPaths=coverage.out

0 comments on commit a0ac114

Please sign in to comment.