screwdriver-api 7.0.207 → 7.0.209

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.
@@ -186,6 +186,52 @@ executor:
186
186
  launchVersion: LAUNCH_VERSION
187
187
  # Prefix to the container
188
188
  prefix: EXECUTOR_PREFIX
189
+ k8s-vm:
190
+ enabled: EXECUTOR_K8SVM_ENABLED
191
+ options:
192
+ # Configuration of Docker
193
+ kubernetes:
194
+ # The host or IP of the kubernetes cluster
195
+ host: K8S_HOST
196
+ # The jwt token used for authenticating kubernetes requests
197
+ token: K8S_TOKEN
198
+ jobsNamespace: K8S_JOBS_NAMESPACE
199
+ baseImage: K8S_BASE_IMAGE
200
+ # Resources for build pod
201
+ resources:
202
+ # Number of cpu cores
203
+ cpu:
204
+ micro: K8S_CPU_MICRO
205
+ low: K8S_CPU_LOW
206
+ high: K8S_CPU_HIGH
207
+ # Memory in GB
208
+ memory:
209
+ micro: K8S_MEMORY_MICRO
210
+ low: K8S_MEMORY_LOW
211
+ high: K8S_MEMORY_HIGH
212
+ # Default build timeout for all builds in this cluster
213
+ buildTimeout: K8S_VM_BUILD_TIMEOUT
214
+ # Default max build timeout
215
+ maxBuildTimeout: K8S_VM_MAX_BUILD_TIMEOUT
216
+ # k8s node selectors for build pod scheduling.
217
+ # Value is Object of format { label: 'value' } See
218
+ # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#step-one-attach-label-to-the-node
219
+ # Eg: { dedicated: 'screwdriver' } to schedule pods on nodes having
220
+ # label-value of dedicated=screwdriver
221
+ nodeSelectors:
222
+ __name: K8S_VM_NODE_SELECTORS
223
+ __format: json
224
+ # k8s preferred node selectors for build pod scheduling
225
+ # See https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
226
+ preferredNodeSelectors:
227
+ __name: K8S_VM_PREFERRED_NODE_SELECTORS
228
+ __format: json
229
+ # Launcher image to use
230
+ launchImage: LAUNCH_IMAGE
231
+ # Launcher container tag to use
232
+ launchVersion: LAUNCH_VERSION
233
+ # Prefix to the container
234
+ prefix: EXECUTOR_PREFIX
189
235
  jenkins:
190
236
  enabled: EXECUTOR_JENKINS_ENABLED
191
237
  options:
@@ -157,6 +157,38 @@ executor:
157
157
  docker: {}
158
158
  # Container tags to use
159
159
  launchVersion: stable
160
+ k8s-vm:
161
+ enabled: true
162
+ options:
163
+ # Configuration of Docker
164
+ kubernetes:
165
+ # The host or IP of the kubernetes cluster
166
+ host: kubernetes.default
167
+ # The jwt token used for authenticating kubernetes requests
168
+ # Loaded from /var/run/secrets/kubernetes.io/serviceaccount/token by default
169
+ # Resources for build pod
170
+ resources:
171
+ # Number of cpu cores
172
+ cpu:
173
+ micro: 1
174
+ low: 2
175
+ high: 6
176
+ # Memory in GB
177
+ memory:
178
+ micro: 1
179
+ low: 2
180
+ high: 12
181
+ # Default build timeout for all builds in this cluster (in minutes)
182
+ buildTimeout: 90
183
+ # Default max build timeout (in minutes)
184
+ maxBuildTimeout: 120
185
+ # k8s node selectors for appropriate pod scheduling
186
+ nodeSelectors: {}
187
+ preferredNodeSelectors: {}
188
+ # Launcher image to use
189
+ launchImage: screwdrivercd/launcher
190
+ # Launcher container tag to use
191
+ launchVersion: stable
160
192
  # jenkins:
161
193
  # options:
162
194
  # # Configuration of Jenkins
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-api",
3
- "version": "7.0.207",
3
+ "version": "7.0.209",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -37,6 +37,7 @@
37
37
  "screwdriver-datastore-sequelize",
38
38
  "screwdriver-executor-docker",
39
39
  "screwdriver-executor-k8s",
40
+ "screwdriver-executor-k8s-vm",
40
41
  "screwdriver-executor-queue",
41
42
  "screwdriver-executor-router",
42
43
  "screwdriver-models",
@@ -113,6 +114,7 @@
113
114
  "screwdriver-executor-base": "^10.0.0",
114
115
  "screwdriver-executor-docker": "^7.0.0",
115
116
  "screwdriver-executor-k8s": "^16.0.0",
117
+ "screwdriver-executor-k8s-vm": "^5.0.0",
116
118
  "screwdriver-executor-queue": "^5.0.0",
117
119
  "screwdriver-executor-router": "^4.0.0",
118
120
  "screwdriver-logger": "^2.0.0",
@@ -111,6 +111,7 @@ Query Params:
111
111
  * `type` - *Optional* Get pipeline or pr events (default `pipeline`)
112
112
  * `prNum` - *Optional* Return only PR events of specified PR number
113
113
  * `sha` - *Optional* Search `sha` and `configPipelineSha` for events
114
+ * `groupEventId` - *Optional* Return only events with a specified groupEventId
114
115
  * `id` - *Optional* Fetch specific event ID; alternatively can use greater than(`gt:`) or less than(`lt:`) prefix
115
116
 
116
117
  `GET /pipelines/{id}/events?page={pageNumber}&count={countNumber}&sort={sort}&type={type}&prNum={prNumber}&sha={sha}`
@@ -34,7 +34,7 @@ module.exports = () => ({
34
34
 
35
35
  handler: async (request, h) => {
36
36
  const factory = request.server.app.pipelineFactory;
37
- const { page, count, sha, prNum, id, sort, sortBy } = request.query;
37
+ const { page, count, sha, prNum, id, sort, sortBy, groupEventId } = request.query;
38
38
 
39
39
  return factory
40
40
  .get(request.params.id)
@@ -71,7 +71,11 @@ module.exports = () => ({
71
71
  };
72
72
  }
73
73
 
74
- // Event id filter
74
+ if (groupEventId) {
75
+ config.params.groupEventId = groupEventId;
76
+ }
77
+
78
+ // Event id filter; can use greater than(`gt:`) or less than(`lt:`) prefix
75
79
  if (id) {
76
80
  config.params.id = id;
77
81
  }
@@ -96,6 +100,7 @@ module.exports = () => ({
96
100
  prNum: prNumSchema,
97
101
  sha: shaSchema,
98
102
  id: queryIdSchema,
103
+ groupEventId: pipelineIdSchema,
99
104
  search: joi.forbidden(), // we don't support search for Pipeline list events
100
105
  getCount: joi.forbidden() // we don't support getCount for Pipeline list events
101
106
  })