Skip to content

Commit

Permalink
Merge branch 'master' into jjtimmons/fix/jsonEncoding-Unmarshal
Browse files Browse the repository at this point in the history
  • Loading branch information
ibarrajo authored Nov 6, 2024
2 parents e400847 + fa329fd commit ba91135
Show file tree
Hide file tree
Showing 207 changed files with 27,204 additions and 9,020 deletions.
141 changes: 101 additions & 40 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,135 @@
# `yq 'explode(.)' .buildkite/pipeline.yml` to view expanded anchors/aliases
container:
kubernetes: &kubernetes
gitEnvFrom:
- secretRef:
name: oss-github-ssh-credentials
sidecars:
- image: us-west1-docker.pkg.dev/ci-compute/buildkite-images/buildkite-dind:v1
volumeMounts:
- mountPath: /var/run/
name: docker-sock
securityContext:
privileged: true
allowPrivilegeEscalation: true
mirrorVolumeMounts: true # CRITICAL: this must be at the same indentation level as sidecars
podSpec: &podSpec
containers:
- &commandContainer
image: us-west1-docker.pkg.dev/ci-compute/buildkite-images/buildkite-command-container:v2
command:
- |-
echo "Command step was not overridden."
exit 1
volumeMounts:
- mountPath: /var/run/
name: docker-sock
resources:
requests:
cpu: 7500m
memory: 28G
volumes:
- name: docker-sock
emptyDir: {}

agents:
queue: "buildkite-gcp"
steps:
- label: "fossa analyze"
agents:
queue: "init"
docker: "*"
command: ".buildkite/scripts/fossa.sh"
- label: ":golang: unit-test"
agents:
queue: "workers"
docker: "*"
command: "make unit_test"
artifact_paths:
- ".build/coverage/*.out"
- ".build/*/coverage/*.out"
- ".build/cover.out"
- ".build/metadata.txt"
plugins:
- kubernetes:
<<: *kubernetes
podSpec:
<<: *podSpec
containers:
- <<: *commandContainer
command:
- |-
make unit_test
.buildkite/scripts/gen_coverage_metadata.sh .build/metadata.txt
- docker-compose#v3.0.0:
run: unit-test
config: docker/buildkite/docker-compose.yml

- label: ":golangci-lint: validate code is clean"
artifact_paths: [ ]
retry:
automatic:
limit: 2
plugins:
- kubernetes:
<<: *kubernetes
podSpec:
<<: *podSpec
containers:
- <<: *commandContainer
command:
- |-
./scripts/golint.sh
- docker-compose#v3.0.0:
run: unit-test
config: docker/buildkite/docker-compose.yml

- label: ":golang: integration-test-sticky-off"
agents:
queue: "workers"
docker: "*"
command: "make integ_test_sticky_off"
artifact_paths:
- ".build/coverage/*.out"
- ".build/*/coverage/*.out"
retry:
automatic:
limit: 1
limit: 2
plugins:
- kubernetes:
<<: *kubernetes
podSpec:
<<: *podSpec
containers:
- <<: *commandContainer
command:
- |-
make integ_test_sticky_off
- docker-compose#v3.0.0:
run: integ-test
config: docker/buildkite/docker-compose.yml

- label: ":golang: integration-test-sticky-on"
agents:
queue: "workers"
docker: "*"
command: "make integ_test_sticky_on"
artifact_paths:
- ".build/coverage/*.out"
- ".build/*/coverage/*.out"
retry:
automatic:
limit: 1
limit: 2
plugins:
- kubernetes:
<<: *kubernetes
podSpec:
<<: *podSpec
containers:
- <<: *commandContainer
command:
- |-
make integ_test_sticky_on
- docker-compose#v3.0.0:
run: integ-test
config: docker/buildkite/docker-compose.yml

- label: ":golang: integration-test-grpc-adapter"
agents:
queue: "workers"
docker: "*"
command: "make integ_test_grpc"
artifact_paths:
- ".build/coverage/*.out"
- ".build/*/coverage/*.out"
retry:
automatic:
limit: 1
limit: 2
plugins:
- kubernetes:
<<: *kubernetes
podSpec:
<<: *podSpec
containers:
- <<: *commandContainer
command:
- |-
make integ_test_grpc
- docker-compose#v3.0.0:
run: integ-test-grpc
config: docker/buildkite/docker-compose.yml

- wait

- label: ":golang: code-coverage"
agents:
queue: "workers"
docker: "*"
command: ".buildkite/scripts/gocov.sh"
plugins:
- docker-compose#v3.0.0:
run: coverage-report
config: docker/buildkite/docker-compose.yml
2 changes: 1 addition & 1 deletion .buildkite/scripts/fossa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -exo pipefail

curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash -s -- -b ~/
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash -s -- -b ~/

~/fossa analyze

Expand Down
31 changes: 31 additions & 0 deletions .buildkite/scripts/gen_coverage_metadata.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

set -ex

# This script generates coverage metadata for the coverage report.
# Output is used by SonarQube integration in Uber and not used by OS repo coverage tool itself.

# Example output:
# commit-sha: 6953daa563e8e44512bc349c9608484cfd4ec4ff
# timestamp: 2024-03-04T19:29:16Z

# Required env variables:
# - BUILDKITE_BRANCH
# - BUILDKITE_COMMIT

output_path="$1"

if [ "$BUILDKITE_BRANCH" != "master" ] && [ "$BUILDKITE_BRANCH" != "origin/master" ]; then
echo "Coverage metadata is only generated for master branch. Current branch: $BUILDKITE_BRANCH"
exit 0
fi

if [ -z "$BUILDKITE_COMMIT" ]; then
echo "BUILDKITE_COMMIT is not set"
exit 1
fi

echo "commit-sha: $BUILDKITE_COMMIT" > "$output_path"
echo "timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$output_path"

echo "Coverage metadata written to $output_path"
21 changes: 0 additions & 21 deletions .buildkite/scripts/gocov.sh

This file was deleted.

18 changes: 0 additions & 18 deletions .fossa.yml

This file was deleted.

6,293 changes: 4,336 additions & 1,957 deletions .gen/go/cadence/cadence.go

Large diffs are not rendered by default.

Loading

0 comments on commit ba91135

Please sign in to comment.