Skip to content
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

feat(collector): add manual collector build workflow #1661

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/build-collector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Manual Build (Collector)"

on:
workflow_dispatch:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks useful. I assume this can be run on any arbitrary fork/branch. I suggest updating the collector documentation to highlight this as a way to build a custom layer. Even better if you can include documentation for how to manually upload the layer to an account. These are optional suggestions though and can be done later if you prefer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tylerbenson

I am planning to enhance this workflow (for ex. specifying build tags so custom collector binary will be able to built, deploying as layer to the specified AWS account, etc ...).

So I think, it is better to merge this as is into the main branch and then I can test in in my fork/branch for the further enhancements easier. And then, I will add the final documentation based on those.


jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
architecture: [ amd64, arm64 ]
outputs:
COLLECTOR_VERSION: ${{ steps.save-collector-version.outputs.COLLECTOR_VERSION }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '~1.21.9'
- name: Build Collector
run: make -C collector package GOARCH=${{ matrix.architecture }}
- name: Upload Collector Artifact
uses: actions/upload-artifact@v4
with:
name: opentelemetry-collector-layer-${{ matrix.architecture }}.zip
path: ${{ github.workspace }}/collector/build/opentelemetry-collector-layer-${{ matrix.architecture }}.zip
Loading