Skip to content

Commit

Permalink
Merge branch 'main' into dluna/2905-feat-kafkajs-instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
david-luna committed Feb 14, 2024
2 parents 6437bfe + b84d248 commit 0c1cc95
Show file tree
Hide file tree
Showing 36 changed files with 1,108 additions and 990 deletions.
3 changes: 1 addition & 2 deletions .ci/tav.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"// versions": "Skip >=18.19.0 until IITM double-import issue is resolved.",
"versions": [ "21", "20", "18.18.2", "16", "14" ],
"versions": [ "21", "20", "18", "16", "14" ],
"// modules": [
"List of instrumented modules with the minimum Node major version supported.",
"minMajorVersion for each module should be kept in sync with .tav.yml"
Expand Down
130 changes: 0 additions & 130 deletions .ci/updatecli.d/update-json-specs.yml

This file was deleted.

115 changes: 0 additions & 115 deletions .ci/updatecli.d/update-specs.yml

This file was deleted.

84 changes: 84 additions & 0 deletions .ci/updatecli/updatecli.d/update-json-specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: update-json-specs
pipelineid: update-json-specs

scms:
default:
kind: github
spec:
user: '{{ requiredEnv "GIT_USER" }}'
email: '{{ requiredEnv "GIT_EMAIL" }}'
owner: "{{ .github.owner }}"
repository: "{{ .github.repository }}"
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
username: '{{ requiredEnv "GIT_USER" }}'
branch: "{{ .github.branch }}"
apm:
kind: github
spec:
user: '{{ requiredEnv "GIT_USER" }}'
email: '{{ requiredEnv "GIT_EMAIL" }}'
owner: "{{ .github.owner }}"
repository: "{{ .github.apm_repository }}"
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
username: '{{ requiredEnv "GIT_USER" }}'
branch: "{{ .github.branch }}"

sources:
sha:
kind: file
spec:
file: 'https://github.com/{{ .github.owner }}/{{ .github.apm_repository }}/commit/{{ .github.branch }}.patch'
matchpattern: "^From\\s([0-9a-f]{40})\\s"
transformers:
- findsubmatch:
pattern: "[0-9a-f]{40}"
pull_request:
kind: shell
dependson:
- sha
spec:
command: gh api /repos/{{ .github.owner }}/{{ .github.apm_repository }}/commits/{{ source "sha" }}/pulls --jq '.[].html_url'
environments:
- name: GITHUB_TOKEN
- name: PATH
agents-json-specs-tarball:
kind: shell
scmid: apm
dependson:
- sha
spec:
command: tar cvzf {{ requiredEnv "GITHUB_WORKSPACE" }}/json-specs.tgz .
environments:
- name: PATH
workdir: "{{ .specs.apm_json_path }}"

actions:
pr:
kind: "github/pullrequest"
scmid: default
spec:
automerge: false
draft: false
labels:
- "automation"
description: |-
### What
APM agent specs automatic sync
### Why
*Changeset*
* {{ source "pull_request" }}
* https://github.com/{{ .github.owner }}/{{ .github.apm_repository }}/commit/{{ source "sha" }}
title: '[Automation] Update JSON specs'

targets:
agent-json-specs:
name: APM agent json specs {{ source "sha" }}
scmid: default
disablesourceinput: true
kind: shell
spec:
# git diff helps to print what it changed, If it is empty, then updatecli report a success with no changes applied.
# See https://www.updatecli.io/docs/plugins/resource/shell/#_shell_target
command: 'tar -xzf {{ requiredEnv "GITHUB_WORKSPACE" }}/json-specs.tgz && git --no-pager diff'
workdir: "{{ .apm_agent.json_specs_path }}"
Loading

0 comments on commit 0c1cc95

Please sign in to comment.