Skip to content

Commit

Permalink
Merge branch 'main' into initcontainer-securitycontext
Browse files Browse the repository at this point in the history
  • Loading branch information
addreas authored Jul 10, 2023
2 parents 0801929 + b44640f commit ec0fe0f
Show file tree
Hide file tree
Showing 221 changed files with 17,607 additions and 3,762 deletions.

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/1672-bump-otel-net-auto-to-0.7.0.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/1681-update-nodejs-deps.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/add-featuregate-for-dotnet.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/add-featuregates.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/add-liveness-probe-configs.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/add-metrics-to-nodejs.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/bump-nodejs-versions.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/fix_targetallocator_update-scrape-configs.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/java-featuregate.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/nodejs-featuregate.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions .chloggen/otelallocator-flag.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/python-featuregate.yaml

This file was deleted.

81 changes: 81 additions & 0 deletions .github/workflows/auto-update-java-agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Auto-update Java agent

on:
schedule:
# Daily at 01:30 (UTC)
- cron: '30 1 * * *'
workflow_dispatch:

jobs:
check-versions:
runs-on: ubuntu-latest
outputs:
current-version: ${{ steps.check-versions.outputs.current-version }}
latest-version: ${{ steps.check-versions.outputs.latest-version }}
already-opened: ${{ steps.check-versions.outputs.already-opened }}
steps:
- uses: actions/checkout@v3

- id: check-versions
name: Check versions
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
current_version=$(grep -Po "[0-9]+.[0-9]+.[0-9]+" autoinstrumentation/java/version.txt)
latest_version=$(gh release view \
--repo open-telemetry/opentelemetry-java-instrumentation \
--json tagName \
--jq .tagName \
| sed 's/^v//')
matches=$(gh pr list \
--author opentelemetrybot \
--state open \
--search "in:title \"Update the OpenTelemetry Java agent version to $latest_version\"")
if [ ! -z "$matches" ]
then
already_opened=true
fi
echo "current-version=$current_version" >> $GITHUB_OUTPUT
echo "latest-version=$latest_version" >> $GITHUB_OUTPUT
echo "already-opened=$already_opened" >> $GITHUB_OUTPUT
update-java-agent:
runs-on: ubuntu-latest
if: |
needs.check-versions.outputs.current-version != needs.check-versions.outputs.latest-version &&
needs.check-versions.outputs.already-opened != 'true'
needs:
- check-versions
steps:
- uses: actions/checkout@v3

- name: Update version
env:
VERSION: ${{ needs.check-versions.outputs.latest-version }}
run: |
echo $VERSION > autoinstrumentation/java/version.txt
- name: Use CLA approved github bot
run: |
git config user.name opentelemetrybot
git config user.email 107717825+opentelemetrybot@users.noreply.github.com
- name: Create pull request against main
if: success() || failure()
env:
VERSION: ${{ needs.check-versions.outputs.latest-version }}
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
run: |
message="Update the OpenTelemetry Java agent version to $VERSION"
body="Update the OpenTelemetry Java agent version to \`$VERSION\`."
branch="opentelemetrybot/update-opentelemetry-java-agent-to-${VERSION}"
git checkout -b $branch
git commit -a -m "$message"
git push --set-upstream origin $branch
gh pr create --title "$message" \
--body "$body" \
--base main
23 changes: 15 additions & 8 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
unit-tests:
name: Unit tests
Expand All @@ -25,9 +29,6 @@ jobs:
lint:
name: Code standards (linting)
runs-on: ubuntu-20.04
strategy:
matrix:
workdir: [".", "./cmd/otel-allocator", "./cmd/operator-opamp-bridge"]
steps:
- name: Set up Go
uses: actions/setup-go@v4
Expand All @@ -36,12 +37,18 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Lint
uses: golangci/golangci-lint-action@v3
- uses: actions/cache@v3
with:
args: -v --timeout 5m
version: v1.51.2
working-directory: ${{ matrix.workdir }}
path: |
/home/runner/.cache/golangci-lint
/home/runner/go/pkg/mod
./bin
key: golangcilint-${{ hashFiles('**/go.sum') }}
restore-keys: |
golangcilint-
- name: Lint
run: make lint

security:
name: Security
Expand Down
Loading

0 comments on commit ec0fe0f

Please sign in to comment.