Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New jenkins helm system #965

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5f31746
Add example values file and update readme
aragilar Aug 30, 2022
2722dbd
Configure a mostly-working system at SLAC
aragilar Aug 4, 2023
12e1efa
Initial version of helmifyed Linux Jenkins Agent
aragilar Aug 4, 2023
0bf50ac
Update top-level README for new directories
aragilar Aug 4, 2023
ee2da39
Add latest improves to controller helm deploy
aragilar Aug 7, 2023
7309062
Update values.yaml
aranabhat Aug 17, 2023
f4ebbb4
Update values.yaml
aranabhat Aug 17, 2023
ed70ebb
Update dev-values.yaml
aranabhat Oct 5, 2023
d1ab2d9
Update dev-values.yaml
aranabhat Nov 23, 2023
1d2bdd6
Update README.md
aranabhat Jan 24, 2024
3611cdd
Update README.md
aranabhat Jan 24, 2024
6864620
Update README.md
aranabhat Jan 24, 2024
014484f
Update README.md
aranabhat Jan 24, 2024
7943e9c
Updated dev-values.yaml to most recent version
aranabhat Feb 27, 2024
0701097
Update values.yaml
aranabhat Feb 27, 2024
ed4762e
Merge pull request #983 from lsst-dm/aranabhat-patch-2
aranabhat Feb 27, 2024
9fd403f
Create .yamllint.yaml
aranabhat Apr 1, 2024
c309970
Update dev-values.yaml
aranabhat Apr 1, 2024
79a3d06
adding longer line length in .yamllint
aranabhat Apr 3, 2024
198bb05
moving .yamllint to workflows
aranabhat Apr 3, 2024
07398b9
disable yamllint line length for dev-values.yaml
aranabhat Apr 3, 2024
d92c609
remove trailing spaces
aranabhat Apr 3, 2024
f501142
edit values.yaml
aranabhat Apr 3, 2024
920dd62
more changes to values.yaml
aranabhat Apr 3, 2024
929e264
add document start and end
aranabhat Apr 3, 2024
6bdca84
end document edit
aranabhat Apr 3, 2024
0d23577
new line
aranabhat Apr 3, 2024
b34538b
values.yaml to new format
aranabhat Apr 3, 2024
1865ccf
spaces
aranabhat Apr 3, 2024
e58cb67
space
aranabhat Apr 3, 2024
d4174b1
Merge pull request #991 from lsst-dm/aranabhat-patch-yaml-test
aranabhat Apr 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
jenkins-dm-jobs
===
# jenkins-dm-jobs

When updating a job in this repo, for example when changing the user-specified
parameters but _not_ when changing the pipeline to be run, manually trigger
the sqre/seeds/dm-jobs job to rebuild the interface.

[![Build Status](https://travis-ci.org/lsst-dm/jenkins-dm-jobs.png)](https://travis-ci.org/lsst-dm/jenkins-dm-jobs)

## Installing Jenkins

`seeds` contains a README plus a helm values file for deploying a Jenkins
controller at SLAC. Read that README for more details.

`lsst-jenkins-swarm-agent` contains a helm chart to run a Linux Jenkins Agent
and associated containers needed for tests/package. Documentation for this has
not yet been created (you'll need to look at the individual templates).
23 changes: 23 additions & 0 deletions lsst-jenkins-swarm-agent/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions lsst-jenkins-swarm-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: lsst-jenkins-swarm-agent
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives

Check failure on line 7 in lsst-jenkins-swarm-agent/Chart.yaml

View workflow job for this annotation

GitHub Actions / lint

7:81 [line-length] line too long (95 > 80 characters)
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as

Check failure on line 10 in lsst-jenkins-swarm-agent/Chart.yaml

View workflow job for this annotation

GitHub Actions / lint

10:81 [line-length] line too long (99 > 80 characters)
# a dependency of application charts to inject those utilities and functions into the rendering

Check failure on line 11 in lsst-jenkins-swarm-agent/Chart.yaml

View workflow job for this annotation

GitHub Actions / lint

11:81 [line-length] line too long (95 > 80 characters)
# pipeline. Library charts do not define any templates and therefore cannot be deployed.

Check failure on line 12 in lsst-jenkins-swarm-agent/Chart.yaml

View workflow job for this annotation

GitHub Actions / lint

12:81 [line-length] line too long (88 > 80 characters)
type: application

# This is the chart version. This version number should be incremented each time you make changes

Check failure on line 15 in lsst-jenkins-swarm-agent/Chart.yaml

View workflow job for this annotation

GitHub Actions / lint

15:81 [line-length] line too long (97 > 80 characters)
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be

Check failure on line 20 in lsst-jenkins-swarm-agent/Chart.yaml

View workflow job for this annotation

GitHub Actions / lint

20:81 [line-length] line too long (93 > 80 characters)
# incremented each time you make changes to the application. Versions are not expected to

Check failure on line 21 in lsst-jenkins-swarm-agent/Chart.yaml

View workflow job for this annotation

GitHub Actions / lint

21:81 [line-length] line too long (89 > 80 characters)
# follow Semantic Versioning. They should reflect the version the application is using.

Check failure on line 22 in lsst-jenkins-swarm-agent/Chart.yaml

View workflow job for this annotation

GitHub Actions / lint

22:81 [line-length] line too long (87 > 80 characters)
# It is recommended to use it with quotes.
appVersion: "1.0.0"
62 changes: 62 additions & 0 deletions lsst-jenkins-swarm-agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "lsst-jenkins-swarm-agent.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "lsst-jenkins-swarm-agent.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "lsst-jenkins-swarm-agent.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "lsst-jenkins-swarm-agent.labels" -}}
helm.sh/chart: {{ include "lsst-jenkins-swarm-agent.chart" . }}
{{ include "lsst-jenkins-swarm-agent.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "lsst-jenkins-swarm-agent.selectorLabels" -}}
app.kubernetes.io/name: {{ include "lsst-jenkins-swarm-agent.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "lsst-jenkins-swarm-agent.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "lsst-jenkins-swarm-agent.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
12 changes: 12 additions & 0 deletions lsst-jenkins-swarm-agent/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "lsst-jenkins-swarm-agent.fullname" . }}

Check failure on line 4 in lsst-jenkins-swarm-agent/templates/service.yaml

View workflow job for this annotation

GitHub Actions / lint

4:11 [braces] too many spaces inside braces
labels:
{{- include "lsst-jenkins-swarm-agent.labels" . | nindent 4 }}
spec:
type: ClusterIP
selector:
{{- include "lsst-jenkins-swarm-agent.selectorLabels" . | nindent 4 }}
# See https://kubernetes.io/docs/concepts/services-networking/service/#headless-services
clusterIP: None
12 changes: 12 additions & 0 deletions lsst-jenkins-swarm-agent/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "lsst-jenkins-swarm-agent.serviceAccountName" . }}
labels:
{{- include "lsst-jenkins-swarm-agent.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
Loading
Loading