Skip to content
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

[CI] Archive build reasons #21347

Merged
merged 4 commits into from
Sep 29, 2020

Conversation

v1v
Copy link
Member

@v1v v1v commented Sep 28, 2020

What does this PR do?

Enable to show the build reasons for the given PR based on the different events, such as: a github pr comment, github label, commit, branch, tag and so on.

The build reason will be stored as a markdown file for the time being.

Why is it important?

The cloud stages reuse the top-level worker and delete the workspace, that's the reason of using it within the step closure rather than in the post build step.

Tests

build-reasons file for the CI build.

image

Follow ups

The final notification will be shown as a GitHub PR comment with the build reasons, similar to the ones we already use for the build status, for instance, see the below screenshot

image

But only with the details that are related to the build reason.

This is something that we are defining and we will introduce it in the future.

@v1v v1v self-assigned this Sep 28, 2020
@v1v v1v added the automation label Sep 28, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 28, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 28, 2020

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #21347 event]

  • Start Time: 2020-09-28T15:34:45.505+0000

  • Duration: 86 min 25 sec

Test stats 🧪

Test Results
Failed 2
Passed 20111
Skipped 1700
Total 21813

Test errors

Expand to view the tests failures

  • Name: Build&Test / filebeat-windows-windows-2019 / TestReceiveEventsAndMetadata – unix

    • Age: 1
    • Duration: 0
    • Error Details: Failed
  • Name: Build&Test / filebeat-windows-windows-2019 / TestReceiveEventsAndMetadata/NewLine – unix

    • Age: 1
    • Duration: 0
    • Error Details: Failed

Steps errors

Expand to view the steps failures

  • Name: mage build unitTest

    • Description: mage build unitTest

    • Duration: 13 min 16 sec

    • Start Time: 2020-09-28T16:05:25.525+0000

    • log

  • Name: Notifies GitHub of the status of a Pull Request

    • Description: script returned exit code 1

    • Duration: 0 min 1 sec

    • Start Time: 2020-09-28T16:19:03.123+0000

    • log

  • Name: Process JUnit reports with runbld

    • Description:

    • Duration: 0 min 17 sec

    • Start Time: 2020-09-28T17:00:52.902+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-09-28T17:00:47.275Z] Client: Docker Engine - Community
[2020-09-28T17:00:47.275Z]  Version:           19.03.13
[2020-09-28T17:00:47.275Z]  API version:       1.40
[2020-09-28T17:00:47.275Z]  Go version:        go1.13.15
[2020-09-28T17:00:47.275Z]  Git commit:        4484c46d9d
[2020-09-28T17:00:47.275Z]  Built:             Wed Sep 16 17:02:36 2020
[2020-09-28T17:00:47.275Z]  OS/Arch:           linux/amd64
[2020-09-28T17:00:47.275Z]  Experimental:      false
[2020-09-28T17:00:47.275Z] 
[2020-09-28T17:00:47.275Z] Server: Docker Engine - Community
[2020-09-28T17:00:47.275Z]  Engine:
[2020-09-28T17:00:47.275Z]   Version:          19.03.13
[2020-09-28T17:00:47.275Z]   API version:      1.40 (minimum version 1.12)
[2020-09-28T17:00:47.275Z]   Go version:       go1.13.15
[2020-09-28T17:00:47.275Z]   Git commit:       4484c46d9d
[2020-09-28T17:00:47.275Z]   Built:            Wed Sep 16 17:01:06 2020
[2020-09-28T17:00:47.275Z]   OS/Arch:          linux/amd64
[2020-09-28T17:00:47.275Z]   Experimental:     false
[2020-09-28T17:00:47.275Z]  containerd:
[2020-09-28T17:00:47.275Z]   Version:          1.3.7
[2020-09-28T17:00:47.275Z]   GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175
[2020-09-28T17:00:47.275Z]  runc:
[2020-09-28T17:00:47.275Z]   Version:          1.0.0-rc10
[2020-09-28T17:00:47.275Z]   GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
[2020-09-28T17:00:47.276Z]  docker-init:
[2020-09-28T17:00:47.276Z]   Version:          0.18.0
[2020-09-28T17:00:47.276Z]   GitCommit:        fec3683
[2020-09-28T17:00:51.190Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats
[2020-09-28T17:00:51.200Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/uncategorized-1601308652641
[2020-09-28T17:00:51.235Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/libbeat-stress-tests-1601308892448
[2020-09-28T17:00:51.265Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/winlogbeat-crosscompile-1601308959279
[2020-09-28T17:00:51.295Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-elastic-agent-build-1601308984982
[2020-09-28T17:00:51.333Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/auditbeat-crosscompile-1601309000901
[2020-09-28T17:00:51.368Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/journalbeat-unitTest-1601309007603
[2020-09-28T17:00:51.400Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-dockerlogbeat-build-1601309008933
[2020-09-28T17:00:51.432Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/heartbeat-macos-macosx-1601309022895
[2020-09-28T17:00:51.466Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/generator-macos-metricbeat-macosx-1601309075716
[2020-09-28T17:00:51.497Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-functionbeat-build-1601309078048
[2020-09-28T17:00:51.533Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/generator-macos-beat-macosx-1601309097559
[2020-09-28T17:00:51.568Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/metricbeat-macos-macosx-1601309098732
[2020-09-28T17:00:51.609Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/packetbeat-macos-macosx-1601309104265
[2020-09-28T17:00:51.648Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/libbeat-crosscompile-1601309155869
[2020-09-28T17:00:51.679Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/packetbeat-build-1601309174290
[2020-09-28T17:00:51.712Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-elastic-agent-macos-macosx-1601309229676
[2020-09-28T17:00:51.745Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/auditbeat-macos-macosx-1601309237315
[2020-09-28T17:00:51.777Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/metricbeat-unitTest-1601309253280
[2020-09-28T17:00:51.813Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-auditbeat-macos-macosx-1601309304873
[2020-09-28T17:00:51.847Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-elastic-agent-windows-windows-2019-1601309309625
[2020-09-28T17:00:51.881Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/auditbeat-windows-windows-2019-1601309318554
[2020-09-28T17:00:51.914Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/heartbeat-build-1601309333091
[2020-09-28T17:00:51.948Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-functionbeat-macos-macosx-1601309343840
[2020-09-28T17:00:51.981Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-filebeat-macos-macosx-1601309344798
[2020-09-28T17:00:52.017Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-auditbeat-build-1601309386509
[2020-09-28T17:00:52.057Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-metricbeat-macos-macosx-1601309410528
[2020-09-28T17:00:52.091Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/heartbeat-windows-windows-2019-1601309410161
[2020-09-28T17:00:52.125Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-auditbeat-windows-windows-2019-1601309427737
[2020-09-28T17:00:52.161Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-winlogbeat-build-windows-2019-1601309437004
[2020-09-28T17:00:52.199Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/auditbeat-build-1601309473949
[2020-09-28T17:00:52.236Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/metricbeat-crosscompile-1601309508523
[2020-09-28T17:00:52.267Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/winlogbeat-windows-windows-2019-1601309520369
[2020-09-28T17:00:52.309Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-filebeat-windows-windows-2019-1601309523999
[2020-09-28T17:00:52.345Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-libbeat-build-1601309547391
[2020-09-28T17:00:52.382Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-functionbeat-windows-windows-2019-1601309567891
[2020-09-28T17:00:52.419Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/generator-beat-test-1601309601562
[2020-09-28T17:00:52.455Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/generator-metricbeat-test-1601309611429
[2020-09-28T17:00:52.485Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-metricbeat-windows-windows-2019-1601309634220
[2020-09-28T17:00:52.522Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/packetbeat-windows-windows-2019-1601309659732
[2020-09-28T17:00:52.556Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/metricbeat-windows-windows-2019-1601309741838
[2020-09-28T17:00:52.592Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/filebeat-windows-windows-2019-1601309924325
[2020-09-28T17:00:52.625Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/filebeat-macos-macosx-1601310105069
[2020-09-28T17:00:52.659Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/filebeat-build-1601310327182
[2020-09-28T17:00:52.698Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/libbeat-build-1601310593971
[2020-09-28T17:00:52.740Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-filebeat-build-1601310726891
[2020-09-28T17:00:52.777Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/metricbeat-goIntegTest-1601310924539
[2020-09-28T17:00:52.820Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/metricbeat-pythonIntegTest-1601310995720
[2020-09-28T17:00:52.852Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats/x-pack-metricbeat-build-1601312146305
[2020-09-28T17:00:53.192Z] + cat
[2020-09-28T17:00:53.193Z] + /usr/local/bin/runbld ./runbld-test-reports --job-name elastic+beats+pull-request
[2020-09-28T17:00:53.193Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-09-28T17:00:59.788Z] runbld>>> runbld started
[2020-09-28T17:00:59.788Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-09-28T17:01:01.719Z] runbld>>> The following profiles matched the job 'elastic+beats+pull-request' in order of occurrence in the config (last value wins).
[2020-09-28T17:01:01.719Z] runbld>>> Matches in the system config:
[2020-09-28T17:01:01.719Z] runbld>>> - Matched ^elastic\+beats
[2020-09-28T17:01:01.719Z] runbld>>> - Matched ^elastic\+beats\+pull-request
[2020-09-28T17:01:02.668Z] runbld>>> Debug logging enabled.
[2020-09-28T17:01:02.668Z] runbld>>> Storing result
[2020-09-28T17:01:02.937Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-09-28T17:01:02.937Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200928170102-13222390
[2020-09-28T17:01:02.937Z] runbld>>> Adding system facts.
[2020-09-28T17:01:03.887Z] runbld>>> Sending debug log to infra-root+runbld-debug@e***.co
[2020-09-28T17:01:04.832Z] runbld>>> Error: The source clone was not found in /var/lib/jenkins/workspace/Beats_beats_PR-21347/src/github.com/elastic/beats.  The most common cause is that Jenkins and runbld are configured with different working directories (referred to as 'basedir' in JJB and 'cwd' in runbld config).
[2020-09-28T17:01:10.232Z] ERROR: runbld post build action failed.
[2020-09-28T17:01:10.232Z] ERROR: script returned exit code 1
[2020-09-28T17:01:10.388Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-21347
[2020-09-28T17:01:10.417Z] [INFO] getVaultSecret: Getting secrets
[2020-09-28T17:01:10.486Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-09-28T17:01:11.076Z] + chmod 755 generate-build-data.sh
[2020-09-28T17:01:11.076Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21347/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21347/runs/3 FAILURE 5185309
[2020-09-28T17:01:11.076Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21347/runs/3/steps/?limit=10000 -o steps-info.json

Jenkinsfile Outdated Show resolved Hide resolved
@v1v v1v requested a review from a team September 28, 2020 15:33
@v1v v1v added ci Team:Automation Label for the Observability productivity team labels Sep 28, 2020
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 28, 2020
@v1v v1v marked this pull request as ready for review September 28, 2020 15:33
@v1v v1v merged commit 8eb3529 into elastic:master Sep 29, 2020
@v1v v1v deleted the feature/pipeline-2.0-archive-build-reasons branch September 29, 2020 08:23
v1v added a commit to v1v/beats that referenced this pull request Sep 29, 2020
v1v added a commit to v1v/beats that referenced this pull request Sep 29, 2020
v1v added a commit that referenced this pull request Sep 29, 2020
v1v added a commit that referenced this pull request Sep 29, 2020
v1v added a commit to v1v/beats that referenced this pull request Sep 29, 2020
* upstream/master:
  feat: prepare release pipelines (elastic#21238)
  Add IP validation to Security module (elastic#21325)
  Fixes for new 7.10 rsa2elk datasets (elastic#21240)
  o365input: Restart after fatal error (elastic#21258)
  Fix panic in cgroups monitoring (elastic#21355)
  Handle multiple upstreams in ingress-controller (elastic#21215)
  [CI] Fix runbld when workspace does not exist (elastic#21350)
  [Filebeat] Fix checkpoint (elastic#21344)
  [CI] Archive build reasons (elastic#21347)
  Add dashboard for pubsub metricset in googlecloud module (elastic#21326)
  [Elastic Agent] Allow embedding of certificate (elastic#21179)
  Adds a default for failure_cache.min_ttl (elastic#21085)
  [libbeat] Disk queue implementation (elastic#21176)
v1v added a commit to v1v/beats that referenced this pull request Oct 19, 2020
v1v added a commit that referenced this pull request Oct 30, 2020
* cherry-pick aad07ad
* Add stages to Jenkins pipeline (#14484)
* ci: avoid to modify go.mod file (#16842)
* Ensure install scripts only install if needed (#20349)
* ci: fix warnings with wildcards and archive system-tests (#18695)
* ci: run test on Windows (#15570)
* [CI] fail if not possible to install python3 (#19164)
* [CI] lint stage doesn't produce test reports (#21888)
* [CI] Add stage name in the step (#21887)
* [CI] kind setup fails sometimes (#21857)
* [CI] refactor runbld post build action (#21256)
* [CI] Archive build reasons (#21347)
* [CI] Fix runbld when workspace does not exist (#21350)
* [CI] Send slack message with build status (#21428)
* [CI] Setup git config globally (#21562)
* [CI] fix 'no matches found within 10000' (#21466)
* [CI] Change notification channel (#21559)
* [CI] Support skip-ci label (#21377)
* [BUILD][CI] fetch dependencies with retry (#21614)
* Disable x-pack/metricbeat in linux since build is broken #21962
* Disable tests for windows in auditbeat. See #21958
* Disable integration testing for libbeat. See #21959
* Disable integration testing for metricbeat. See #21961
* Disable windows build for auditbeat. See #21958
* Disable build for libbeat. See #21959
* Disable build for metricbeat. See #21961
* Disable windows build for metricbeat. See #22257
* Disable build for x-pack/metricbeat. See #21962
* Disable windows build for x-pack/winlogbeat. See #22263
* Disable windows build for x-pack/filebeat. See #21963
* integration-tests-environment is not available for winlogbeat. see #22265
* integration-tests-environment is not available for packetbeat. see #22266
* Build not available for x-pack/metricbeats in 6.8. See #22269
* Cherry-pick 96c60d0
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation ci Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants