Skip to content
Closed
Show file tree
Hide file tree
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
136 changes: 136 additions & 0 deletions .github/workflows/(TEMP)-Generate-Compatibility-Doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: (TEMP) Generate Compatibility Doc

on:
pull_request:
branches:
- test-auto-pr-action
paths:
- instrumentation/**/build.gradle
- instrumentation/**/build.gradle.kts


jobs:
generate-files:
name: Generate Compatibility Files
runs-on: ubuntu-24.04

env:
INTERNAL_DOC_FILE: build/docs/site/compatibility-internal.md
PUBLIC_DOC_FILE: build/docs/site/compatibility-requirements-java-agent.mdx

steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4

- name: Setup environment
uses: ./.github/actions/setup-environment

# - name: Run compatibility plugin
# run: ./gradlew clean generateCompatibilityDoc
- name: Create bogus files
run: |
mkdir -p "$(dirname "${{ env.INTERNAL_DOC_FILE }}")"
mkdir -p "$(dirname "${{ env.PUBLIC_DOC_FILE }}")"
echo "hello world, i'm the internal file" > ${{ env.INTERNAL_DOC_FILE }}
echo "goodbye world, i'm the public file" > ${{ env.PUBLIC_DOC_FILE }}

- name: Upload internal compatibility doc
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #pin@v4
with:
name: internal-compatibility-doc
path: ${{ env.INTERNAL_DOC_FILE }}
retention-days: 1

- name: Upload public site compatibility doc
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #pin@v4
with:
name: site-compatibility-doc
path: ${{ env.PUBLIC_DOC_FILE }}
retention-days: 1

update-internal-compatibility-doc:
name: Update Internal Compatibility File
needs: generate-files
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && inputs.doc_type == 'internal')

env:
INTERNAL_FILEPATH: instrumentation/COMPATIBILITY.md

steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4

- name: Download internal doc
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # pin@v4
with:
name: internal-compatibility-doc
path: tmp

- name: Copy internal doc to destination
run: cp tmp/compatibility-internal.md ${{ env.INTERNAL_FILEPATH }}

- name: Create PR for internal doc
id: create-pr-internal
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
with:
base: test-auto-pr-action
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: ${{ env.INTERNAL_FILEPATH }}
commit-message: 'Update internal compatibility doc'
branch: update-compatibility-doc-${{ github.run_id }}
delete-branch: true
title: '(TEST, IGNORE ME) Update Internal Compatibility Doc'
body: |
This PR updates the internal compatibility documentation. It was triggered manually or by a detected instrumentation build file change.

- name: Summary
run: |
echo "Submitted PR #${{ steps.create-pr-internal.outputs.pull-request-number}} to the New Relic Agent repo."
echo "Your review is required. See ${{ steps.create-pr-internal.outputs.pull-request-url}}"

# update-site-compatibility-doc:
# name: Update Public Site Documentation
# needs: generate-files
# runs-on: ubuntu-24.04
# if: github.event_name == 'workflow_dispatch' && inputs.doc_type == 'site'
#
# env:
# EXTERNAL_REPO_NAME: newrelic/docs-website
# DESTINATION_FILEPATH: src/content/docs/apm/agents/java-agent/getting-started/compatibility-requirements-java-agent.mdx
#
# steps:
# - name: Checkout external docs repo
# uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4
# with:
# repository: ${{ env.EXTERNAL_REPO_NAME }}
# token: ${{ secrets.DOCS_WEBSITE_TOKEN }}
# path: docs-website
#
# - name: Download site doc
# uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # pin@v4
# with:
# name: site-compatibility-doc
# path: tmp
#
# - name: Copy site doc to destination path
# run: cp tmp/compatibility-requirements-java-agent.mdx docs-website/${{ env.DESTINATION_FILEPATH }}
#
# - name: Create PR for site doc
# id: create-pr-docs-site
# uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
# with:
# token: ${{ secrets.DOCS_WEBSITE_TOKEN }}
# path: docs-website
# add-paths: ${{ env.DESTINATION_FILEPATH }}
# commit-message: 'Update Java agent compatibility documentation'
# branch: update-java-agent-compatibility-${{ inputs.release_tag }}
# delete-branch: true
# title: '[DO-NOT-MERGE] Update Java Agent Compatibility Requirements'
# body: |
# This is a WIP.
# This PR updates the Java agent compatibility documentation.
#
# - name: Summary
# run: |
# echo "Submitted PR #${{ steps.create-pr-docs-site.outputs.pull-request-number}} to the docs site repo."
# echo "Your review is required. See ${{ steps.create-pr-docs-site.outputs.pull-request-url}}"
# echo "Once you have reviewed the PR, update its title and description to show it is ready for merge."
143 changes: 143 additions & 0 deletions .github/workflows/Generate-Compatibility-Doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: Generate Compatibility Doc

on:
push:
branches:
- main
paths:
- instrumentation/**/build.gradle
- instrumentation/**/build.gradle.kts

workflow_dispatch:
inputs:
doc_type:
description: The type of the compatibility doc you wish to generate - either internal (a simplified .md file, copied into this repo) or site (a complete .mdx file, copied to the public docs website).
required: true
options:
- internal
- site
release_tag:
description: If triggering this action as a part of a release workflow, the release tag to use when naming the PR to the public docs site.
default: 00


jobs:
generate-files:
name: Generate Compatibility Files
runs-on: ubuntu-24.04

env:
INTERNAL_DOC_FILE: build/docs/site/compatibility-internal.md
PUBLIC_DOC_FILE: build/docs/site/compatibility-requirements-java-agent.mdx

steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4

- name: Setup environment
uses: ./.github/actions/setup-environment

- name: Run compatibility plugin
run: ./gradlew clean generateCompatibilityDoc

- name: Upload internal compatibility doc
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #pin@v4
with:
name: internal-compatibility-doc
path: ${{ env.INTERNAL_DOC_FILE }}
retention-days: 1

- name: Upload public site compatibility doc
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #pin@v4
with:
name: site-compatibility-doc
path: ${{ env.PUBLIC_DOC_FILE }}
retention-days: 1

update-internal-compatibility-doc:
name: Update Internal Compatibility File
needs: generate-files
runs-on: ubuntu-24.04
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.doc_type == 'internal')

env:
INTERNAL_FILEPATH: instrumentation/COMPATIBILITY.md

steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4

- name: Download internal doc
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # pin@v4
with:
name: internal-compatibility-doc
path: tmp

- name: Copy internal doc to destination
run: cp tmp/compatibility-internal.md ${{ env.INTERNAL_FILEPATH }}

- name: Create PR for internal doc
id: create-pr-internal
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
with:
base: main
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: ${{ env.INTERNAL_FILEPATH }}
commit-message: 'Update internal compatibility doc'
branch: update-compatibility-doc-${{ github.run_id }}
delete-branch: true
title: 'Update Internal Compatibility Doc'
body: |
This PR updates the internal compatibility documentation. It was triggered manually or by a detected instrumentation build file change.

- name: Summary
run: |
echo "Submitted PR #${{ steps.create-pr-internal.outputs.pull-request-number}} to the New Relic Agent repo."
echo "Your review is required. See ${{ steps.create-pr-internal.outputs.pull-request-url}}"

update-site-compatibility-doc:
name: Update Public Site Documentation
needs: generate-files
runs-on: ubuntu-24.04
if: github.event_name == 'workflow_dispatch' && inputs.doc_type == 'site'

env:
EXTERNAL_REPO_NAME: newrelic/docs-website
DESTINATION_FILEPATH: src/content/docs/apm/agents/java-agent/getting-started/compatibility-requirements-java-agent.mdx

steps:
- name: Checkout external docs repo
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4
with:
repository: ${{ env.EXTERNAL_REPO_NAME }}
token: ${{ secrets.DOCS_WEBSITE_TOKEN }}
path: docs-website

- name: Download site doc
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # pin@v4
with:
name: site-compatibility-doc
path: tmp

- name: Copy site doc to destination path
run: cp tmp/compatibility-requirements-java-agent.mdx docs-website/${{ env.DESTINATION_FILEPATH }}

- name: Create PR for site doc
id: create-pr-docs-site
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
with:
base: develop
token: ${{ secrets.DOCS_WEBSITE_TOKEN }}
path: docs-website
add-paths: ${{ env.DESTINATION_FILEPATH }}
commit-message: 'Update Java agent compatibility documentation'
branch: update-java-agent-compatibility-${{ inputs.release_tag }}
delete-branch: true
title: '[DO-NOT-MERGE] Update Java Agent Compatibility Requirements'
body: |
This is a WIP.
This PR updates the Java agent compatibility documentation.

- name: Summary
run: |
echo "Submitted PR #${{ steps.create-pr-docs-site.outputs.pull-request-number}} to the docs site repo."
echo "Your review is required. See ${{ steps.create-pr-docs-site.outputs.pull-request-url}}"
echo "Once you have reviewed the PR, update its title and description to show it is ready for merge."
2 changes: 1 addition & 1 deletion instrumentation/akka-http-2.11_2.4.5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ verifyInstrumentation {

site {
title 'Akka Http'
type 'Framework'
type 'Framework, Http'
}
2 changes: 1 addition & 1 deletion instrumentation/akka-http-2.13_10.1.8/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ verifyInstrumentation {

site {
title 'Akka Http'
type 'Framework'
type 'Framework, Http'
}
2 changes: 1 addition & 1 deletion instrumentation/akka-http-2.13_10.2.0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ verifyInstrumentation {

site {
title 'Akka Http'
type 'Framework'
type 'Framework, Http'
}
2 changes: 1 addition & 1 deletion instrumentation/akka-http-2.13_10.5.0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ verifyInstrumentation {

site {
title 'Akka Http'
type 'Framework'
type 'Framework, Http'
}
4 changes: 2 additions & 2 deletions instrumentation/akka-http-core-0.4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ verifyInstrumentation {
}

site {
title 'Akka Http Core'
type 'Framework'
title 'Akka Http'
type 'Framework, Http'
}
4 changes: 2 additions & 2 deletions instrumentation/akka-http-core-0.7/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ verifyInstrumentation {
}

site {
title 'Akka Http Core'
type 'Framework'
title 'Akka Http'
type 'Framework, Http'
}
4 changes: 2 additions & 2 deletions instrumentation/akka-http-core-1.0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ verifyInstrumentation {
}

site {
title 'Akka Http Core'
type 'Framework'
title 'Akka Http'
type 'Framework, Http'
}
4 changes: 2 additions & 2 deletions instrumentation/akka-http-core-10.0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ verifyInstrumentation {
}

site {
title 'Akka Http Core'
type 'Framework'
title 'Akka Http'
type 'Framework, Http'
}
4 changes: 2 additions & 2 deletions instrumentation/akka-http-core-10.2.0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ verifyInstrumentation {
}

site {
title 'Akka Http Core'
type 'Framework'
title 'Akka Http'
type 'Framework, Http'
}
4 changes: 2 additions & 2 deletions instrumentation/akka-http-core-2.11_10.0.11/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ verifyInstrumentation {
}

site {
title 'Akka Http Core'
type 'Framework'
title 'Akka Http'
type 'Framework, Http'
}
4 changes: 2 additions & 2 deletions instrumentation/akka-http-core-2.13_10.1.8/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ verifyInstrumentation {
}

site {
title 'Akka Http Core'
type 'Framework'
title 'Akka Http'
type 'Framework, Http'
}
4 changes: 2 additions & 2 deletions instrumentation/akka-http-core-2.13_10.2.0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ verifyInstrumentation {
}

site {
title 'Akka Http Core'
type 'Framework'
title 'Akka Http'
type 'Framework, Http'
}
2 changes: 1 addition & 1 deletion instrumentation/apache-log4j-1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ verifyInstrumentation {

site {
title 'Log4j-1'
type 'Framework'
type 'Logging'
}
2 changes: 1 addition & 1 deletion instrumentation/apache-log4j-2.11/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ verifyInstrumentation {

site {
title 'Log4j2'
type 'Framework'
type 'Logging'
}
Loading
Loading