-
Notifications
You must be signed in to change notification settings - Fork 310
Don't update jmxfetch integrations submodule during build #9150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Update jmxfetch integrations submodule | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 1 * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 | ||
|
||
- name: Update Submodule | ||
run: | | ||
git submodule update --remote -- dd-java-agent/agent-jmxfetch/integrations-core | ||
- name: Download ghcommit CLI | ||
run: | | ||
curl https://github.com/planetscale/ghcommit/releases/download/v0.1.48/ghcommit_linux_amd64 -o /usr/local/bin/ghcommit -L | ||
AlexeyKuznetsov-DD marked this conversation as resolved.
Show resolved
Hide resolved
|
||
chmod +x /usr/local/bin/ghcommit | ||
- name: Pick a branch name | ||
id: define-branch | ||
run: echo "branch=ci/update-jmxfetch-submodule-$(date +'%Y%m%d')" >> $GITHUB_OUTPUT | ||
- name: Create branch | ||
run: | | ||
git checkout -b ${{ steps.define-branch.outputs.branch }} | ||
git push -u origin ${{ steps.define-branch.outputs.branch }} --force | ||
- name: Commit and push changes | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
run: | | ||
ghcommit --repository ${{ github.repository }} --branch ${{ steps.define-branch.outputs.branch }} --add dd-java-agent/agent-jmxfetch/integrations-core --message "Update agent-jmxfetch submodule" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: Wouldn't it be better to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I copied this from another workflow. It's what's used in Update Gradle Dependencies and Update Docker Build Image There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
You would need to create signed commits for them to be merged. |
||
- name: Create pull request | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh pr create --title "Update agent-jmxfetch submodule" \ | ||
--base master \ | ||
--head ${{ steps.define-branch.outputs.branch }} \ | ||
--label "comp: tooling" \ | ||
--label "type: enhancement" \ | ||
--label "tag: no release notes" \ | ||
--body "This PR updates the agent-jmxfetch submodule." |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,6 @@ tasks.register('copyMetricConfigs', CopyMetricConfigsTask) { | |
description 'Copy metrics.yaml files from integrations-core into resources' | ||
inputDirectory = file("$projectDir/integrations-core") | ||
outputDirectory = file("$buildDir/integrations-core-resources") | ||
dependsOn 'submodulesUpdate' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may also want to do that during a release. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. Gitlab can check out the submodule automatically so it is unneeded to do it in Gradle |
||
} | ||
|
||
processResources { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest weekly, early on monday