Skip to content

Commit

Permalink
ci(jenkins): change log rotation, use cached repo (elastic#2970)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored and simitt committed Dec 18, 2019
1 parent cc89749 commit 23af3cd
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .ci/check-changelogs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pipeline {
}
options {
timeout(time: 1, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20', daysToKeepStr: '30'))
buildDiscarder(logRotator(numToKeepStr: '100', artifactNumToKeepStr: '30', daysToKeepStr: '30'))
timestamps()
ansiColor('xterm')
disableResume()
Expand Down
40 changes: 40 additions & 0 deletions .ci/jobs/apm-server-check-changelogs-mbp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
- job:
name: apm-server/apm-server-check-changelogs-mbp
display-name: APM Server check changelogs MBP
description: APM Server check changelogs MBP
project-type: multibranch
script-path: .ci/check-changelogs.groovy
scm:
- github:
branch-discovery: no-pr
discover-pr-forks-strategy: merge-current
discover-pr-forks-trust: permission
discover-pr-origin: merge-current
discover-tags: false
notification-context: 'apm-ci'
property-strategies:
all-branches:
- suppress-scm-triggering: true
repo: apm-server
repo-owner: elastic
credentials-id: 2a9602aa-ab9f-4e52-baf3-b71ca88469c7-UserAndToken
ssh-checkout:
credentials: f6c7695a-671e-4f4f-a331-acdce44ff9ba
clean:
after: true
before: true
prune: true
shallow-clone: true
depth: 3
do-not-fetch-tags: true
submodule:
disable: false
recursive: true
parent-credentials: true
timeout: 100
reference-repo: /var/lib/jenkins/.git-references/apm-server.git
timeout: '15'
use-author: true
wipe-workspace: 'True'
periodic-folder-trigger: 1w
44 changes: 44 additions & 0 deletions .ci/jobs/apm-server-mbp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
- job:
name: apm-server/apm-server-mbp
display-name: APM Server
description: APM Server
project-type: multibranch
concurrent: true
script-path: Jenkinsfile
scm:
- github:
branch-discovery: no-pr
discover-pr-forks-strategy: merge-current
discover-pr-forks-trust: permission
discover-pr-origin: merge-current
discover-tags: true
notification-context: 'apm-ci'
repo: apm-server
repo-owner: elastic
credentials-id: 2a9602aa-ab9f-4e52-baf3-b71ca88469c7-UserAndToken
ssh-checkout:
credentials: f6c7695a-671e-4f4f-a331-acdce44ff9ba
build-strategies:
- tags:
ignore-tags-older-than: -1
ignore-tags-newer-than: -1
- regular-branches: true
- change-request:
ignore-target-only-changes: false
clean:
after: true
before: true
prune: true
shallow-clone: true
depth: 3
do-not-fetch-tags: true
submodule:
disable: false
recursive: true
parent-credentials: true
timeout: 100
reference-repo: /var/lib/jenkins/.git-references/apm-server.git
timeout: '15'
use-author: true
wipe-workspace: 'True'
19 changes: 19 additions & 0 deletions .ci/jobs/defaults.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---

##### GLOBAL METADATA

- meta:
cluster: apm-ci

##### JOB DEFAULTS

- job:
view: APM-CI
logrotate:
numToKeep: 100
node: linux
periodic-folder-trigger: 1d
prune-dead-branches: true
publishers:
- email:
recipients: [email protected]
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pipeline {
}
options {
timeout(time: 2, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20', daysToKeepStr: '30'))
buildDiscarder(logRotator(numToKeepStr: '100', artifactNumToKeepStr: '30', daysToKeepStr: '30'))
timestamps()
ansiColor('xterm')
disableResume()
Expand Down

0 comments on commit 23af3cd

Please sign in to comment.