Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 1 | --- |
| 2 | # these parameters are used for infra related variables |
| 3 | - parameter: |
Fatih Degirmenci | 5addd51 | 2018-10-19 14:06:03 +0200 | [diff] [blame] | 4 | name: infra-parameters |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 5 | parameters: |
| 6 | - string: |
| 7 | name: JJB_GIT_REPO |
| 8 | default: https://git.openstack.org/openstack-infra/jenkins-job-builder |
| 9 | description: OpenStack JJB repo |
| 10 | - string: |
| 11 | name: JJB_VERSION |
| 12 | default: 2.2.1 |
| 13 | description: OpenStack JJB version to install - matches to LFN JJB version |
| 14 | |
| 15 | # these parameters are used for setting the Gerrit Project on Nordix |
| 16 | - parameter: |
Fatih Degirmenci | 5addd51 | 2018-10-19 14:06:03 +0200 | [diff] [blame] | 17 | name: project-parameters |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 18 | parameters: |
| 19 | - string: |
| 20 | name: PROJECT |
| 21 | default: '{project}' |
| 22 | description: JJB configured PROJECT parameter to identify a Nordix Gerrit project |
Fatih Degirmenci | 2c4038b | 2018-10-18 15:25:24 +0200 | [diff] [blame] | 23 | - string: |
| 24 | name: BRANCH |
| 25 | default: '{branch}' |
| 26 | description: "JJB configured BRANCH parameter (e.g. master, nordix-dev)" |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 27 | |
| 28 | # these parameters are used for streaming changes from various Gerrit Systems |
| 29 | - parameter: |
| 30 | name: nordix-gerrit-parameters |
| 31 | parameters: |
| 32 | - string: |
| 33 | name: GERRIT_USER |
| 34 | default: infra |
| 35 | description: Non-interactive user to stream Gerrit Events on Nordix Gerrit |
| 36 | - string: |
| 37 | name: GIT_BASE_HTTPS |
Fatih Degirmenci | 9a746ac | 2018-10-23 00:20:43 +0200 | [diff] [blame] | 38 | default: https://gerrit.nordix.org |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 39 | description: HTTPS URL of Project Repo on Nordix Gerrit to clone repo |
| 40 | - string: |
| 41 | name: GIT_BASE_SSH |
Fatih Degirmenci | 9a746ac | 2018-10-23 00:20:43 +0200 | [diff] [blame] | 42 | default: ssh://$GERRIT_USER@gerrit.nordix.org:29418 |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 43 | description: HTTPS URL of Project Repo on Nordix Gerrit to clone repo |
| 44 | |
| 45 | - parameter: |
| 46 | name: onap-gerrit-parameters |
| 47 | parameters: |
| 48 | - string: |
| 49 | name: GERRIT_USER |
| 50 | default: nordix |
| 51 | description: Non-interactive user to stream Gerrit Events on ONAP Gerrit |
| 52 | - string: |
| 53 | name: GIT_BASE_HTTPS |
Fatih Degirmenci | 9a746ac | 2018-10-23 00:20:43 +0200 | [diff] [blame] | 54 | default: https://gerrit.onap.org/r/p |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 55 | description: HTTPS URL to Project Repo on ONAP Gerrit to clone repo |
| 56 | - string: |
| 57 | name: GIT_BASE_SSH |
Fatih Degirmenci | 9a746ac | 2018-10-23 00:20:43 +0200 | [diff] [blame] | 58 | default: ssh://$GERRIT_USER@gerrit.onap.org:29418 |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 59 | description: SSH URL to Project Repo on ONAP Gerrit to clone repo |
| 60 | |
| 61 | # defaults for job build history |
| 62 | - property: |
| 63 | name: logrotate-default |
| 64 | properties: |
| 65 | - build-discarder: |
| 66 | days-to-keep: 60 |
| 67 | num-to-keep: 200 |
| 68 | artifact-days-to-keep: 60 |
| 69 | artifact-num-to-keep: 200 |
| 70 | |
| 71 | # defaults for SCM and Gerrit |
| 72 | - scm: |
| 73 | name: git-scm |
| 74 | scm: |
Fatih Degirmenci | 352a9b1 | 2018-10-19 15:36:09 +0200 | [diff] [blame] | 75 | - git: |
Fatih Degirmenci | 9a746ac | 2018-10-23 00:20:43 +0200 | [diff] [blame] | 76 | url: '$GIT_BASE_SSH/$PROJECT' |
Fatih Degirmenci | 627036b | 2018-10-23 00:37:19 +0200 | [diff] [blame] | 77 | credentials-id: '{ssh-credentials-id}' |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 78 | branches: |
Fatih Degirmenci | 352a9b1 | 2018-10-19 15:36:09 +0200 | [diff] [blame] | 79 | - 'refs/heads/{branch}' |
| 80 | refspec: '{refspec}' |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 81 | timeout: 15 |
| 82 | per-build-tag: false |
| 83 | skip-tag: true |
| 84 | shallow-clone: false |
| 85 | use-author: false |
| 86 | ignore-notify: false |
| 87 | wipe-workspace: true |
| 88 | prune: false |
Fatih Degirmenci | 352a9b1 | 2018-10-19 15:36:09 +0200 | [diff] [blame] | 89 | choosing-strategy: 'default' |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 90 | |
| 91 | - scm: |
| 92 | name: git-scm-gerrit |
| 93 | scm: |
| 94 | - git: |
Fatih Degirmenci | 9a746ac | 2018-10-23 00:20:43 +0200 | [diff] [blame] | 95 | url: '$GIT_BASE_SSH/$PROJECT' |
Fatih Degirmenci | 627036b | 2018-10-23 00:37:19 +0200 | [diff] [blame] | 96 | credentials-id: '{ssh-credentials-id}' |
Fatih Degirmenci | 352a9b1 | 2018-10-19 15:36:09 +0200 | [diff] [blame] | 97 | branches: |
| 98 | - 'refs/heads/{branch}' |
| 99 | refspec: '{refspec}' |
| 100 | timeout: 15 |
| 101 | per-build-tag: false |
| 102 | skip-tag: true |
| 103 | shallow-clone: false |
| 104 | use-author: false |
| 105 | ignore-notify: false |
| 106 | wipe-workspace: true |
| 107 | prune: false |
Fatih Degirmenci | 03be82a | 2018-10-18 12:16:14 +0200 | [diff] [blame] | 108 | choosing-strategy: 'gerrit' |
Fatih Degirmenci | 1fab66d | 2018-10-18 15:14:30 +0200 | [diff] [blame] | 109 | |
Fatih Degirmenci | a2beeb2 | 2018-12-10 10:57:50 -0800 | [diff] [blame] | 110 | # triggers for Nordix Gerrit |
Fatih Degirmenci | 1fab66d | 2018-10-18 15:14:30 +0200 | [diff] [blame] | 111 | - trigger: |
| 112 | name: nordix-gerrit-trigger-patchset-created |
| 113 | triggers: |
| 114 | - gerrit: |
| 115 | server-name: 'Nordix Gerrit' |
| 116 | trigger-on: |
| 117 | - patchset-created-event: |
| 118 | exclude-drafts: 'false' |
| 119 | exclude-trivial-rebase: 'false' |
| 120 | exclude-no-code-change: 'false' |
| 121 | - draft-published-event |
| 122 | - comment-added-contains-event: |
| 123 | comment-contains-value: 'recheck' |
| 124 | - comment-added-contains-event: |
| 125 | comment-contains-value: 'reverify' |
| 126 | projects: |
| 127 | - project-compare-type: 'ANT' |
| 128 | project-pattern: '{project}' |
| 129 | branches: |
| 130 | - branch-compare-type: 'ANT' |
| 131 | branch-pattern: '**/{branch}' |
| 132 | file-paths: |
| 133 | - compare-type: 'ANT' |
| 134 | pattern: '{files}' |
| 135 | skip-vote: |
| 136 | successful: false |
| 137 | failed: false |
| 138 | unstable: false |
| 139 | notbuilt: false |
| 140 | |
| 141 | - trigger: |
| 142 | name: nordix-gerrit-trigger-change-merged |
| 143 | triggers: |
| 144 | - gerrit: |
| 145 | server-name: 'Nordix Gerrit' |
| 146 | trigger-on: |
| 147 | - change-merged-event |
| 148 | - comment-added-contains-event: |
| 149 | comment-contains-value: 'remerge' |
| 150 | projects: |
| 151 | - project-compare-type: 'ANT' |
| 152 | project-pattern: '{project}' |
| 153 | branches: |
| 154 | - branch-compare-type: 'ANT' |
| 155 | branch-pattern: '**/{branch}' |
| 156 | file-paths: |
| 157 | - compare-type: 'ANT' |
| 158 | pattern: '{files}' |
Fatih Degirmenci | f1d9610 | 2018-10-19 15:10:56 +0200 | [diff] [blame] | 159 | |
Conor Ward | d48d835 | 2019-01-02 15:54:28 +0000 | [diff] [blame] | 160 | - trigger: |
| 161 | name: nordix-gerrit-push-upstream |
| 162 | triggers: |
| 163 | - gerrit: |
| 164 | server-name: 'Nordix Gerrit' |
| 165 | trigger-on: |
| 166 | - comment-added-contains-event: |
| 167 | comment-contains-value: 'push-upstream' |
| 168 | projects: |
| 169 | - project-compare-type: 'ANT' |
| 170 | project-pattern: '{project}' |
| 171 | branches: |
| 172 | - branch-compare-type: 'ANT' |
| 173 | branch-pattern: '**/{branch}' |
| 174 | file-paths: |
| 175 | - compare-type: 'ANT' |
| 176 | pattern: '{files}' |
| 177 | |
Fatih Degirmenci | a2beeb2 | 2018-12-10 10:57:50 -0800 | [diff] [blame] | 178 | # triggers for ONAP Gerrit |
| 179 | - trigger: |
| 180 | name: onap-gerrit-trigger-change-merged |
| 181 | triggers: |
| 182 | - gerrit: |
| 183 | server-name: 'ONAP Gerrit' |
| 184 | trigger-on: |
| 185 | - change-merged-event |
| 186 | - comment-added-contains-event: |
| 187 | comment-contains-value: 'remerge' |
| 188 | projects: |
| 189 | - project-compare-type: 'ANT' |
| 190 | project-pattern: '{project}' |
| 191 | branches: |
| 192 | - branch-compare-type: 'ANT' |
| 193 | branch-pattern: '**/{branch}' |
| 194 | file-paths: |
| 195 | - compare-type: 'ANT' |
| 196 | pattern: '{files}' |
Fatih Degirmenci | e0611a1 | 2018-12-18 09:24:53 +0100 | [diff] [blame] | 197 | silent: true |
| 198 | silent-start: true |
Fatih Degirmenci | a2beeb2 | 2018-12-10 10:57:50 -0800 | [diff] [blame] | 199 | |
Fatih Degirmenci | f1d9610 | 2018-10-19 15:10:56 +0200 | [diff] [blame] | 200 | # wrappers to use for jobs |
| 201 | - wrapper: |
| 202 | name: nordixinfra-jjb-creds-wrapper |
| 203 | wrappers: |
| 204 | - credentials-binding: |
| 205 | - username-password-separated: |
| 206 | credential-id: nordixinfra-jjb-creds |
| 207 | username: JJB_USERNAME |
| 208 | password: JJB_USERTOKEN |
Fatih Degirmenci | 2804ff9 | 2019-01-29 10:43:13 +0100 | [diff] [blame] | 209 | |
| 210 | # timeout wrapper to use for jobs |
| 211 | - wrapper: |
| 212 | name: build-timeout |
| 213 | wrappers: |
| 214 | - timeout: |
| 215 | timeout: '{timeout}' |
| 216 | timeout-var: 'BUILD_TIMEOUT' |
| 217 | fail: true |