blob: 020691bef948d7aed080fa157463fed4f8ac1a49 [file] [log] [blame]
Zack Williams12783ac2018-06-12 15:13:12 -07001---
2# CORD versioning jobs for tagging/releasing software
3
4# CORD versioning conventions:
5#
6# 1. There is a 1:1 relationship between SemVer _release_ versions described
7# in the commit and the git tag applied to that commit by Jenkins.
8#
9# 2. Non-release versions (ex: 1.0.1-dev3, etc.) can exist in multiple
10# commits, and don't trigger creation of git tags.
11#
12# 3. Git history is public, and therefore shouldn't be rewritten to abandon
13# already merged commits
14#
15# 4. Reverting a commit leaves it in history, so if a broken version is
16# released, the correct action is to make a new fixed version, not try to
17# fix the released version
18#
19# See also: https://jira.opencord.org/browse/CORD-3117
20
21- project:
22 name: versioning-jobs
23
24 branch-regexp: '{modern-branches-regexp}'
Zack Williams8e69efd2018-06-13 15:05:18 -070025 project-regexp: '^bogus-project$'
26# project-regexp: '{imagebuilder-projects-regexp}'
Zack Williams12783ac2018-06-12 15:13:12 -070027
28 jobs:
29 - 'tag-collision-reject'
30 - 'version-tag'
31
32- job-template:
33 id: tag-collision-reject
34 name: "tag-collision-reject"
35 description: |
36 Created by {id} job-template from ci-management/jjb/versioning.yaml
37 Checks for changes to version files, and that they don't duplicate tags
38 already in the git repo.
39
40 triggers:
41 - cord-infra-gerrit-trigger-patchset:
42 gerrit-server-name: '{gerrit-server-name}'
Zack Williams8e69efd2018-06-13 15:05:18 -070043 project-regexp: '{project-regexp}'
Zack Williams12783ac2018-06-12 15:13:12 -070044 branch-regexp: '{branch-regexp}'
45 file-include-regexp: '{all-files-regexp}'
46 dependency-jobs: '{dependency-jobs}'
47
48 properties:
49 - cord-infra-properties:
50 build-days-to-keep: '{build-days-to-keep}'
51 artifact-num-to-keep: '{artifact-num-to-keep}'
52
53 wrappers:
54 - lf-infra-wrappers:
55 build-timeout: '{build-timeout}'
Zack Williams8e69efd2018-06-13 15:05:18 -070056 jenkins-ssh-credential: '{gerrit-ssh-credential}'
Zack Williams12783ac2018-06-12 15:13:12 -070057
58 scm:
59 - lf-infra-gerrit-scm:
60 git-url: '$GIT_URL/$GERRIT_PROJECT'
61 refspec: '$GERRIT_REFSPEC'
62 branch: '$GERRIT_BRANCH'
63 submodule-recursive: 'false'
64 choosing-strategy: gerrit
Zack Williams8e69efd2018-06-13 15:05:18 -070065 jenkins-ssh-credential: '{gerrit-ssh-credential}'
Zack Williams12783ac2018-06-12 15:13:12 -070066
67 node: '{build-node}'
68 project-type: freestyle
69 concurrent: true
70
71 builders:
72 - shell: !include-raw-escape: shell/tagcollisionreject.sh
73
74
75- job-template:
76 id: version-tag
77 name: "version-tag"
78 description: |
79 Created by {id} job-template from ci-management/jjb/release.yaml
80 When a patch is merged, check if it contains a SemVer released version
81 file and if so tags the commit in git with that same version.
82
83 triggers:
84 - cord-infra-gerrit-trigger-merge:
85 gerrit-server-name: '{gerrit-server-name}'
Zack Williams8e69efd2018-06-13 15:05:18 -070086 project-regexp: '{project-regexp}'
Zack Williams12783ac2018-06-12 15:13:12 -070087 branch-regexp: '{branch-regexp}'
88 file-include-regexp: '{all-files-regexp}'
89 dependency-jobs: '{dependency-jobs}'
90
91 properties:
92 - cord-infra-properties:
93 build-days-to-keep: '{build-days-to-keep}'
94 artifact-num-to-keep: '{artifact-num-to-keep}'
95
96 wrappers:
97 - lf-infra-wrappers:
98 build-timeout: '{build-timeout}'
Zack Williams8e69efd2018-06-13 15:05:18 -070099 jenkins-ssh-credential: '{gerrit-ssh-credential}'
Zack Williams12783ac2018-06-12 15:13:12 -0700100
101 scm:
102 - lf-infra-gerrit-scm:
103 git-url: '$GIT_URL/$GERRIT_PROJECT'
104 refspec: '$GERRIT_REFSPEC'
105 branch: '$GERRIT_BRANCH'
106 submodule-recursive: 'false'
107 choosing-strategy: gerrit
Zack Williams8e69efd2018-06-13 15:05:18 -0700108 jenkins-ssh-credential: '{gerrit-ssh-credential}'
Zack Williams12783ac2018-06-12 15:13:12 -0700109
110 node: '{build-node}'
111 project-type: freestyle
112 concurrent: true
113
114 builders:
115 - shell: !include-raw-escape: shell/versiontag.sh
116