forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add CI and project.yml (open-telemetry#1)
* add CI and project.yml * add caching * add lint check * add lint check * rearrange steps * rearrange steps and generify CI job for any component * rearrange steps and generify CI job for any component * add MANDATORY_REVIEWERS
- Loading branch information
Showing
6 changed files
with
115 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
third-party/observability |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This Dockerfile describes the container in which to run your CI jobs. | ||
# You can install whatever dependencies you'd like in this Dockerfile, | ||
# and you can even define more Dockerfiles if you have multiple jobs | ||
# that need to run in different environments! | ||
# | ||
# By default, CI Dockerfiles are built with an empty build context. You | ||
# can configure a custom build context in your job. | ||
# | ||
# Questions? Visit air.bb/ci-docs or ask a question on Stack Overflow with | ||
# the tag #continuous-integration. | ||
|
||
FROM 172631448019.dkr.ecr.us-east-1.amazonaws.com/ubuntu1804:2024-01-09-5ed90b7b | ||
|
||
######### install go | ||
ARG GO_VERSION=1.20.13 | ||
RUN /jorb/scripts/install-go.sh ${GO_VERSION} | ||
######### | ||
|
||
# Set up Gopath for caching | ||
WORKDIR /go | ||
ENV GOPATH=/go | ||
ENV GOMAXTHREADS=3 | ||
ENV PATH="/usr/local/go/bin:$GOPATH/bin:$PATH" | ||
ENV GO=go | ||
|
||
# Delete forward-udp to enable statsd_receiver testing | ||
RUN rm -f /usr/local/bin/forward-udp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
# Generated by: onetouch-gen v1.26.3 (titanic: e28693593a57d500d94cdd97ceddff82c776522a) | ||
|
||
# This file configures your CI jobs to run when you push your branch. | ||
# In this file, you can define build matrices, dependencies between | ||
# jobs, resource requests, timeouts, parallelism, and more! | ||
# | ||
# Questions? Visit air.bb/ci-docs or ask a question on Stack Overflow with | ||
# the tag #continuous-integration. | ||
|
||
jobs: | ||
- name: receiver/statsdreceiver CI Check | ||
path: _infra/ci/jobs/component_ci.yml | ||
options: | ||
env: | ||
COMPONENT_PATH: "receiver/statsdreceiver" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
# Generated by: onetouch-gen v1.26.3 (titanic: e28693593a57d500d94cdd97ceddff82c776522a) | ||
|
||
# This is a simple CI job. A CI job comprises a list of steps that run | ||
# sequentially in a container described by an image or a Dockerfile. | ||
# | ||
# Questions? Visit air.bb/ci-docs or ask a question on Stack Overflow with | ||
# the tag #continuous-integration. | ||
|
||
dockerfile: ../Dockerfile | ||
|
||
steps: | ||
# start: environment setup # | ||
- type: restore_cache | ||
label: Restore cache | ||
cache_key: go-image-{% image_id %}-go-sum-{% checksum files=[go.sum] %} | ||
|
||
- type: run | ||
label: make moddownload | ||
command: | | ||
set -ex | ||
sudo mkdir -p "$GOPATH" | ||
sudo chmod -R ugo+rwX "$GOPATH" | ||
cd $COMPONENT_PATH | ||
make moddownload | ||
- type: run | ||
label: make install-tools | ||
command: make install-tools | ||
|
||
- type: save_cache | ||
label: Save cache | ||
cache_key: go-image-{% image_id %}-go-sum-{% checksum files=[go.sum] %} | ||
paths: | ||
- /go | ||
# end: environment setup # | ||
|
||
# start: go mod tidy, unit tests, and lint # | ||
- type: run | ||
label: Check for go mod dependency changes | ||
command: | | ||
cd $COMPONENT_PATH | ||
make tidy | ||
git diff --exit-code || (echo 'go.mod/go.sum deps changes detected, please run "make gotidy" and commit the changes in this PR.' && exit 1) | ||
- type: run | ||
label: make test | ||
command: | | ||
cd $COMPONENT_PATH | ||
make test | ||
- type: run | ||
label: make lint | ||
command: | | ||
cd $COMPONENT_PATH | ||
make lint | ||
# end: go mod tidy, unit tests, and lint # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# Generated by: onetouch-gen v1.26.3 (titanic: e28693593a57d500d94cdd97ceddff82c776522a) | ||
name: opentelemetry-collector-contrib | ||
description: An Airbnb-specific fork of the opentelemetry-collector-contrib repo | ||
slack: observability | ||
teams: | ||
- 'Airbnb Platform: Infrastructure: Data Platform: Observability' | ||
data_sensitivity: public | ||
additional_owners: [] | ||
type: library | ||
primary_language: golang |