-
Notifications
You must be signed in to change notification settings - Fork 423
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
Add devcontainer #3123
Open
esigo
wants to merge
11
commits into
open-telemetry:main
Choose a base branch
from
esigo:3118-devcontainer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add devcontainer #3123
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f8c9a40
add devcontainer
esigo f395d90
grpc
esigo c40abb5
gRPC
esigo ce1e82a
add documentation
esigo 06149eb
fix CI
esigo b589261
Merge branch 'main' into 3118-devcontainer
esigo 07e3a27
fix CI
esigo 964d174
revert unrelated changes
esigo 1eaac26
update CI run instructions
esigo 2e96f94
Merge branch 'main' into 3118-devcontainer
ThomsonTan 29b860a
fix link
esigo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,28 @@ | ||
# Copyright The OpenTelemetry Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
FROM otel/cpp_format_tools | ||
|
||
ARG GRPC_VERSION=v1.55.0 | ||
ARG PROTOBUF_VERSION=23.4 | ||
ARG ABSEIL_CPP_VERSION=20240116.1 | ||
|
||
ENV PROTOBUF_VERSION=${PROTOBUF_VERSION} | ||
ENV ABSEIL_CPP_VERSION=${ABSEIL_CPP_VERSION} | ||
|
||
COPY ci /opt/ci | ||
|
||
RUN apt update && apt install -y wget \ | ||
ninja-build \ | ||
libcurl4-openssl-dev \ | ||
markdownlint | ||
|
||
RUN cd /opt/ci && bash setup_cmake.sh | ||
RUN cd /opt/ci && bash setup_ci_environment.sh | ||
RUN cd /opt && bash ci/setup_googletest.sh \ | ||
&& bash ci/setup_grpc.sh -r ${GRPC_VERSION} | ||
|
||
ADD https://github.com/bazelbuild/bazelisk/releases/download/v1.22.1/bazelisk-linux-amd64 /usr/local/bin | ||
|
||
RUN git config --global core.autocrlf input \ | ||
&& chmod +x /usr/local/bin/bazelisk-linux-amd64 |
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,26 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.162.0/containers/javascript-node | ||
{ | ||
"name": "opentelemetry-cpp", | ||
"build": { | ||
"context": "..", | ||
"dockerfile": "Dockerfile.dev", | ||
"args": { | ||
"GRPC_VERSION": "v1.55.0", | ||
"PROTOBUF_VERSION": "23.4", | ||
"ABSEIL_CPP_VERSION":"20240116.1" | ||
} | ||
}, | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/sh" | ||
}, | ||
"extensions": [ | ||
"ms-vscode.cpptools", | ||
"ms-azuretools.vscode-docker", | ||
"ms-vscode.cpptools-extension-pack" | ||
], | ||
|
||
"remoteUser": "root" | ||
} |
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
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# Building and running tests as a developer | ||
|
||
CI tests can be run on docker by invoking the script `./ci/run_docker.sh | ||
./ci/do_ci.sh {TARGET}` where the targets are: | ||
CI tests can be run inside | ||
[devcontainer](../CONTRIBUTING.md#devcontainer-setup-for-project) | ||
by invoking the script | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we also add a Dockerfile that creates a container with the current codebase and required dependencies to run the CI tests within that container ? |
||
`./ci/do_ci.sh {TARGET}` where the targets are: | ||
|
||
* `cmake.test`: build cmake targets and run tests. | ||
* `cmake.maintainer.test`: build with cmake and test, in maintainer mode. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't used DevContainers before, but I imagine it would be possible to do this without relying on VS Code ?
Please correct me if I'm wrong, but I imagine we could simply exec into a running docker container as well and run CI tests from there ?
I would prefer if we not put in instructions that are IDE specific.