|
3 | 3 | workflow_dispatch: |
4 | 4 |
|
5 | 5 | jobs: |
6 | | - assemble: |
7 | | - uses: ./.github/workflows/reusable-assemble.yml |
| 6 | + build: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + steps: |
| 9 | + - uses: actions/checkout@v3 |
8 | 10 |
|
9 | | - test: |
10 | | - uses: ./.github/workflows/reusable-test.yml |
| 11 | + - name: Set up JDK for running Gradle |
| 12 | + uses: actions/setup-java@v3 |
| 13 | + with: |
| 14 | + distribution: temurin |
| 15 | + java-version: 17 |
| 16 | + |
| 17 | + - uses: gradle/gradle-build-action@v2 |
| 18 | + name: Build |
| 19 | + with: |
| 20 | + arguments: build |
11 | 21 |
|
12 | | - # test-latest-deps is intentionally not included in the release workflows |
13 | | - # because any time a new library version is released to maven central |
14 | | - # it can fail due to test code incompatibility with the new library version, |
15 | | - # or due to slight changes in emitted telemetry |
| 22 | + - uses: actions/upload-artifact@v3 |
| 23 | + name: Save unit test results |
| 24 | + if: always() |
| 25 | + with: |
| 26 | + name: test-results |
| 27 | + path: jmx-metrics/build/reports/tests/test |
16 | 28 |
|
17 | | - smoke-test: |
18 | | - uses: ./.github/workflows/reusable-smoke-test.yml |
| 29 | + integration-test: |
| 30 | + runs-on: ubuntu-latest |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v3 |
19 | 33 |
|
20 | | - # muzzle is intentionally not included in the release workflows |
21 | | - # because any time a new library version is released to maven central it can fail, |
22 | | - # and this is not a reason to hold up the release |
| 34 | + - name: Set up JDK for running Gradle |
| 35 | + uses: actions/setup-java@v3 |
| 36 | + with: |
| 37 | + distribution: temurin |
| 38 | + java-version: 17 |
23 | 39 |
|
24 | | - gradle-plugins: |
25 | | - uses: ./.github/workflows/reusable-gradle-plugins.yml |
| 40 | + - uses: gradle/gradle-build-action@v2 |
| 41 | + name: Integration test |
| 42 | + with: |
| 43 | + arguments: integrationTest |
26 | 44 |
|
27 | | - examples: |
28 | | - uses: ./.github/workflows/reusable-examples.yml |
| 45 | + - uses: actions/upload-artifact@v3 |
| 46 | + name: Save integration test results |
| 47 | + if: always() |
| 48 | + with: |
| 49 | + name: integration-test-results |
| 50 | + path: jmx-metrics/build/reports/tests/integrationTest |
29 | 51 |
|
30 | 52 | release: |
31 | | - needs: |
32 | | - - assemble |
33 | | - - test |
34 | | - - smoke-test |
35 | | - - gradle-plugins |
36 | | - - examples |
37 | 53 | runs-on: ubuntu-latest |
| 54 | + needs: |
| 55 | + - build |
| 56 | + - integration-test |
38 | 57 | steps: |
39 | 58 | - run: | |
40 | 59 | if [[ $GITHUB_REF_NAME != release/* ]]; then |
@@ -106,20 +125,6 @@ jobs: |
106 | 125 | GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} |
107 | 126 | GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} |
108 | 127 |
|
109 | | - - name: Build and publish gradle plugins |
110 | | - uses: gradle/gradle-build-action@v2 |
111 | | - env: |
112 | | - SONATYPE_USER: ${{ secrets.SONATYPE_USER }} |
113 | | - SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }} |
114 | | - GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} |
115 | | - GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} |
116 | | - GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} |
117 | | - GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} |
118 | | - with: |
119 | | - # Don't use publishToSonatype since we don't want to publish the marker artifact |
120 | | - arguments: build publishPlugins publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository |
121 | | - build-root-directory: gradle-plugins |
122 | | - |
123 | 128 | - name: Generate release notes |
124 | 129 | env: |
125 | 130 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
@@ -247,41 +252,3 @@ jobs: |
247 | 252 | --body "$body" \ |
248 | 253 | --head $branch \ |
249 | 254 | --base main |
250 | | -
|
251 | | - - uses: actions/checkout@v3 |
252 | | - with: |
253 | | - repository: opentelemetry-java-bot/opentelemetry-operator |
254 | | - # this is the personal access token used for "git push" below |
255 | | - token: ${{ secrets.BOT_TOKEN }} |
256 | | - |
257 | | - - name: Initialize pull request branch |
258 | | - run: | |
259 | | - git remote add upstream https://github.com/open-telemetry/opentelemetry-operator.git |
260 | | - git fetch upstream |
261 | | - git checkout -b update-opentelemetry-javaagent-to-${VERSION} upstream/main |
262 | | -
|
263 | | - - name: Update version |
264 | | - run: | |
265 | | - echo $VERSION > autoinstrumentation/java/version.txt |
266 | | -
|
267 | | - - name: Set git user |
268 | | - run: .github/scripts/set-git-user.sh |
269 | | - |
270 | | - - name: Create pull request against opentelemetry-operator |
271 | | - env: |
272 | | - # this is the personal access token used for "gh pr create" below |
273 | | - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} |
274 | | - run: | |
275 | | - message="Update the javaagent version to $VERSION" |
276 | | - body="Update the javaagent version to \`$VERSION\`." |
277 | | -
|
278 | | - # gh pr create doesn't have a way to explicitly specify different head and base |
279 | | - # repositories currently, but it will implicitly pick up the head from a different |
280 | | - # repository if you set up a tracking branch |
281 | | -
|
282 | | - git commit -a -m "$message" |
283 | | - git push --set-upstream origin update-opentelemetry-javaagent-to-${VERSION} |
284 | | - gh pr create --title "$message" \ |
285 | | - --body "$body" \ |
286 | | - --repo open-telemetry/opentelemetry-operator \ |
287 | | - --base main |
0 commit comments