elastic / ecs-logging

ECS Logging - Common resources and issues for the language specific ECS loggers
https://www.elastic.co/guide/en/ecs-logging/overview/master/intro.html
Apache License 2.0
41 stars 15 forks source link

[CI] support sending a PR to each ecs logging agent when spec changes #47

Closed v1v closed 3 years ago

v1v commented 3 years ago

What is this PR doing?

It adds a Jenkins pipeline executing on pushes to the master branch, with the following stages:

---
loggers:
  - REPO: "ecs-logging-java"
    SPEC_FILEPATH: "ecs-logging-core/src/test/resources/spec/spec.json"

Why is important?

We want to push changes to downstream repos (the ecs agents) whenever a change on the specs is done. This way the repos are always up-to-date with the specs.

Issues

Closes https://github.com/elastic/ecs-logging/issues/30 Requires https://github.com/elastic/apm-pipeline-library/pull/936

apmmachine commented 3 years ago

:green_heart: Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS Pipeline View Test View Changes Artifacts preview

Expand to view the summary

#### Build stats * Build Cause: `Started by timer` * * Start Time: 2021-02-05T04:03:00.653+0000 * Duration: 3 min 53 sec * Commit: 730c89ac5d57fd45d951c9edc5f4b7c462c5c58b

axw commented 3 years ago

Also, the two go repos appear to be using a different filename ("v1.json") rather than just using the same "spec.json" file basename. That means this code will need to adjust. Some possible ideas:

If it's less work overall, I think we could also just rename v1.json to spec.json in the Go repos. @simitt any concerns about that?

v1v commented 3 years ago

I just added support to different names with https://github.com/elastic/ecs-logging/pull/47/commits/c8205f56fdd5248f937f04e43d69216dfd41bab5 we can change if any repo changes the name of those spec.json files