Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wget source component for downloading scan results #61

Closed
wants to merge 108 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
2f98d1c
Tidy up go.mod and vendor dependencies (Part of #62)
ptzianos Jan 26, 2024
dfb2ecc
Delete third_party/{binary|docker|go|k8s|plugins|proto} (Part of #62)
ptzianos Jan 26, 2024
98001cf
Remove plzconfig files (Part of #62)
ptzianos Jan 26, 2024
ef655b2
Remove pleasew script (Part of #62)
ptzianos Jan 26, 2024
93c8964
Cleanup policies from please BUILD files (Part of #62)
ptzianos Jan 28, 2024
a9a1fbc
Remove leftover please build defs (Part of #62)
ptzianos Jan 28, 2024
8072796
Remove all please BUILD files from pkg directory (Part of #62)
ptzianos Jan 26, 2024
219ef11
Remove all please BUILD files from components directory (Part of #62)
ptzianos Jan 26, 2024
6da8f73
Remove all please BUILD files from examples directory (Part of #62)
ptzianos Feb 2, 2024
956d529
Add Helm Charts for all example pipelines (Part of #62)
ptzianos Feb 2, 2024
b0f0317
Fix kustomizations for all example pipelines (Part of #62)
ptzianos Feb 2, 2024
a17803f
Fix parameter names of git source Task (Fixes #70)
ptzianos Jan 31, 2024
85c8d3b
Fix parameter names of producer aggregator task (Fixes #69)
ptzianos Jan 31, 2024
08b9bbb
Fix parameter names of enricher aggregator Task (Fixes #68)
ptzianos Jan 31, 2024
7a82b09
Cleanup kustomize-component-generator (Part of #62)
ptzianos Jan 28, 2024
df0c4e4
Improve error messages generated by kustomize-component-generator (Pa…
ptzianos Jan 31, 2024
3a56920
Allow user to set custom container registry for component images (Fixes
ptzianos Feb 2, 2024
c373dfa
Allow user to set custom tag for Dracon component images (Fixes #71)
ptzianos Feb 2, 2024
16e63f3
Cleanup third_party directory shell scripts and Tekton manifests (Par…
ptzianos Jan 28, 2024
ba92964
Add Bash util script (Part of #62)
ptzianos Feb 2, 2024
b312348
Add scripts for generating TektonCD Helm charts (Part of #62)
ptzianos Feb 2, 2024
8e5f5d8
Add make targets for building component kustomizations (Part of #62)
ptzianos Jan 28, 2024
8f445f8
Add make targets for deploying dev environment (Part of #62)
ptzianos Jan 30, 2024
2171530
Add make targets to fetch and generate Open API schema (Part of #62)
ptzianos Jan 28, 2024
7b2c634
Add make targets for Go protos (Part of #62)
ptzianos Feb 2, 2024
c54c57b
Add make targets for cleaning up repo (Part of #62)
ptzianos Jan 29, 2024
30ff24c
Add make target for generating example Helm templates (Part of #62)
ptzianos Feb 2, 2024
2d64fa0
Allow user to define custom base images for components (Fixes #66)
ptzianos Jan 31, 2024
d975ab3
Add K8s dev deployment manifests and cleanup old build/k8s (Part of #62)
ptzianos Feb 2, 2024
88e57c9
Refresh all component kustomization.yamls (Part of #62)
ptzianos Jan 28, 2024
cf2eb22
Generate all example pipeline runs (Part of #62)
ptzianos Feb 2, 2024
fee09d5
Refactor lint Github action (Fixes #63)
ptzianos Jan 28, 2024
1e0628c
Refactor test Github action (Fixes #73)
ptzianos Jan 28, 2024
13b6cf8
Refactor format Github action (Fixes #65)
ptzianos Jan 28, 2024
e6d9adb
Refactor publish Github action (Part of #74)
ptzianos Jan 29, 2024
76e0ced
Improve code quality for pkg/... (Part of #62)
ptzianos Jan 28, 2024
535930f
Improve code quality for components/... (Part of #62)
ptzianos Jan 28, 2024
5a793ff
Fix lint errors of ensure_hashes command (Part of #62)
ptzianos Jan 28, 2024
5918a66
Add script for setting up KiND cluster (Part of #62)
ptzianos Jan 29, 2024
16e720b
Update docs to reflect new workflows (Part of #62)
ptzianos Jan 28, 2024
2d1e280
Modify repo settings to only allow rebase merging PRs (Part of #62)
ptzianos Jan 30, 2024
377d1d1
delete tag release script (Part of #62)
ptzianos Jan 31, 2024
119fa43
Remove ./build/releases/BUILD (Part of #62)
ptzianos Feb 5, 2024
8243e6b
Homogenise Task command paths (Part of #62)
ptzianos Feb 5, 2024
a41daac
Refactor kustomize component generator to not use SMP
ptzianos Feb 6, 2024
2072d90
Replace kustomize component generator with draconctl
ptzianos Feb 10, 2024
a5c8a9c
Disregard protobuf generated files from lint tests
ptzianos Feb 15, 2024
7403b87
Add missing path from scan-tags
ptzianos Feb 15, 2024
084ac54
remove renaming of task parameters:
northdpole Feb 15, 2024
fe192af
Add make targets for proto files
ptzianos Sep 13, 2023
4d33fa5
Add third_party folder with vendorized Bash scripts
ptzianos Sep 25, 2023
46545a2
Add make targets for formatting and linting
ptzianos Sep 26, 2023
b93bd54
Add make target for open_api schema
ptzianos Sep 26, 2023
c64dee6
Add make target for tektoncd manifest vendoring
ptzianos Sep 26, 2023
6ee2465
Add script and makefile target for mirroring images
ptzianos Sep 26, 2023
dff87a3
Cleanup .gitignore
ptzianos Sep 26, 2023
3183c93
Add make target for tektoncd pipeline YAML
ptzianos Oct 1, 2023
bb79cf7
Add make target for tektoncd Helm Chart
ptzianos Oct 1, 2023
20887e8
Add make target for tektoncd dashboard
ptzianos Oct 1, 2023
ee76c9f
Add make target to build and test go binaries
ptzianos Oct 22, 2023
646378e
Add make target to update release notes
ptzianos Oct 25, 2023
b0c2ba7
Fix Dracon versioning of components
ptzianos Oct 29, 2023
edc9e10
Cleanup kustomize-component-generator BUILD files
ptzianos Nov 5, 2023
a9f79a1
Add make target for building kustomizations with kustomize-component-…
ptzianos Nov 5, 2023
0c7aa49
Add make target for printing variables
ptzianos Nov 12, 2023
8237651
Cleanup third_party/{go,docker,binary} directories
ptzianos Nov 12, 2023
a189e1d
Add Helm charts and make targets for arangodb deployment
ptzianos Nov 20, 2023
26abdef
PHONY fixes
ptzianos Nov 20, 2023
b8b4365
Add make target for deploying nginx
ptzianos Nov 20, 2023
4b9de8e
Add make targets for deploying ES and mongodb
ptzianos Nov 20, 2023
6099627
Add make target for installing PG
ptzianos Nov 20, 2023
611cdec
Add Helm chart for tekton and refactor make targets
ptzianos Nov 24, 2023
c5fcd21
Cleanup all Helm deploying make targets
ptzianos Nov 28, 2023
f164d90
Add make targets for managing component container images
ptzianos Nov 30, 2023
7918eb2
Optimise component build process and cleanup leftover BUILDs
ptzianos Dec 3, 2023
0fda4d4
Fix integration and docs for ES and Kibana deployment
ptzianos Dec 4, 2023
5a4b635
Cleanup policies BUILD files
ptzianos Dec 4, 2023
9b83530
Add configuration for deploying Golang project
ptzianos Dec 4, 2023
2c9ded9
Fix GH workflow command for running tests
ptzianos Jan 16, 2024
9734740
Library and example implementation that extracts code context for any…
northdpole Jan 2, 2024
9f65434
Tidy up go.mod and vendor dependencies
ptzianos Jan 26, 2024
d19c228
Delete third_party/{binary|docker|go|k8s|plugins|proto}
ptzianos Jan 26, 2024
d56486e
Add Helm Charts for all example pipelines
ptzianos Feb 2, 2024
5431afb
Fix kustomizations for all example pipelines
ptzianos Feb 2, 2024
9afdee4
Cleanup kustomize-component-generator
ptzianos Jan 28, 2024
f3dcf2e
Add Bash util script
ptzianos Feb 2, 2024
6cd2851
Add make targets for building component kustomizations
ptzianos Jan 28, 2024
f822160
Add make targets for deploying dev environment
ptzianos Jan 30, 2024
2df51ed
Add make targets to fetch and generate Open API schema
ptzianos Jan 28, 2024
2d984de
Add make targets for Go protos
ptzianos Feb 2, 2024
865a276
Add make targets for cleaning up repo
ptzianos Jan 29, 2024
ae7de5e
Add make target for generating example Helm templates
ptzianos Feb 2, 2024
aa3eba7
Allow user to define custom base images for components
ptzianos Jan 31, 2024
22de1ec
Add K8s dev deployment manifests and cleanup old build/k8s
ptzianos Feb 2, 2024
788c386
Refresh all component kustomization.yamls
ptzianos Jan 28, 2024
79de00b
Generate all example pipeline runs
ptzianos Feb 2, 2024
8394c84
Refactor lint Github action
ptzianos Jan 28, 2024
4eba745
Refactor test Github action
ptzianos Jan 28, 2024
e331a04
Refactor format Github action
ptzianos Jan 28, 2024
ef17ae8
Improve code quality for pkg/...
ptzianos Jan 28, 2024
c59a7c3
Improve code quality for components/...
ptzianos Jan 28, 2024
e84282a
Update docs to reflect new workflows
ptzianos Jan 28, 2024
d32c228
checkmarx producer
northdpole Feb 3, 2024
ba4f233
generate kustomization
northdpole Feb 3, 2024
e0399f3
lint and cleanup
northdpole Feb 3, 2024
95ec454
rebase on makefile pr
northdpole Feb 5, 2024
2d63ce8
wget source component for downloading scan results
northdpole Feb 3, 2024
a066fd2
rename component to reflect usage
northdpole Feb 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ repository:

# Either `true` to allow squash-merging pull requests, or `false` to prevent
# squash-merging.
allow_squash_merge: true
allow_squash_merge: false

# Either `true` to allow merging pull requests with a merge commit, or `false`
# to prevent merging pull requests with merge commits.
allow_merge_commit: false

# Either `true` to allow rebase-merging pull requests, or `false` to prevent
# rebase-merging.
allow_rebase_merge: false
allow_rebase_merge: true

# Either `true` to enable automatic deletion of branches on merge, or `false` to disable
delete_branch_on_merge: true
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@ jobs:
build:
name: Format
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Check out code
uses: actions/checkout@v4

- name: Format
run: ./pleasew fmt-all
- name: Setup Go 1.21.6
uses: actions/setup-go@v4
with:
go-version: 1.21.6

- name: Format
run: make install-lint-tools fmt && test $(git diff -p | wc -l) -eq 0
17 changes: 5 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ on:
branches:
- main

env:
PLZ_CONFIG_PROFILE: ci
SEGMENT_DOWNLOAD_TIMEOUT_MINS: "2"

permissions:
# Grant the ability to checkout the repository
contents: read
Expand All @@ -25,17 +21,14 @@ jobs:
cancel-in-progress: true
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache plz
id: cache-plz
uses: actions/cache@v3
- name: Setup Go 1.21.6
uses: actions/setup-go@v4
with:
path: .plz-cache
key: ${{ runner.os }}-plz
go-version: 1.21.6

- name: Lint
env:
REVIEWDOG_GITHUB_API_TOKEN: "${{ github.token }}"
GOLANGCI_LINT_CACHE: "${{ github.workspace }}/.golangci-lint-cache"
run: "./pleasew -p -v=2 lint"
run: go install github.com/reviewdog/reviewdog/cmd/reviewdog@latest && make install-lint-tools lint
28 changes: 2 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,15 @@ on:
- 'v*'
branches:
- main
# Trigger, but do nothing in PRs so we can check that the workflow is valid.
pull_request:
branches:
- main

env:
PLZ_CONFIG_PROFILE: ci

permissions:
# Grant the ability to checkout the repository
contents: read

jobs:
pre-release:
name: Publish
if: github.event_name != 'pull_request' && github.ref_type == 'tag'
runs-on: ubuntu-latest
permissions:
# Grant the ability to create GitHub Releases.
contents: write
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Create pre-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./pleasew run //build/releases:pre-release

push-docker-images:
publish-docker-images:
name: Push Docker images
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
permissions:
# Grant the ability to write to GitHub Packages (push Docker images to
# GitHub Container Registry).
Expand All @@ -56,4 +32,4 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Publish Docker images
run: ./pleasew run //build/releases:publish-images
run: make publish-component-containers
40 changes: 7 additions & 33 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,11 @@ on:
branches:
- main

env:
PLZ_CONFIG_PROFILE: ci
SEGMENT_DOWNLOAD_TIMEOUT_MINS: "2"

permissions:
# Grant the ability to checkout the repository
contents: read

jobs:
build:
name: Build
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-build
cancel-in-progress: true
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Cache plz
id: cache-plz
uses: actions/cache@v3
with:
path: .plz-cache
key: ${{ runner.os }}-plz

- name: Build
env:
# This uses a public read-only PAT tied to VJftw, please don't abuse! :pray:
# See: https://github.com/actions/setup-node/issues/49 for reasons.
GITHUB_TOKEN: ${{ secrets.VJFTW_GITHUB_TOKEN }}
CONSUMER_JIRA_API_TOKEN: ${{secrets.CONSUMER_JIRA_API_TOKEN}}
CONSUMER_JIRA_USER: ${{secrets.CONSUMER_JIRA_USER}}
CONSUMER_JIRA_URL: ${{secrets.CONSUMER_JIRA_URL}}
run: ./pleasew build -p -v 2 //...

test:
name: Test
runs-on: ubuntu-latest
Expand All @@ -52,7 +21,12 @@ jobs:
cancel-in-progress: true
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go 1.21.6
uses: actions/setup-go@v4
with:
go-version: 1.21.6

- name: Test
run: ./pleasew test //...
run: make test
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/dist/
/vendor/
__pycache__
*.pyc
**/node_modules/
.plz_clean*

# Entries below this point are managed by Please (DO NOT EDIT)
plz-out
.plzconfig.local
bin
.custom_image
65 changes: 0 additions & 65 deletions .plzconfig

This file was deleted.

3 changes: 0 additions & 3 deletions .plzconfig.ci

This file was deleted.

57 changes: 30 additions & 27 deletions .reviewdog.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,45 @@
---
runner:
go/vet:
cmd: go vet $(go list ./... | grep -v /vendor/)
format: govet

go/staticcheck:
cmd: |
./pleasew run //third_party/binary/dominikh/go-tools:staticcheck -- $(./pleasew query alltargets --include go | grep -v "//third_party/" | cut -f3- -d/ | cut -f1 -d: | awk '{ print "./" $0 }' | xargs)
errorformat:
- '%E%f:%l:%c: %m'
cmd: staticcheck $(go list ./... | grep -v /vendor/)
format: staticcheck

go/revive:
cmd: |
./pleasew run //third_party/binary/mgechev/revive:revive -- $(./pleasew query alltargets --include go | grep -v "//third_party/" | cut -f3- -d/ | cut -f1 -d: | awk '{ print "./" $0 }' | xargs)
cmd: revive -exclude ./vendor/... -config revive.toml ./...
errorformat:
- '%E%f:%l:%c: %m'

go/vet:
cmd: |
./pleasew run "//third_party/go:toolchain|go" -- vet $(./pleasew query alltargets --include go | grep -v "//third_party/" | cut -f3- -d/ | cut -f1 -d: | awk '{ print "./" $0 }' | xargs)
- '%f:%l:%c: %m'

go/containedctx:
cmd: go vet -vettool=$(which containedctx) $(go list ./... | grep -v /vendor/)
errorformat:
- '%E%f:%l:%c: %m'
- '%f:%l:%c: %m'

go/gosec:
cmd: |
./pleasew run //third_party/binary/securego/gosec:gosec -- -fmt golint $(./pleasew query alltargets --include go | grep -v "//third_party/" | cut -f3- -d/ | cut -f1 -d: | awk '{ print "./" $0 }' | xargs)
go/ineffassign:
cmd: ineffassign $(go list ./... | grep -v /vendor/)
errorformat:
- '%E%f:%l:%c: %m'
- '%f:%l:%c: %m'

go/fmt:
cmd: |
./pleasew run //third_party/go/mvdan.cc/gofumpt:gofumpt -- -d $(./pleasew query alltargets --include go | grep -v "//third_party/" | cut -f3- -d/ | cut -f1 -d: | awk '{ print "./" $0 }' | xargs)
format: diff
level: error
go/errorlint:
cmd: go-errorlint -errorf-multi -errorf -test $(go list ./... | grep -v /vendor/)
errorformat:
- '%f:%l:%c: %m'

buf_lint:
cmd: ./pleasew run "//third_party/binary/bufbuild/buf:buf|buf" -- lint --path api/
level: error
go/errcheck:
cmd: errcheck -asserts -blank $(go list ./... | grep -v /vendor/)
errorformat:
- '%f:%l:%c:%m'

buf_format:
cmd: ./pleasew run "//third_party/binary/bufbuild/buf:buf|buf" -- format --diff --path api/
format: diff
# TODO: figure out how to set errorformat to parse the error output
# actionlint:
# cmd: actionlint
# errorformat:
# -

buf_lint:
cmd: buf lint . --path ./api/
level: error
format: buf
Loading
Loading