Skip to content

Commit f3d1a1d

Browse files
committed
Merge remote-tracking branch 'upstream/main' into fossa
2 parents 871670c + 8defc11 commit f3d1a1d

File tree

15 files changed

+260
-52
lines changed

15 files changed

+260
-52
lines changed

.clomonitor.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
exemptions:
2+
- check: artifacthub_badge
3+
reason: "Artifact Hub doesn't support Java packages"

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# This file controls who is tagged for review for any given pull request.
33

44
# For anything not explicitly taken by someone else:
5-
* @open-telemetry/java-approvers
5+
* @open-telemetry/java-approvers @open-telemetry/java-instrumentation-maintainers

.github/renovate.json5

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:recommended",
5+
"docker:pinDigests",
6+
"helpers:pinGitHubActionDigests"
7+
],
8+
"packageRules": [
9+
{
10+
// this is to reduce the number of renovate PRs by consolidating them into a weekly batch
11+
"matchManagers": ["github-actions"],
12+
"extends": ["schedule:weekly"],
13+
"groupName": "github actions"
14+
}
15+
]
16+
}

.github/repository-settings.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Repository settings
2+
3+
Same
4+
as [opentelemetry-java-instrumentation repository settings](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/.github/repository-settings.md#repository-settings),
5+
except that the rules for `release/*`, `v0.*`, `v1.*`, `gh-pages`, and `cloudfoundry` branches
6+
are not relevant in this repository.

.github/workflows/codeql.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CodeQL
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: "29 13 * * 2" # weekly at 13:29 UTC on Tuesday
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
analyze:
18+
permissions:
19+
contents: read
20+
actions: read # for github/codeql-action/init to get workflow details
21+
security-events: write # for github/codeql-action/analyze to upload SARIF results
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
with:
26+
# the nebula plugin used in this repo needs the tags
27+
fetch-depth: 0
28+
29+
- name: Set up Java 17
30+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
31+
with:
32+
distribution: temurin
33+
java-version: 17
34+
35+
- name: Set up gradle
36+
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
37+
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
40+
with:
41+
languages: java, actions
42+
# using "latest" helps to keep up with the latest Kotlin support
43+
# see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
44+
tools: latest
45+
46+
- name: Assemble
47+
# --no-build-cache is required for codeql to analyze all modules
48+
# --no-daemon is required for codeql to observe the compilation
49+
# (see https://docs.github.com/en/code-security/codeql-cli/getting-started-with-the-codeql-cli/preparing-your-code-for-codeql-analysis#specifying-build-commands)
50+
run: ./gradlew assemble --no-build-cache --no-daemon
51+
52+
- name: Perform CodeQL analysis
53+
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Gradle wrapper validation
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
gradle-wrapper-validation:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
16+
- uses: gradle/actions/wrapper-validation@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0

.github/workflows/main-build.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,40 @@ on:
55
branches:
66
- main
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
build:
1013
name: Build
11-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-latest
1215
steps:
13-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1417
with:
18+
# the nebula plugin used in this repo needs the tags
1519
fetch-depth: 0
20+
1621
- id: setup-java-17
1722
name: Setup Java 17
18-
uses: actions/setup-java@v4
23+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
1924
with:
20-
distribution: adopt
25+
distribution: temurin
2126
java-version: 17
22-
- uses: burrunan/[email protected]
23-
with:
24-
remote-build-cache-proxy-enabled: false
25-
arguments: build --stacktrace
26-
properties: |
27-
org.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }}
28-
- uses: burrunan/[email protected]
29-
with:
30-
remote-build-cache-proxy-enabled: false
31-
arguments: snapshot --stacktrace
32-
properties: |
33-
org.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }}
27+
28+
- name: Set up gradle
29+
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
30+
31+
- name: Build
32+
run: >
33+
./gradlew build --stacktrace
34+
"-Porg.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }}"
35+
36+
- name: Publish snapshot
3437
env:
3538
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
3639
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
3740
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
3841
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
42+
run: >
43+
./gradlew snapshot --stacktrace
44+
"-Porg.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }}"
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: OSSF Scorecard
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: "43 6 * * 5" # weekly at 06:43 (UTC) on Friday
9+
workflow_dispatch:
10+
11+
permissions: read-all
12+
13+
jobs:
14+
analysis:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
# Needed for Code scanning upload
18+
security-events: write
19+
# Needed for GitHub OIDC token if publish_results is true
20+
id-token: write
21+
steps:
22+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
with:
24+
persist-credentials: false
25+
26+
- uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
27+
with:
28+
results_file: results.sarif
29+
results_format: sarif
30+
publish_results: true
31+
32+
# Upload the results as artifacts (optional). Commenting out will disable
33+
# uploads of run results in SARIF format to the repository Actions tab.
34+
# https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
35+
- name: "Upload artifact"
36+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
37+
with:
38+
name: SARIF file
39+
path: results.sarif
40+
retention-days: 5
41+
42+
# Upload the results to GitHub's code scanning dashboard (optional).
43+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
44+
- name: "Upload to code-scanning"
45+
uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
46+
with:
47+
sarif_file: results.sarif

.github/workflows/pr-build.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,30 @@ on:
55
branches:
66
- main
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
build:
1013
name: Build
11-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-latest
1215
steps:
13-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1417
with:
18+
# the nebula plugin used in this repo needs the tags
1519
fetch-depth: 0
20+
1621
- id: setup-java-17
1722
name: Setup Java 17
18-
uses: actions/setup-java@v4
23+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
1924
with:
20-
distribution: adopt
25+
distribution: temurin
2126
java-version: 17
22-
- uses: burrunan/[email protected]
23-
with:
24-
remote-build-cache-proxy-enabled: false
25-
arguments: build --stacktrace
26-
properties: |
27-
org.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }}
27+
28+
- name: Set up gradle
29+
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
30+
31+
- name: Build
32+
run: >
33+
./gradlew build --stacktrace
34+
"-Porg.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }}"

.github/workflows/release-build.yml

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,51 @@ on:
77
description: The version to tag the release with, e.g., 1.2.0, 1.2.1-alpha.1
88
required: true
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
build:
15+
permissions:
16+
contents: write # for creating the release
1217
name: Build
13-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-latest
1419
steps:
15-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1621
with:
22+
# the nebula plugin used in this repo needs the tags
1723
fetch-depth: 0
24+
1825
- id: setup-java-17
1926
name: Setup Java 17
20-
uses: actions/setup-java@v4
27+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
2128
with:
22-
distribution: adopt
29+
distribution: temurin
2330
java-version: 17
31+
32+
- name: Set up gradle
33+
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
34+
2435
- name: Use CLA approved github bot
2536
run: .github/scripts/use-cla-approved-github-bot.sh
26-
- uses: burrunan/[email protected]
27-
with:
28-
remote-build-cache-proxy-enabled: false
29-
arguments: build --stacktrace
30-
properties: |
31-
release.version=${{ github.event.inputs.version }}
32-
org.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }}
33-
- uses: burrunan/[email protected]
34-
with:
35-
remote-build-cache-proxy-enabled: false
36-
arguments: final closeAndReleaseSonatypeStagingRepository --stacktrace
37-
properties: |
38-
release.version=${{ github.event.inputs.version }}
39-
org.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }}
37+
38+
- name: Build
39+
run: >
40+
./gradlew build --stacktrace
41+
-Prelease.version=${{ github.event.inputs.version }}
42+
"-Porg.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }}"
43+
44+
- name: Publish release
4045
env:
4146
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
4247
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
4348
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
4449
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
50+
run: >
51+
./gradlew final closeAndReleaseSonatypeStagingRepository --stacktrace
52+
-Prelease.version=${{ github.event.inputs.version }}
53+
"-Porg.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }}"
54+
4555
- name: Create Release
4656
env:
4757
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)