-
Notifications
You must be signed in to change notification settings - Fork 446
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
dependencies image as artifact #1333
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
21d35f4
dependencies image as artifact
esigo 9cc771c
Update docker/Dockerfile comment
esigo 696781a
update retention
esigo fc613db
rename docker file
esigo 49f83ce
lib files only
esigo 8b98217
change deps image name
esigo 554cb81
no cache
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,48 @@ | ||
name: 'OpenTelemetry-cpp dependencies image' | ||
on: | ||
schedule: | ||
- cron: "0 3 * * 6" | ||
|
||
jobs: | ||
docker_image: | ||
name: Docker Image | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 300 | ||
steps: | ||
- | ||
name: checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- | ||
name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Build Image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
builder: ${{ steps.buildx.outputs.name }} | ||
context: ci/ | ||
file: ./docker/Dockerfile | ||
build-args: BASE_IMAGE=ubuntu:latest | ||
platforms: linux/amd64 | ||
# platforms: linux/amd64,linux/arm64 | ||
push: false | ||
tags: otel-cpp-deps | ||
load: true | ||
cache-from: type=gha | ||
# cache-to: type=gha,mode=max | ||
- | ||
name: Save Image | ||
run: | | ||
docker images | ||
docker save -o /opt/otel-cpp-deps-debian.tar otel-cpp-deps | ||
- | ||
name: Upload Image | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: otel-cpp-deps | ||
path: /opt/otel-cpp-deps-debian.tar | ||
retention-days: 14 |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
ARG BASE_IMAGE=ubuntu:latest | ||
ARG CORES=${nproc} | ||
|
||
FROM ${BASE_IMAGE} as base | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && apt-get install -y build-essential autoconf \ | ||
libtool pkg-config cmake git libssl-dev curl \ | ||
libcurl4-openssl-dev libgtest-dev libgmock-dev libbenchmark-dev | ||
|
||
WORKDIR /work | ||
RUN mkdir -p /opt/otel-cpp | ||
|
||
FROM base as grpc | ||
# install grpc, protobuf and abseil | ||
ARG GRPC_VERSION=1.43.2 | ||
|
||
ADD setup_grpc.sh . | ||
RUN ./setup_grpc.sh -i "/opt/otel-cpp" -v ${GRPC_VERSION} | ||
|
||
FROM base as thrift | ||
RUN apt-get install -y --no-install-recommends wget | ||
|
||
# install thrift | ||
ARG THRIFT_VERSION=0.14.1 | ||
ADD setup_thrift.sh . | ||
RUN ./setup_thrift.sh -i "/opt/otel-cpp" | ||
|
||
FROM scratch as final | ||
|
||
COPY --from=grpc /opt/otel-cpp / | ||
COPY --from=thrift /opt/otel-cpp / | ||
|
||
# how to use: | ||
# | ||
# docker create -ti --name deps otel-cpp-deps bash | ||
# docker cp deps:/ ./ | ||
# docker rm -f deps | ||
# | ||
# or: | ||
# | ||
# COPY --from=otel-cpp-deps /usr |
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.
Is this effective if
cache-to
is not used ?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.
no it's not, I cleaned it.