screwdriver-data-schema 22.8.0 → 22.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/models/pipeline.js +15 -1
  2. package/package.json +1 -1
@@ -11,6 +11,13 @@ const Parameters = require('../config/parameters');
11
11
  const mutate = require('../lib/mutate');
12
12
 
13
13
  const STATES = ['ACTIVE', 'INACTIVE'];
14
+ const BADGE = Joi.object({
15
+ name: Joi.string().max(128).description('The dashboard name for a badge').example('screwdriver/ui'),
16
+ uri: Joi.string()
17
+ .max(500)
18
+ .description('Unique identifier for the badge application dashboard')
19
+ .example('https://sonar.screwdriver.cd/dashboard?id=112233')
20
+ });
14
21
 
15
22
  const CREATE_MODEL = {
16
23
  checkoutUrl: Joi.string()
@@ -90,7 +97,14 @@ const MODEL = {
90
97
  actions: Joi.array().items(Joi.string())
91
98
  })
92
99
  )
93
- .description('List of subscribed scm urls paired with actions')
100
+ .description('List of subscribed scm urls paired with actions'),
101
+
102
+ badges: Joi.object({
103
+ sonar: BADGE
104
+ })
105
+ .description('A list of badges that pipline has')
106
+ .example(`{ sonar: { name: 'dashboard', uri: 'http://sonar.com/sample1' } }`)
107
+ .optional()
94
108
  };
95
109
 
96
110
  const UPDATE_MODEL = { ...CREATE_MODEL, settings: MODEL.settings };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-data-schema",
3
- "version": "22.8.0",
3
+ "version": "22.9.0",
4
4
  "description": "Internal Data Schema of Screwdriver",
5
5
  "main": "index.js",
6
6
  "scripts": {