Skip to content

Commit

Permalink
Tidy up cloudbuild & presubmit
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter committed Sep 14, 2023
1 parent 158d00c commit 41dd047
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
18 changes: 4 additions & 14 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ steps:
args:
- '-exc'
- |
./scripts/presubmit.sh --cloud-build --coverage --no-linters --no-actions --no-docker --no-serverless-wasm
./scripts/presubmit.sh --cloud-build --coverage --no-linters --no-actions --no-docker
# Check re-generation didn't change anything.
echo "Checking that generated files are the same as checked-in versions."
git diff -- --exit-code
Expand All @@ -82,7 +82,7 @@ steps:
args:
- '-exc'
- |
./scripts/presubmit.sh --cloud-build --no-build --no-generate --no-actions --no-docker --no-serverless-wasm
./scripts/presubmit.sh --cloud-build --no-build --no-generate --no-actions --no-docker
waitFor: ['go-get-proto', 'go-get-proto-gen']

# Build serverless actions
Expand All @@ -92,17 +92,7 @@ steps:
args:
- '-exc'
- |
./scripts/presubmit.sh --cloud-build --no-build --no-linters --no-generate --no-docker --no-serverless-wasm
waitFor: ['go-get-proto', 'go-get-proto-gen']

# Build serverless wasm
- name: gcr.io/$PROJECT_ID/testbase
entrypoint: 'bash'
id: 'presubmit-build-serverless-wasm'
args:
- '-exc'
- |
./scripts/presubmit.sh --cloud-build --no-build --no-linters --no-generate --no-docker --no-actions
./scripts/presubmit.sh --cloud-build --no-build --no-linters --no-generate --no-docker
waitFor: ['go-get-proto', 'go-get-proto-gen']

# Build docker images
Expand All @@ -112,7 +102,7 @@ steps:
args:
- '-exc'
- |
./scripts/presubmit.sh --cloud-build --no-build --no-linters --no-generate --no-actions --no-serverless-wasm
./scripts/presubmit.sh --cloud-build --no-build --no-linters --no-generate --no-actions
waitFor: ['go-get-proto', 'go-get-proto-gen']

# Test the USB Armory code as best we can
Expand Down
9 changes: 0 additions & 9 deletions scripts/presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ main() {
local run_build=1
local build_actions=1
local build_docker=1
local build_serverless_wasm=1
local run_lint=1
local run_generate=1
while [[ $# -gt 0 ]]; do
Expand Down Expand Up @@ -66,9 +65,6 @@ main() {
--no-docker)
build_docker=0
;;
--no-serverless-wasm)
build_serverless_wasm=0
;;
--cloud-build)
flag_cloud_build=1
;;
Expand Down Expand Up @@ -138,11 +134,6 @@ main() {
done
fi

if [[ "${build_serverless_wasm}" -eq 1 ]]; then
echo "Building serverless wasm ===================="
GOOS=js GOARCH=wasm go build -o /tmp/main.wasm -tags wasm ./serverless/experimental/wasm/
fi

if [[ "${run_lint}" -eq 1 ]]; then
check_cmd golangci-lint \
'have you installed github.com/golangci/golangci-lint?' || exit 1
Expand Down

0 comments on commit 41dd047

Please sign in to comment.