forked from elastic/apm-agent-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add update-spec updatecli workflow (elastic#3153)
* Add update-spec updatecli workflow * Add to OpenTelemetry workflow * Remove deprecated log.json file
- Loading branch information
1 parent
fda239d
commit ffa8c13
Showing
4 changed files
with
134 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: update-specs | ||
|
||
title: synchronize schema specs | ||
|
||
scms: | ||
default: | ||
kind: github | ||
spec: | ||
user: '{{ requiredEnv "GIT_USER" }}' | ||
email: '{{ requiredEnv "GIT_EMAIL" }}' | ||
owner: elastic | ||
repository: apm-agent-nodejs | ||
token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
username: '{{ requiredEnv "GIT_USER" }}' | ||
branch: main | ||
|
||
sources: | ||
sha: | ||
kind: file | ||
spec: | ||
file: 'https://github.com/elastic/apm-data/commit/main.patch' | ||
matchpattern: "^From\\s([0-9a-f]{40})\\s" | ||
error.json: | ||
kind: file | ||
spec: | ||
file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/error.json | ||
metadata.json: | ||
kind: file | ||
spec: | ||
file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/metadata.json | ||
metricset.json: | ||
kind: file | ||
spec: | ||
file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/metricset.json | ||
span.json: | ||
kind: file | ||
spec: | ||
file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/span.json | ||
transaction.json: | ||
kind: file | ||
spec: | ||
file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/transaction.json | ||
|
||
actions: | ||
pr: | ||
kind: "github/pullrequest" | ||
scmid: default | ||
sourceid: sha | ||
spec: | ||
automerge: false | ||
draft: false | ||
labels: | ||
- "automation" | ||
description: |- | ||
### What | ||
APM agent json schema automatic sync | ||
### Why | ||
*Changeset* | ||
* https://github.com/elastic/apm-data/commit/{{ source "sha" }} | ||
targets: | ||
error.json: | ||
name: error.json | ||
scmid: default | ||
sourceid: error.json | ||
kind: file | ||
spec: | ||
file: test/integration/api-schema/apm-server-schema/error.json | ||
forcecreate: true | ||
metadata.json: | ||
name: metadata.json | ||
scmid: default | ||
sourceid: metadata.json | ||
kind: file | ||
spec: | ||
file: test/integration/api-schema/apm-server-schema/metadata.json | ||
forcecreate: true | ||
metricset.json: | ||
name: metricset.json | ||
scmid: default | ||
sourceid: metricset.json | ||
kind: file | ||
spec: | ||
file: test/integration/api-schema/apm-server-schema/metricset.json | ||
forcecreate: true | ||
span.json: | ||
name: span.json | ||
scmid: default | ||
sourceid: span.json | ||
kind: file | ||
spec: | ||
file: test/integration/api-schema/apm-server-schema/span.json | ||
forcecreate: true | ||
transaction.json: | ||
name: transaction.json | ||
scmid: default | ||
sourceid: transaction.json | ||
kind: file | ||
spec: | ||
file: test/integration/api-schema/apm-server-schema/transaction.json | ||
forcecreate: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: update-specs | ||
|
||
on: | ||
workflow_dispatch: ~ | ||
schedule: | ||
- cron: '0 6 * * *' | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
bump: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Git | ||
uses: elastic/apm-pipeline-library/.github/actions/setup-git@current | ||
- name: Install Updatecli in the runner | ||
uses: updatecli/updatecli-action@453502948b442d7b9a923de7b40cc7ce8628505c | ||
- name: Run Updatecli | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
BRANCH_NAME: ${{ github.ref_name }} | ||
run: updatecli apply --config ./.ci/update-specs.yml | ||
- if: failure() | ||
uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current | ||
with: | ||
vaultUrl: ${{ secrets.VAULT_ADDR }} | ||
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} | ||
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} | ||
slackChannel: "#apm-agent-node" |
This file was deleted.
Oops, something went wrong.