Skip to content

Commit

Permalink
[CLOUDCI-350]: Make retry parameters for cloning the pipeline configu…
Browse files Browse the repository at this point in the history
…rable (#209)

* Make retry parameters for cloning the pipeline configurable

Jenkinsfile Runner container entrypoint retries cloning the pipeline
repository. The retry parameters (retry interval and timeout) are
now configurable via Helm chart parameters.
  • Loading branch information
valiparsa authored Feb 5, 2021
1 parent 7692798 commit 8fd574a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
16 changes: 16 additions & 0 deletions changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,22 @@

- type: enhancement
impact: minor

title: Make retry parameters for cloning the pipeline repo configurable
description: |-
Jenkinsfile Runner container entrypoint retries cloning the pipeline
repository. The retry parameters (retry interval and timeout) are now
configurable via Helm chart parameters.
Jenkinsfile Runner image version which enables configuring retry
parameters is also updated in the same PR. Changes in the new
release of JFR image can be found here:
https://github.com/SAP/stewardci-jenkinsfilerunner-image/releases/tag/210205_1988c5e
warning:
upgradeNotes:
deprecations:
pullRequestNumber: 209
jiraIssueNumber: 350

title: Update Jenkinsfile-runner image version
description: |-
Update Jenkinsfile-runner image to a newer version.
Expand Down
2 changes: 2 additions & 0 deletions charts/steward/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ Common parameters:
| <code>pipelineRuns.<wbr/>jenkinsfileRunner.<wbr/>podSecurityPolicy.<wbr/>runAsUser</code> | (integer)<br/> The user ID (UID) of the container processes of the Jenkinsfile Runner pod. The value must be an integer in the range of [1,65535]. Corresponds to field `runAsUser` of a [PodSecurityContext][k8s-podsecuritycontext]. | `1000` |
| <code>pipelineRuns.<wbr/>jenkinsfileRunner.<wbr/>podSecurityPolicy.<wbr/>runAsGroup</code> | (integer)<br/> The group ID (GID) of the container processes of the Jenkinsfile Runner pod. The value must be an integer in the range of [1,65535]. Corresponds to field `runAsGroup` of a [PodSecurityContext][k8s-podsecuritycontext]. | `1000` |
| <code>pipelineRuns.<wbr/>jenkinsfileRunner.<wbr/>podSecurityPolicy.<wbr/>fsGroup</code> | (integer)<br/> A special supplemental group ID of the container processes of the Jenkinsfile Runner pod, that defines the ownership of some volume types. The value must be an integer in the range of [1,65535]. Corresponds to field `fsGroup` of a [PodSecurityContext][k8s-podsecuritycontext]. | `1000` |
| <code>pipelineRuns.<wbr/>jenkinsfileRunner.<wbr/>pipelineCloneRetryIntervalSec</code> | (string)<br/> The retry interval for cloning the pipeline repository (in seconds). | The default value is defined in the Jenkinsfile Runner image. |
| <code>pipelineRuns.<wbr/>jenkinsfileRunner.<wbr/>pipelineCloneRetryTimeoutSec</code> | (string)<br/> The retry timeout for cloning the pipeline repository (in seconds). | The default value is defined in the Jenkinsfile Runner image. |
| <code>pipelineRuns.<wbr/>timeout</code> | (string)<br/> The maximum execution time of pipelines. Must be specified as a string understood by [Go's `time.parseDuration()`](https://godoc.org/time#ParseDuration): <blockquote>A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".</blockquote> | `60m` |
| <code>pipelineRuns.<wbr/>networkPolicy</code> | (string)<br/> DEPRECATED: Use <code>pipelineRuns.<wbr/>networkPolicies</code> instead. | |
| <code>pipelineRuns.<wbr/>defaultNetworkPolicyName</code> | The name of the network policy which is used when no network profile is selected by a pipeline run spec. | `default` if <code>pipelineRuns.<wbr/>networkPolicies</code> is not set or empty. |
Expand Down
4 changes: 4 additions & 0 deletions charts/steward/templates/clustertask-jenkinsfile-runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ spec:
value: '$(params.PIPELINE_LOG_ELASTICSEARCH_TRUSTEDCERTS_SECRET)'
- name: PIPELINE_LOG_ELASTICSEARCH_RUN_ID_JSON
value: '$(params.PIPELINE_LOG_ELASTICSEARCH_RUN_ID_JSON)'
- name: PIPELINE_CLONE_RETRY_INTERVAL_SEC
value: {{ default "" .Values.pipelineRuns.jenkinsfileRunner.pipelineCloneRetryIntervalSec | squote }}
- name: PIPELINE_CLONE_RETRY_TIMEOUT_SEC
value: {{ default "" .Values.pipelineRuns.jenkinsfileRunner.pipelineCloneRetryTimeoutSec | squote }}
- name: RUN_NAMESPACE
value: '$(params.RUN_NAMESPACE)'
- name: JOB_NAME
Expand Down
4 changes: 3 additions & 1 deletion charts/steward/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pipelineRuns:
# Example: http://elasticsearch-primary.elasticsearch.svc.cluster.local:9200/jenkins-logs/_doc
indexURL: ""
jenkinsfileRunner:
image: "stewardci/stewardci-jenkinsfile-runner:210202_42eb583"
image: "stewardci/stewardci-jenkinsfile-runner:210205_1988c5e"
imagePullPolicy: IfNotPresent
javaOpts: >-
-Dhudson.slaves.NodeProvisioner.initialDelay=0
Expand All @@ -100,6 +100,8 @@ pipelineRuns:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
pipelineCloneRetryIntervalSec: ""
pipelineCloneRetryTimeoutSec: ""
timeout: "60m"
# networkPolicy is DEPRECATED: use 'networkPolicies' instead.
# networkPolicy: ""
Expand Down

0 comments on commit 8fd574a

Please sign in to comment.