-
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.
- Loading branch information
Showing
57 changed files
with
3,306 additions
and
697 deletions.
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,30 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
<!-- Thank you for contributing. We're providing support via GitHub on a best effort basis. Please also open a case at https://support.servicenow.com if you are a ServiceNow customer. --> | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**Steps to reproduce** | ||
If possible, provide a recipe for reproducing the error. | ||
|
||
**What did you expect to see?** | ||
A clear and concise description of what you expected to see. | ||
|
||
**What did you see instead?** | ||
A clear and concise description of what you saw instead. | ||
|
||
**Environment** | ||
Describe any aspect of your environment relevant to the problem, | ||
for example operating system or Kubernetes cluster version. | ||
If this is related to a deployment of the collector please | ||
provide your Collector config file. | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,21 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for the ServiceNow Collector | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
<!-- Thank you for contributing. We're providing support via GitHub on a best effort basis. Please also open a case at https://support.servicenow.com if you are a ServiceNow customer. --> | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'd like to send data in a different format [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,13 @@ | ||
**Description:** <Describe what has changed.> | ||
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. | ||
Ex. Adding a feature - Explain what this achieves.--> | ||
|
||
**Link to tracking Issue:** <Issue number if applicable> | ||
|
||
**Testing:** <Describe what testing was performed and which tests were added.> | ||
|
||
**Documentation:** <Describe the documentation added.> | ||
|
||
|
||
<!-- DO NOT DELETE --> | ||
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. |
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,58 @@ | ||
# Build is responsible for testing builds on all supported platforms. | ||
# It is broken up into three separate jobs with targeted builds so that each OS will | ||
# build in parallel and speed up overall CI time. | ||
name: Build | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build_linux: | ||
runs-on: ubuntu-latest-4-cores | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '~1.21.5' | ||
check-latest: true | ||
- name: Install builder | ||
working-directory: ./collector | ||
run: | | ||
go install go.opentelemetry.io/collector/cmd/[email protected] | ||
- name: Build | ||
working-directory: ./collector | ||
run: make build-linux | ||
build_darwin: | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.20" | ||
check-latest: true | ||
- name: Install builder | ||
working-directory: ./collector | ||
run: | | ||
go install go.opentelemetry.io/collector/cmd/[email protected] | ||
- name: Build | ||
run: make build-darwin | ||
build_windows: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.20" | ||
check-latest: true | ||
- name: Install builder | ||
working-directory: ./collector | ||
run: | | ||
go install go.opentelemetry.io/collector/cmd/[email protected] | ||
- name: Build | ||
working-directory: ./collector | ||
run: make build-windows |
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,63 @@ | ||
name: Build MSI (Manual) | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Collector Version" | ||
required: true | ||
default: "v0.0.1" | ||
|
||
jobs: | ||
build-64bit-msi: | ||
runs-on: windows-2022 | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '~1.21.5' | ||
check-latest: true | ||
- name: Generate distribution sources | ||
run: | | ||
go install go.opentelemetry.io/collector/cmd/[email protected] | ||
cd collector | ||
builder --config otelcol-builder.yaml --skip-compilation | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
# either 'goreleaser' (default) or 'goreleaser-pro' | ||
distribution: goreleaser | ||
version: "v1.22.1" | ||
args: build --single-target --skip=validate --clean --snapshot | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Copy Windows Collector Binary | ||
run: cp dist/otelcol-servicenow_windows_amd64_v1/otelcol-servicenow.exe windows/otelcol-servicenow.exe | ||
- name: Copy Example Config | ||
run: cp collect/config/otelcol-windows-hostmetrics.yaml windows/config.yaml | ||
- name: Copy LICENSE | ||
run: cp LICENSE windows/LICENSE | ||
# HACK: Copy build directory to C drive to avoid this error, since there must be a relative path from the tempdir that go-msi uses | ||
# for the MSI to build properly | ||
- name: Copy Build Dir | ||
run: | | ||
cp -r windows C:/build | ||
echo "C:/build" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
# Installs go-msi and wix. | ||
- name: Install Build Tools | ||
run: | | ||
curl -f -L -o go-msi.exe https://github.com/observIQ/go-msi/releases/download/v2.2.0/go-msi.exe | ||
curl -f -L -o wix310-binaries.zip http://wixtoolset.org/downloads/v3.10.3.3007/wix310-binaries.zip | ||
unzip wix310-binaries.zip | ||
working-directory: C:/build | ||
- name: "Build MSI from Tagged Release" | ||
run: go-msi.exe make -m otelcol-servicenow.msi --version ${{ github.event.inputs.version }} --arch amd64 | ||
working-directory: C:/build | ||
- name: "Upload MSI" | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: otelcol-servicenow.msi | ||
path: C:/build/otelcol-servicenow.msi | ||
# Short lived because this is meant as an action for developers | ||
retention-days: 1 |
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,56 @@ | ||
# based on: https://github.com/open-telemetry/opentelemetry-collector-releases/blob/main/.github/workflows/release.yaml | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: ["v*"] | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
id-token: write | ||
packages: write | ||
contents: write | ||
|
||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: arm64,linux/arm/v7 | ||
|
||
- uses: docker/setup-buildx-action@v3 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '~1.21.5' | ||
check-latest: true | ||
|
||
- name: Generate distribution sources | ||
run: | | ||
go install go.opentelemetry.io/collector/cmd/[email protected] | ||
cd collector | ||
builder --config otelcol-builder.yaml --skip-compilation | ||
- name: Login to GitHub Package Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- shell: bash | ||
run: | | ||
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | ||
- uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean --skip=sign --timeout 2h | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,24 @@ | ||
name: Tests | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
unit-tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04, macos-14, windows-2022-8-cores] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.20" | ||
check-latest: true | ||
- name: Run tests | ||
working-directory: ./collector | ||
run: | | ||
make test | ||
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,2 +1,3 @@ | ||
.DS_Store | ||
collector/otelcol-servicenow/ | ||
collector/otelcol-servicenow/ | ||
dist/ |
Oops, something went wrong.