Compare commits

...

149 Commits

Author SHA1 Message Date
github-actions[bot] 08f0a74771
chore: update Jenkins lts version to 2.528.1 (#1137)
Co-authored-by: brokenpip3 <40476330+brokenpip3@users.noreply.github.com>
2025-10-26 21:57:13 +01:00
fuero bf040e1188
Removes disabling insecure protocols (#1129)
Co-authored-by: Luigi Operoso <40476330+brokenpip3@users.noreply.github.com>
2025-10-06 13:13:12 +02:00
Ilya Pyatizbyantsev b8a756909f
docs: remove duplicated 'image' key (#1133)
Co-authored-by: Luigi Operoso <40476330+brokenpip3@users.noreply.github.com>
2025-10-05 19:03:01 +02:00
github-actions[bot] 697dc1b370
chore: update Jenkins lts version to 2.516.3 (#1135)
Co-authored-by: brokenpip3 <40476330+brokenpip3@users.noreply.github.com>
2025-10-05 18:58:55 +02:00
Luigi Operoso ac3db2fbc6
feat: automatic update of jenkins lts version and base plugins (#1134) 2025-10-05 18:36:57 +02:00
Benjamin Herbert ae9cb0c7f5
fix(backup): Add error handling and logging backup and restore scripts (#1120)
Co-authored-by: Luigi Operoso <40476330+brokenpip3@users.noreply.github.com>
2025-07-16 23:43:08 +02:00
Benjamin Herbert 3300775a1d
docs: improve (#1121) 2025-07-10 23:32:35 +02:00
github-actions[bot] 8a66d658eb
Auto-updated Kubernetes Manifests (#1112)
Co-authored-by: brokenpip3 <40476330+brokenpip3@users.noreply.github.com>
2025-04-21 11:45:35 +02:00
Tobia De Koninck 69bdd916d5
Add option to skip install of plugins (#1065)
Co-authored-by: Luigi Operoso <40476330+brokenpip3@users.noreply.github.com>
2025-04-21 11:38:28 +02:00
github-actions[bot] 132fcb22dc
Auto-updated Kubernetes Manifests (#1108)
Co-authored-by: brokenpip3 <40476330+brokenpip3@users.noreply.github.com>
2025-04-06 23:28:12 +02:00
github-actions[bot] ee191bfc4e
Release 0.9.0-beta1 Helm Chart (#1107)
Co-authored-by: brokenpip3 <40476330+brokenpip3@users.noreply.github.com>
2025-04-06 23:26:33 +02:00
github-actions[bot] 191caefbbe
Auto-updated Kubernetes Manifests (#1106)
Co-authored-by: brokenpip3 <40476330+brokenpip3@users.noreply.github.com>
2025-04-06 23:22:19 +02:00
Luigi Operoso 627d3d2af2
chore: prepare release v0.9.0-beta1 (#1105) 2025-04-06 23:21:12 +02:00
Luigi Operoso 17d3c0bf4b
chore: bump jenkins and golang.org/x/crypto (#1104) 2025-04-06 10:12:51 +02:00
Luigi Operoso faf812a0ce
feat: add matrix tests for bats and replace the old devoptics plugin in tests (#1102) 2025-04-05 18:27:17 +02:00
Luigi Operoso 832debbd45
chore: bump version to 2.492.2-lts and update helm chart readme (#1101) 2025-03-30 23:20:31 +02:00
dependabot[bot] 4b3600ff0e
build(deps-dev): bump the npm group across 1 directory with 3 updates (#1100)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: brokenpip3 <brokenpip3@gmail.com>
Co-authored-by: Luigi Operoso <40476330+brokenpip3@users.noreply.github.com>
2025-03-30 19:20:42 +02:00
dependabot[bot] 3b61208f2e
build(deps): bump the actions group across 1 directory with 5 updates (#1098)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: brokenpip3 <brokenpip3@gmail.com>
2025-03-30 18:58:10 +02:00
Luigi Operoso bec1c61e27
fix(backup): exec of backup binaries can be executed by random id (for ocp compatibility) (#1099) 2025-03-30 18:32:17 +02:00
Luigi Operoso 2864a85364
chore: pin github actions, update and freeze pre-commit hooks, update nix flake (#1097) 2025-03-30 18:11:32 +02:00
Manish Bhasin 9c09db8031
update to go 1.22 and operator-sdk 1.35 (#1094)
Co-authored-by: brokenpip3 <brokenpip3@gmail.com>
Co-authored-by: Ansh Garhewal <me@anshdevs.in>
Co-authored-by: xmbhasin <xmbhasin@users.noreply.github.com>
2025-03-30 16:37:15 +02:00
Manish Bhasin 1ec83b9de9
fix(bats-tests): lifecycle hook injection test failing (#1095)
Co-authored-by: xmbhasin <xmbhasin@users.noreply.github.com>
2025-03-27 00:19:52 +01:00
Daniel Beck f0da3494ae
Delete workflow using backdoored action
https://news.ycombinator.com/item?id=43368870
0e58ed8671
2025-03-15 11:09:10 +01:00
DionJones615 d919a2a11c
fix(master): pass lifecycle configuration to master container (#1062) 2024-11-22 01:03:01 +01:00
Luigi Operoso a4fa09b2ed
chore: plugins and lts version october update (#1070) 2024-10-21 00:00:49 +02:00
Benjamin Herbert bb33b8ffa0
Fix broken links on Jenkins API type docs (#1067) 2024-10-17 12:03:21 +02:00
dependabot[bot] 7cdffbe716
build(deps): bump the actions group across 1 directory with 2 updates (#1038)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-25 15:48:27 +02:00
Luigi Operoso 24eac18564
fix(test): helm/bats + chore(blog): add 0.8.1 release note (#1033) 2024-07-08 08:56:23 +02:00
Luigi Operoso 3a5b7f6b4f
fix(ci): release go env version (#1032) 2024-07-05 19:07:37 +02:00
github-actions[bot] 6abbd56e77
Auto-updated Kubernetes Manifests (#1031)
Co-authored-by: brokenpip3 <40476330+brokenpip3@users.noreply.github.com>
2024-07-05 17:27:50 +02:00
github-actions[bot] b63b31a398
Release 0.8.1 Helm Chart (#1030)
Co-authored-by: brokenpip3 <40476330+brokenpip3@users.noreply.github.com>
2024-07-05 17:27:10 +02:00
github-actions[bot] 7c6616b2bf
Auto-updated Kubernetes Manifests (#1029)
Co-authored-by: brokenpip3 <40476330+brokenpip3@users.noreply.github.com>
2024-07-05 15:04:29 +02:00
Luigi Operoso 57a1b6bfb9
chore: prepare 0.8.1 bug fix release (#1028) 2024-07-04 23:38:48 +02:00
Luigi Operoso 5e962b26ae
fix(operator): deprecated jnlpUrl (#1026) 2024-07-02 22:39:50 +02:00
dependabot[bot] 0911dfe64a
build(deps): bump the actions group across 1 directory with 2 updates (#1019)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 23:30:29 +02:00
Luigi Operoso b722ef11ae
feat(backup): logs everything to stdout/err, implement lock file for both backup/restore (#1023) 2024-06-25 23:29:35 +02:00
DionJones615 5ef6c730de
fix(backup): Duplicated backups & restores (#1021) 2024-06-25 18:44:55 +02:00
Luigi Operoso e0f52b5bdf
chore(operator): update jenkins latest img and plugins, use latest backup in bats tests (#1022) 2024-06-22 16:27:38 +02:00
Evgenii f98b0bc5ee
fix(backup): find race and disable search in subdir, always test latest backup image in e2e, bump backup to 0.3.x (#1011)
Co-authored-by: brokenpip3 <brokenpip3@gmail.com>
2024-06-22 09:47:24 +02:00
github-actions[bot] e40032497b
Auto-updated Kubernetes Manifests (#1020)
Co-authored-by: brokenpip3 <40476330+brokenpip3@users.noreply.github.com>
2024-06-11 23:59:07 +02:00
DionJones615 18197e66b7
feat: expose jenkins master terminationGracePeriodSeconds (#1012)
Co-authored-by: brokenpip3 <brokenpip3@gmail.com>
2024-06-11 23:57:48 +02:00
Luigi Operoso 061995a65c
fix: seed job warnings, updated latest lts and plugins (#1018) 2024-06-02 23:33:56 +02:00
Evgenii 25b329aa13
fix(backup): use atomic mv to create backup (#1000) 2024-05-05 16:54:04 +02:00
dependabot[bot] 3f036bdea7
build(deps): bump the actions group with 5 updates (#1005)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-24 09:26:16 +02:00
Rafał Krzewski cf49a4a28f
Control cert-manager installation with a separate config value (#972)
Co-authored-by: Rafał Krzewski <rafal.krzewski@caltha.eu>
Co-authored-by: Luigi Operoso <40476330+brokenpip3@users.noreply.github.com>
Co-authored-by: brokenpip3 <brokenpip3@gmail.com>
2024-03-16 16:28:15 +00:00
dependabot[bot] 6dd45eebf0
build(deps): bump the actions group with 5 updates (#985)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Operoso <40476330+brokenpip3@users.noreply.github.com>
2024-03-16 15:39:13 +00:00
Luigi Operoso 1a7dc9107a
fix(test): bats test fix webhook upgrade (#987) 2024-03-16 16:24:22 +01:00
Luigi Operoso 036b20c01b
feat(test): better bats tests, install from latest tag and then update from master (#986) 2024-03-15 20:57:30 +01:00
Luigi Operoso 48aa102342
fix(website): base url in website build (#984) 2024-03-10 17:52:47 +01:00
Luigi Operoso 4f03cefda0
Fix website build and 0.8.x pages, move deploy to workflow and nixify the website part (#982) 2024-03-10 17:30:01 +01:00
dependabot[bot] cee202004d
build(deps-dev): bump the npm group in /website with 1 update (#981)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 11:18:46 +01:00
Luigi Operoso be737522f0
feat: make ginkgo tests as matrix (#979)
- make ginkgo tests as matrix for easily re-run failing tests or checking logs
- fix pod restart check
2024-02-26 00:00:37 +01:00
Luigi Operoso ec20bbe630
fix: mkdir bin before link helm (#978) 2024-02-24 17:21:23 +01:00
Luigi Operoso 81251d3ddc
chore: update jenkins and plugins to latest lts, update gh actions, add flake, remove minikube and use kind (#974)
- update to latest jenkins lts
- update github actions
- add nix flake (experimental, build artifacts still wip)
- remove minikube and use kind for a better experience
2024-02-24 17:08:10 +01:00
dependabot[bot] 95f0215c37
build(deps-dev): bump the npm group in /website with 2 updates (#958)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-13 23:43:50 +01:00
João Valença bfda3c8cf9
Provides an Override to the WATCH_NAMESPACE env variable. (#923)
Co-authored-by: João Valença <joao.valenca@feedzai.com>
2024-02-04 18:34:36 +01:00
Aniket Shitole 332eabe8d7
Modified ldap.md for issue #937 (#951) 2024-02-04 11:24:47 +01:00
Pavel Mashchenskiy 2ba5334c10
Fix: change default value for configurationAsCode and groovyScripts (#947)
Co-authored-by: Pavel Mashchenskiy <pavel.mashchenskiy@ims.co.at>
2024-01-07 12:20:38 +01:00
Yuedong Wu 50c7217daa
Fix: use consistent imagePullPolicy when enable Jenkins backup (#939) 2023-11-28 09:48:07 +01:00
Luigi Operoso 8d61604b03
fix(tests) (#936) 2023-11-19 14:04:23 +01:00
dependabot[bot] 63e8a76b95
build(deps-dev): bump the npm group in /website with 2 updates (#929)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 00:27:48 +01:00
Luigi Operoso 138e569841
fix(ci): update devcontainers, github actions config, bats action (#928) 2023-11-13 00:26:13 +01:00
Ilya Pyatizbyantsev 3682468b5f
Combine dark and regular logo in README.md (#915) 2023-10-15 16:31:07 +02:00
github-actions[bot] d70f70f0f4
Auto-updated Kubernetes Manifests (#901)
Co-authored-by: brokenpip3 <brokenpip3@users.noreply.github.com>
2023-10-12 10:02:59 +02:00
brokenpip3 a6e32fde98
bump to 0.8.0 2023-09-13 10:15:42 +02:00
github-actions[bot] 8268c1e4c5
Release 0.8.0 Helm Chart (#908)
Co-authored-by: brokenpip3 <brokenpip3@users.noreply.github.com>
2023-09-13 08:56:20 +02:00
Luigi Operoso 2c88fe13a8
chore(jenkins): update latest lts and plugins version (#900) 2023-09-05 15:21:44 +02:00
Luigi Operoso 1b6e944ae6
fix(chart): #873 operator watch namespace (#899) 2023-09-05 11:56:56 +02:00
Rob Ratcliffe 01a3990d66
Fix #873 (#875) 2023-07-05 21:28:57 +02:00
dependabot[bot] b95ccec075
build(deps-dev): bump postcss-cli from 5.0.1 to 7.1.2 in /website (#872)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-01 00:21:39 +02:00
github-actions[bot] 0fe4456abc
Auto-updated Kubernetes Manifests (#864)
Co-authored-by: brokenpip3 <brokenpip3@users.noreply.github.com>
2023-07-01 00:21:09 +02:00
Luigi Operoso 181bcc3316
fix(ci): auto generate manifests cleanup (#871) 2023-07-01 00:19:15 +02:00
Luigi Operoso 6065f012ee
chore(ci): remove some garbage from auto-generate manifests (#869) 2023-06-30 23:54:50 +02:00
github-actions[bot] 7233d82237
Release 0.8.0-beta.2 Helm Chart (#868)
Co-authored-by: brokenpip3 <brokenpip3@users.noreply.github.com>
2023-06-30 23:24:08 +02:00
Luigi Operoso e79b06024a
chore: preparing v0.8.0-beta2 version bump (#866) 2023-06-29 09:05:29 +02:00
Luigi Operoso 5ddcf1075d
fix: latestplugin always true, add more complex bats tests, update devcontainers and make manifests (#857) 2023-06-27 09:37:31 +02:00
Luigi Operoso 0abc758dc3
chore: several minor updates, bump helm, base-plugins and backup base img (#865) 2023-06-26 12:43:24 +02:00
Luigi Operoso 97892a4cbd
wip feat(ci): Auto update k8s manifests, chart: add operator live/readiness probe (#860) 2023-06-25 21:34:27 +02:00
Luigi Operoso c2c249aa48
fix(ci): remove sembump (#859) 2023-06-25 15:59:05 +02:00
Luigi Operoso 6cceedba77
fix(backup): get-latest.sh, search for both .gz and .zstd (#858) 2023-06-25 15:48:36 +02:00
Luigi Operoso 3fe842fff4
chore: prearing version bumpt to v0.8.0-beta2 (#849) 2023-06-06 00:10:36 +02:00
Luigi Operoso 813cbc812e
fix: hugo and backup ci again (#848) 2023-06-05 23:54:37 +02:00
Luigi Operoso 93d3e9eb9f
fix hugo and backup version, fix backup ci (#847) 2023-06-05 23:20:03 +02:00
dependabot[bot] e6bd8c3f14
Bump peter-evans/create-pull-request from 3 to 5 (#817)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 23:06:57 +02:00
dependabot[bot] 936dbc4713
Bump actions/checkout from 2 to 3 (#815)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 23:06:17 +02:00
dependabot[bot] dab511fed3
Bump docker/login-action from 1 to 2 (#819)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 23:05:43 +02:00
Luigi Operoso 1e4ffd4718
fix: backup trimming, only selecting zstd file (#846) 2023-06-05 23:05:16 +02:00
Luigi Operoso 4e5f9d562f
chore: add v0.8.0 doc (#845) 2023-06-05 22:54:54 +02:00
Luigi Operoso d9ea2ee83b
feat: attempt to move restore before seed job creation (#844) 2023-06-04 13:35:14 +02:00
Luigi Operoso 00bb04745b
Fix: add tollerations again (#842)
Signed-off-by: tombokombo <tombo@sysart.tech>
Co-authored-by: Tomas Hulata <tombo@sysart.tech>
2023-05-30 09:36:55 +02:00
Luigi Operoso 3275be357a
feat: use zstd instead of gz by default, fix the backup script (#841) 2023-05-26 16:10:24 +02:00
Luigi Operoso 44a7d2460a
feat(repo): add stale bot (#836) 2023-05-09 00:26:02 +02:00
Luigi Operoso 7bccdc21b1
chore: update to latest lts, update plugins, remove devbots, add devcontainer (#835)
Update to the latest lts
Update plugins
Remove devbots
Initial devcontainer config
2023-05-09 00:12:54 +02:00
Alexander Robson 5058fc2a6e
chore: Update git ls-files cmd with missing arg (#832) 2023-05-05 16:05:39 +02:00
Alexander Robson a690c7cc6c
chore(doc): Update links in README (#829) 2023-04-27 19:46:44 +02:00
github-actions[bot] f97badca9c
Release v0.8.0-beta Helm Chart (#825)
Co-authored-by: brokenpip3 <brokenpip3@users.noreply.github.com>
2023-04-18 00:12:09 +02:00
Luigi Operoso 38eaa0fc55
chore: bump version to v0.8.0-beta (#814)
- add dependabot
- add codespell
- update operator version in helm chart
2023-04-18 00:01:07 +02:00
Luigi Operoso 00fc29e772
chore: update to 2.387.2-lts and base plugins (#811) 2023-04-13 23:22:22 +02:00
github-actions[bot] 605669de0d
Auto-generated docs update (#793)
Co-authored-by: brokenpip3 <brokenpip3@users.noreply.github.com>
2023-03-23 22:24:54 +01:00
Luigi Operoso 901100a759
chore(doc): Add the new chat references (#809) 2023-03-23 22:21:11 +01:00
Luigi Operoso 9fd053b784
feat(operator): several updates (#806)
- prepare to switch from `master` to `main`
- avoid to run workflow in case is not needed
- add a way to bump the lts via make
- use latest jenkins lts 2.387.1
- add the docker labels
- update base plugins
- fix #797 
- Add more tests with bats
- Update base plugin to latest version
- Temporary revert #807 
- Better nightly job
2023-03-23 00:04:57 +01:00
Tomas Hulata e36441a4a2
Add tolerations for jenkis pod (#807)
Signed-off-by: tombokombo <tombo@sysart.tech>
2023-03-17 18:56:29 +01:00
Piotr Ryba 6932b61ff9
chore: Prepare the project for handover (#800) 2023-03-13 16:07:09 +01:00
Luigi Operoso 2f90db9dc9
fix(quay.io): start using quay.io and fix backup push (#805) 2023-03-12 18:29:39 +01:00
Luigi Operoso d91a729ccf
feat(backup): add backup img ci for e2e tests, docker build and push (#795)
also fix the current CI
2023-03-07 00:34:07 +01:00
Luigi Operoso e9fbe575a6
chore(update): use latest jenkins lts: 2.375.3 (#796) 2023-03-07 00:09:23 +01:00
Luigi Operoso cd2efd6722
feat(registry): change the default registry from dockerhub to quay.io (#799) 2023-03-07 00:08:33 +01:00
Alexander Brandes 1adaf00ca7
fix(docs) delete SECURITY.md (#785) 2023-03-02 23:47:29 +01:00
github-actions[bot] c39eaa95b7
Auto-updated docs (#790)
Co-authored-by: prryb <prryb@users.noreply.github.com>
2023-01-19 14:22:39 +01:00
Luigi Operoso fc3fe04581
chore(operator): update operator version in master (#791) 2023-01-19 13:50:56 +01:00
github-actions[bot] 7a72939de8
Auto-updated docs (#789)
Co-authored-by: prryb <prryb@users.noreply.github.com>
2023-01-16 07:32:41 +01:00
Luigi Operoso 60b8ee56de
fix(operator): Attempt to fix all the major issues present atm against the newest jenkins lts version (#784)
* fix(seed): fix #742, workaround #698
Original fix proposal: https://github.com/jenkinsci/kubernetes-operator/issues/742#issuecomment-1304398590

* fix(install-plugin.sh): fix #758, #739
* the fix was original attempted here:
  https://github.com/jenkinsci/kubernetes-operator/pull/764 but was not
  working correctly due to 2-3 additional changes which needed to be
  done
* removed the openshift check because the env is not mention anywhere
  and also the new jenkins-plugin-cli does not a specific command for
  openshift. Finally this does not make any sense in general, the only
  problem in ocp will be the user id that will be mapped to a random uid
  but that's another story. The command to install the plugins should
  remain the same across different k8s flavours.

* fix(doc/test): fix /usr/bin/tini in any doc and validation

* fix(jenkins): remove AdminWhitelistRule to avoid jvm stack trace, see: https://www.jenkins.io/doc/book/security/controller-isolation/jep-235/#api-compatibility

* fix(seed): fix seed img built on a previous jvm, fix #761

* fix(plugin): update the base plugin to work with the newest version of
jenkins:lts

* fix(run): fix #778

* fix(backup): add a trap to remove the tmp dir if the tar fail, also fix: #770

* test(chart): update chart values for testing, will revert before merge

* fix(configmap): leftover

* fix(tests): fix seed job test

* fix(e2e)

* fix(e2e): helm

* fix(operator): update the temporary img to reflect latests changes

* Fix Helm e2e tests

* add trap in case of unwanted exit and make shellcheck happy

* chore(plugin): update git ver to 5.0.0

* fix(backup): always force delete the backup directory

* chore(operator): update the temporary img to reflect latest changes

* chore(jenkins): upgrade jenkins latest lts
2023-01-12 17:29:30 +01:00
github-actions[bot] 6e03948b09
Auto-updated docs (#788)
Co-authored-by: prryb <prryb@users.noreply.github.com>
2023-01-09 22:07:47 +01:00
Peter Becich fbe70f11ca
update image tag for `virtuslab/jenkins-operator-backup-pvc` (#781)
https://hub.docker.com/r/virtuslab/jenkins-operator-backup-pvc/tags
2023-01-08 19:45:01 +01:00
Jelmer Vernooij 3ce8a49d26
Increase memory, to prevent OOM killing (#774) 2023-01-08 19:42:18 +01:00
github-actions[bot] 410c403452
Auto-updated docs (#787)
Co-authored-by: prryb <prryb@users.noreply.github.com>
2023-01-08 19:41:34 +01:00
twildber a8065cc038
adding seedjobagentimage to jenkins chart (#771)
Co-authored-by: Thorsten Wildberger <thorsten.wildberger@capgemini.com>
2023-01-08 19:34:56 +01:00
Eli Ezeugoh addb94f83e
Fix broken link for configuring seed jobs (#780)
Link from Schema docs to seed job is broken
2023-01-08 19:32:49 +01:00
Bastien HUBERT 94b1473c63
Add seedJobAgentImage into CRD (#754)
* Add seedJobAgentImage into CRD

* Fix lint by ignoring auto-generated files
2022-06-29 17:23:23 +02:00
Bartosz Surma bef796af8a
Update and use install-plugins.sh (#756)
* Download install-plugins.sh manually from remote

* Reformat

* Goimports

* Use install-plugins.sh bundled with the operator

* Fix compile error

* Update install-plugins.sh

* Remove redundant param to new install-plugins.sh

Co-authored-by: Piotr Ryba <pryba@virtuslab.com>
2022-06-28 19:14:31 +02:00
github-actions[bot] 4c2671c1a3
Release Helm chart 0.6.2 (#753)
Co-authored-by: Sig00rd <Sig00rd@users.noreply.github.com>
2022-06-22 17:55:00 +02:00
Szymon Fugas e1b1e9cb3c
Bump to 0.7.1 (#752) 2022-06-22 17:46:49 +02:00
github-actions[bot] 4079d4e93e
Release Helm chart 0.6.1 (#751)
Co-authored-by: Sig00rd <Sig00rd@users.noreply.github.com>
2022-06-22 13:31:26 +02:00
Szymon Fugas 63e96c9715
chore: add release workflow (#750)
* Regenerate deepcopy

* Add the workflow

* Stop signing the tag
2022-06-21 15:36:22 +02:00
Piotr Ryba 8fee7f2806 Bump version to v0.7.1 2022-06-20 21:53:45 +02:00
ywang-psee b734b6d74f
Customize jenkins-operator helmchart with adding 'nodeSelector' (#723)
* Customize jenkins-operator helmchart with adding 'nodeSelector'

* Fix nindent in chart template

* Fix nodeSelector position in helm jenkins template
2022-06-20 21:25:37 +02:00
Tomas Hulata 3362aae2a3
helmchart: hostAliases support (#720)
Signed-off-by: tombokombo <tombo@sysart.tech>
2022-06-20 21:22:17 +02:00
Piotr Ryba a97f283fb9
Remove cron validation (#748)
* Remove cron validation

* Bump git plugin
2022-06-20 20:13:35 +02:00
Bastien HUBERT 56b65aed16
Allow to specify seed agent image (#718)
* Allow to specify seed agent image

* Fix formatting issue

* Add optional for documentation

* Add entry for helm chart

* Add default value for helm chart

Co-authored-by: bhubert <bhubert@expediagroup.com>
2022-06-14 11:39:24 +02:00
Andras Szerdahelyi 46f64fea6a
Seed job SCM may now be configured with github-branch-source/GitHubAppCredentials (#719)
* Now allowing seed jobs to be configured with GithubAppCredential

* fmt

* Validation for GithubAppCredentials type seed job SCM secret

* GithubAppCredentials validation error messages were not referring to actual GithubAppCredentials fields

* cleanup
2022-05-31 16:04:03 +02:00
thecooldrop 13f871b1e4
Remove the validation of plugin version against a regex (#729) 2022-04-04 11:52:13 +02:00
Mateusz Korus 4fde1df8d8
Fix nil reference panic when using non-http readiness probe (#735) 2022-04-04 11:51:34 +02:00
github-actions[bot] 49bdf518de
Auto-updated docs (#724)
Co-authored-by: Sig00rd <Sig00rd@users.noreply.github.com>
2022-02-28 16:22:06 +01:00
github-actions[bot] d3b1fd8172
Auto-updated docs (#717)
Co-authored-by: MKajzik <MKajzik@users.noreply.github.com>
2022-02-28 16:17:05 +01:00
Mateusz Kajzik 47eb115219
Docs: Fix yaml with configuration 2022-02-18 11:26:54 +01:00
Mateusz Kajzik 4c60936da2 Fix yaml in configuration 2022-02-17 14:34:45 +01:00
Mateusz Kajzik 202d7a87b7
Merge pull request #1 from jenkinsci/master
Merge master
2022-02-17 14:02:29 +01:00
Bastien HUBERT 29c5b1e705
Fix nightly release pipeline (#714)
* Add buildx create command to makefile to specify driver for the builder

* Use docker-container as driver for docker buildx

Co-authored-by: bhubert <bhubert@expediagroup.com>
2022-02-16 12:33:17 +01:00
Guillaume Le Biller 17a5bfec3e
Build multi-arch images (#693)
* Build multi-arch images

* Reduce CPU requirements for jenkins instances in e2e tests

* Bump Jenkins LTS & plugins versions
2022-02-15 14:51:29 +01:00
Szymon Fugas e8414c09a8
chore: enable manual run of nightly builds with possibility of skipping tests (#712)
* Add manual dispatch trigger for nightly build workflow, with an input parameter for optionally skipping the e2e and helm tests part of the workflow

* Bump how much memory to start minikube cluster with on e2e test workflows

* Log events from default namespace on tests failure, bump the limit of kubernetes events logged to 30

* Bump workflow-job plugin version used by default from 2.42 to 1145.v7f2433caa07f
2022-02-10 18:03:08 +01:00
João Valença 424ec3fbc2
Receive plugins' versions with underscores. (#699)
* Receive plugins versions with underscores.

New jenkins plugin versions have underscores in them (example: https://plugins.jenkins.io/credentials/). The operator refuses configuration for such plug-ins as they do not match the existing regex.

* Add tests to underscores in plugin versions

Adds a new test to check that versions with underscores are valid.

* Synchronise regexps character order to avoid range

Make two related regexps more evidently similar to each other and re-order the symbols so that the - is not interpreted.
2022-01-27 10:58:27 +01:00
thecooldrop 0f507409cc
Fixes #687 (#688)
This is necessary in order to be able to provide the annotations attached to the
service account associated with the Jenkins master instance.

Co-authored-by: Vanio Begic <vanio.begic@capgemini.com>
2021-12-23 13:37:08 +01:00
Andre 2724ec2f70
#685 Do not strip leading whitespace from priorityClassName in helm template (#686) 2021-12-22 08:16:11 +01:00
Andre 7fb4add0b2
#689 ignore packaged helm charts (#690) 2021-12-21 09:20:00 +01:00
Szymon Fugas 64de9aad91
chore: fix Helm chart release workflow (#683)
Modified sed usage in Helm chart release workflow to account for dependencies section present in Chart.yaml 

Unify usage of sed across Helm chart release workflow
2021-12-15 14:40:03 +01:00
Sylwia Brant dd6e48c8d5 Release 0.6.0 Helm Chart 2021-12-08 14:22:11 +01:00
Sylwia Brant 2b158d5bda Update Operator image in Helm Chart 2021-12-08 14:03:52 +01:00
github-actions[bot] 445d48ab54
Auto-updated docs (#681)
Co-authored-by: SylwiaBrant <SylwiaBrant@users.noreply.github.com>
2021-12-08 13:35:21 +01:00
Sylwia Brant 8d953ae457 Update website - 0.7.0 release 2021-12-08 13:18:09 +01:00
375 changed files with 24964 additions and 160534 deletions

View File

@ -1,4 +0,0 @@
# Configuration for devbots-needs-triage - https://devbots.xyz/documentation/needs-triage/
enabled: true
label: "needs triage"

View File

@ -0,0 +1,63 @@
// For format details, see https://aka.ms/devcontainer.json
{
"name": "Jenkins kubernetes operator devcontainer",
"image": "mcr.microsoft.com/devcontainers/base:bookworm",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"enableNonRootDocker": "true",
"moby": "true"
},
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
"version": "latest",
"helm": "latest",
"minikube": "none"
},
"ghcr.io/devcontainers/features/go:1": {
"version": "1.22",
"golangciLintVersion": "1.58.2"
},
"ghcr.io/mpriscella/features/kind:1": {
"version": "latest"
},
"ghcr.io/edouard-lopez/devcontainer-features/bats:0": {
"version": "latest"
},
"ghcr.io/brokenpip3/devcontainers-bats/bats-libs:0": {
},
"ghcr.io/devcontainers/features/nix:1": {
"multiUser": "false",
"extraNixConfig": "experimental-features = nix-command flakes"
},
"ghcr.io/devcontainers/features/hugo:1": {
"version": "v0.99.1"
}
},
// "forwardPorts": [],
"postCreateCommand": "go version",
// "postStartCommand": "nohup bash -c 'minikube start &' > minikube.log 2>&1",
// Configure tool-specific properties.
"customizations": {
"codespaces": {
"openFiles": [
"Makefile"
]
},
// install some vscode extensions
"vscode": {
"extensions": [
"golang.Go",
"jetmartin.bats",
"ms-kubernetes-tools.vscode-kubernetes-tools",
"budparr.language-hugo-vscode",
"GitHub.copilot",
"GitHub.copilot-chat"
]
}
},
// "remoteUser": "root"
}

1
.envrc Normal file
View File

@ -0,0 +1 @@
has nix && use flake

28
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,28 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
groups:
golang:
patterns:
- "*"
- package-ecosystem: "npm"
directory: "/website"
schedule:
interval: "daily"
groups:
npm:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
groups:
actions:
patterns:
- "*"

View File

@ -15,20 +15,3 @@ review them:
- [ ] Commit messages follow [commit message best practices](https://github.com/jenkinsci/kubernetes-operator/blob/master/CONTRIBUTING.md#commit-messages)
_See [the contribution guide](https://github.com/jenkinsci/kubernetes-operator/blob/master/CONTRIBUTING.md) for more details._
## Reviewer Notes
If API changes are included, additive changes must be approved by at least two [OWNERS](https://github.com/jenkinsci/kubernetes-operator/blob/master/OWNERS) and backwards incompatible changes must be approved by [more than 50% of the OWNERS](https://github.com/jenkinsci/kubernetes-operator/blob/master/OWNERS).
# Release Notes
```
Describe any user facing changes here, or delete this block.
Examples of user facing changes:
- API changes
- Bug fixes
- Any changes in behavior
```

47
.github/stale.yml vendored
View File

@ -1,47 +0,0 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
# Number of days of inactivity before a stale Issue or Pull Request is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 30
# Issues with these labels will never be considered stale
exemptLabels:
- frozen
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: true
# Label to use when marking an issue as stale
staleLabel: stale
issues:
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed if no further activity occurs.
If this issue is still affecting you, just comment with any updates and we'll keep it open.
Thank you for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
Closing this issue after a prolonged period of inactivity.
If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!
pulls:
# Comment to post when marking a pull request as stale.
markComment: >
This pull request has been automatically marked as stale because it has not had recent activity.
It will be closed if no further activity occurs.
If this pull request is still relevant, just comment with any updates and we'll keep it open.
Thank you for your contributions.
# Comment to post when closing a stale pull request. Set to `false` to disable
closeComment: >
Closing this pull request after a prolonged period of inactivity.
If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

View File

@ -1,81 +1,99 @@
name: auto-generate-docs
name: Website
# Run this workflow every time a new commit pushed to your repository
on:
push:
branches:
- master
- main
paths:
- 'website/**'
- 'assets/**'
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
paths:
- 'website/**'
- 'assets/**'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "website"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
docs:
# Name the Job
name: auto-generate-docs
# Set the type of machine to run on
update-date:
name: Auto update dates
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' || (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2
- uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
with:
submodules: recursive # Fetch the Docsy theme
fetch-depth: 0
diagnostic-endpoint: ""
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# Checks if the previous commit introduced any changes to website files
- name: Check for changes
run: |
IS_CHANGED=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -Ec "^website*" || :)
[[ $IS_CHANGED -gt 0 ]] && echo "IS_CHANGED=true" >> $GITHUB_ENV || echo "IS_CHANGED=false" >> $GITHUB_ENV
# Sets up the appropriate version of Hugo
- name: Setup Hugo
if: env.IS_CHANGED == 'true'
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.62.2'
extended: true
# Sets up node - required by Hugo
- name: Setup Node
if: env.IS_CHANGED == 'true'
uses: actions/setup-node@v1
with:
node-version: '12.x'
# Installs dependencies required by docsy theme
- name: Install docsy dependencies
if: env.IS_CHANGED == 'true'
run: |
cd website
npm install
npm build
sudo npm install -D --save autoprefixer
sudo npm install -D --save postcss-cli
cd ../
- name: Update last modified date in modified docs
if: env.IS_CHANGED == 'true'
run: |
git diff --name-only --diff-filter=d ${{ github.event.before }} ${{ github.sha }} | grep -E "^website*" \
| sed -e 's/\(.*\)/"\1"/' | xargs sed -i "/date:/c\date: $(date +'%Y-%m-%d')"
# Runs makefile goal - checks changes to /website folder and generates docs
- name: Run Makefile goal
if: env.IS_CHANGED == 'true'
env:
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make generate-docs
# Creates pull request with generated docs
- name: Create Pull Request
if: env.IS_CHANGED == 'true'
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v6
if: env.IS_CHANGED == 'true' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
with:
commit-message: Auto-updated docs
branch: docs-generator
title: Auto-generated docs update
body: |
Auto generated docs from master commit ${{ github.sha }}
website-generate:
name: Auto generate website
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' || (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
steps:
- uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
with:
diagnostic-endpoint: ""
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: nix checks
run: nix flake check
- name: nix build
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: nix build .#website
- name: Setup Pages
id: pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: ./result
website-deploy:
name: Deploy website
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: website-generate
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

View File

@ -0,0 +1,60 @@
name: Update k8s manifests
on:
push:
branches:
- master
- main
paths-ignore:
- 'docs/**'
- 'website/**'
- 'assets/**'
- 'backup/**'
- '*.md'
workflow_dispatch:
release:
types: [published]
jobs:
update-manifest:
name: Update k8s manifests
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up env vars
run: |
echo "HELM_VERSION=v$(sed -n 's/HELM_VERSION=//p' config.base.env)" >> $GITHUB_ENV
- name: Helm lint
run: make helm-lint
#TODO: add also the webhook part and understand if is necessary
- name: Helm update plain manifests
run: |
helm template --set fullnameOverride=jenkins-operator \
--set jenkins.enabled=false \
--set jenkins.backup.enabled=false \
--set jenkins.backup.pvc.enabled=false \
--set operator.resources.limits.cpu=100m \
--set operator.resources.limits.memory=120Mi \
--set operator.resources.requests.cpu=100m \
--set operator.resources.requests.memory=120Mi \
chart/jenkins-operator/ > deploy/all-in-one-v1alpha2.yaml
sed -i '/namespace: default/d' deploy/all-in-one-v1alpha2.yaml
sed -i 's/# Source: .*//g' deploy/all-in-one-v1alpha2.yaml
sed -i 's/app\.kubernetes\.io\/instance: release-name//g' deploy/all-in-one-v1alpha2.yaml
sed -i 's/app\.kubernetes\.io\/managed-by: Helm//g' deploy/all-in-one-v1alpha2.yaml
sed -i 's/helm\.sh\/chart: [a-zA-Z0-9]+//g' deploy/all-in-one-v1alpha2.yaml
sed -i '/^[[:space:]]*$/d' deploy/all-in-one-v1alpha2.yaml
cp chart/jenkins-operator/crds/jenkins-crd.yaml deploy/crds/jenkins.io_jenkins_crd.yaml
- name: Create Pull Request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v6
with:
commit-message: Auto-updated Kubernetes Manifests
branch: manifest-deploy-update
title: Auto-updated Kubernetes Manifests
body: |
Auto-updated Kubernetes Manifests from master commit ${{ github.sha }}

22
.github/workflows/auto-stale-issue.yaml vendored Normal file
View File

@ -0,0 +1,22 @@
name: "Stale issue automation"
on:
workflow_dispatch:
schedule:
- cron: "0 9 * * *"
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
operations-per-run: 200
days-before-issue-stale: 60
days-before-issue-close: 10
exempt-pr-labels: "not-stale"
exempt-issue-labels: "not-stale"

67
.github/workflows/auto-tests-bats.yaml vendored Normal file
View File

@ -0,0 +1,67 @@
name: Tests BATS
on:
push:
branches:
- master
- main
paths-ignore:
- 'docs/**'
- 'website/**'
- 'assets/**'
- 'backup/**'
- '*.md'
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
paths-ignore:
- 'docs/**'
- 'website/**'
- 'assets/**'
- 'backup/**'
- '*.md'
jobs:
run-tests:
if: github.event.pull_request.draft == false
name: BATS test ${{ matrix.test-file }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test-file: ["1-deploy", "2-deploy-with-more-options", "3-deploy-with-webhook"]
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up env vars
run: |
echo "GO111MODULE=on" >> $GITHUB_ENV
echo "GO_VERSION=v$(sed -n 's/GO_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "HELM_VERSION=v$(sed -n 's/HELM_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "KIND_CLUSTER_NAME=$(sed -n 's/KIND_CLUSTER_NAME=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "GOPATH=/home/runner/go" >> $GITHUB_ENV
- name: Prepare go environment
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Ensure Golang runtime dependencies
run: make go-dependencies
- name: Setup Bats and libs
uses: bats-core/bats-action@e412797c46257a2dbf3775f6f6010b33ee6cb99f # 3.0.1
with:
support-path: "${{ github.workspace }}/.bats/bats-support"
assert-path: "${{ github.workspace }}/.bats/bats-assert"
detik-path: "${{ github.workspace }}/.bats/bats-detik"
file-path: "${{ github.workspace }}/.bats/bats-file"
- name: Kind setup
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
cluster_name: ${{env.KIND_CLUSTER_NAME}}
- name: Jenkins Operator - bats tests
env:
BATS_LIB_PATH: "${{ github.workspace }}/.bats"
run: BATS_TEST_PATH=${{matrix.test-file}}.bats make bats-tests

115
.github/workflows/auto-tests-e2e.yaml vendored Normal file
View File

@ -0,0 +1,115 @@
name: Tests E2E
on:
push:
branches:
- master
- main
paths-ignore:
- 'docs/**'
- 'website/**'
- 'assets/**'
- 'backup/**'
- '*.md'
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
paths-ignore:
- 'docs/**'
- 'website/**'
- 'assets/**'
- 'backup/**'
- '*.md'
jobs:
create-e2e-list:
name: E2E Create tests list
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- id: matrix
run: |
script=$(./test/make_matrix_ginkgo.sh e2e)
echo "matrix=${script}" >> $GITHUB_OUTPUT
verify-code:
name: E2E Verify code before tests
runs-on: ubuntu-latest
needs: [create-e2e-list]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up env vars
run: |
echo "GO111MODULE=on" >> $GITHUB_ENV
echo "GO_VERSION=v$(sed -n 's/GO_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "GOPATH=/home/runner/go" >> $GITHUB_ENV
- name: Prepare go environment
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Ensure Golang runtime dependencies
run: make go-dependencies
- name: Verify code formatting
run: make verify
run-e2e-tests:
runs-on: ubuntu-latest
needs: [create-e2e-list, verify-code]
if: github.event.pull_request.draft == false
name: E2E ${{ matrix.test }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.create-e2e-list.outputs.matrix) }}
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up env vars
run: |
echo "GO111MODULE=on" >> $GITHUB_ENV
echo "GO_VERSION=v$(sed -n 's/GO_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "KIND_CLUSTER_NAME=$(sed -n 's/KIND_CLUSTER_NAME=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "GOPATH=/home/runner/go" >> $GITHUB_ENV
- name: Prepare go environment
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Ensure Golang runtime dependencies
run: make go-dependencies
- name: Kind setup
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
cluster_name: ${{env.KIND_CLUSTER_NAME}}
config: kind-cluster.yaml
- name: Prepare environment for e2e
run: |
sudo apt-get update && sudo apt-get install -y socat
sudo mkdir -p $HOME/.kube
sudo chown -R $USER $HOME/.kube
- name: Jenkins Operator - e2e Chart tests
env:
TNAME: ${{ matrix.test }}
TFILE: ${{ matrix.file }}
TLINE: ${{ matrix.line }}
run: |
git reset --hard
printf "\n \n > Running test: %s from file: $s line: %s\n" "${TNAME}" "${TFILE}" "${TLINE}"
make e2e E2E_TEST_ARGS='-ginkgo.v -ginkgo.focus="${TNAME}"'
- name: Debug
if: failure()
shell: bash
continue-on-error: true
run: |
randomns=$(kubectl get ns| grep -i 'ns[0-9]\+' |cut -d ' ' -f 1)
kubectl get pods -n ${randomns}
kubectl get events -n ${randomns}

117
.github/workflows/auto-tests-helm.yaml vendored Normal file
View File

@ -0,0 +1,117 @@
name: Tests HELM
on:
push:
branches:
- master
- main
paths-ignore:
- 'docs/**'
- 'website/**'
- 'assets/**'
- 'backup/**'
- '*.md'
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
paths-ignore:
- 'docs/**'
- 'website/**'
- 'assets/**'
- 'backup/**'
- '*.md'
jobs:
create-helm-list:
name: HELM Create tests list
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- id: matrix
run: |
script=$(./test/make_matrix_ginkgo.sh helm)
echo "matrix=${script}" >> $GITHUB_OUTPUT
verify-code:
name: HELM Verify code before tests
runs-on: ubuntu-latest
needs: [create-helm-list]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up env vars
run: |
echo "GO111MODULE=on" >> $GITHUB_ENV
echo "GO_VERSION=v$(sed -n 's/GO_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "GOPATH=/home/runner/go" >> $GITHUB_ENV
- name: Prepare go environment
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Ensure Golang runtime dependencies
run: make go-dependencies
- name: Verify code formatting
run: make verify
run-helm-tests:
runs-on: ubuntu-latest
needs: [create-helm-list, verify-code]
if: github.event.pull_request.draft == false
name: HELM ${{ matrix.test }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.create-helm-list.outputs.matrix) }}
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up env vars
run: |
echo "GO111MODULE=on" >> $GITHUB_ENV
echo "GO_VERSION=v$(sed -n 's/GO_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "HELM_VERSION=v$(sed -n 's/HELM_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "KIND_CLUSTER_NAME=$(sed -n 's/KIND_CLUSTER_NAME=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "GOPATH=/home/runner/go" >> $GITHUB_ENV
- name: Prepare go environment
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Ensure Golang runtime dependencies
run: make go-dependencies
- name: Kind setup
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
cluster_name: ${{env.KIND_CLUSTER_NAME}}
config: kind-cluster.yaml
- name: Prepare environment for e2e
run: |
sudo apt-get update && sudo apt-get install -y socat
sudo mkdir -p $HOME/.kube
sudo chown -R $USER $HOME/.kube
- name: Jenkins Operator - Helm Chart tests
env:
TNAME: ${{ matrix.test }}
TFILE: ${{ matrix.file }}
TLINE: ${{ matrix.line }}
run: |
git reset --hard
make helm-lint
printf "\n \n > Running test: %s from file: $s line: %s\n" "${TNAME}" "${TFILE}" "${TLINE}"
make helm-e2e E2E_TEST_ARGS='-ginkgo.v -ginkgo.focus="${TNAME}"'
- name: Debug
if: failure()
shell: bash
continue-on-error: true
run: |
randomns=$(kubectl get ns| grep -i 'ns[0-9]\+' |cut -d ' ' -f 1)
kubectl get pods -n ${randomns}
kubectl get events -n ${randomns}

View File

@ -1,58 +0,0 @@
name: Run tests
on:
push:
branches:
- master
- security-validator
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
branches:
- master
- security-validator
jobs:
run-tests:
if: github.event.pull_request.draft == false
name: Run automated tests
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up env vars
run: |
echo "GO111MODULE=on" >> $GITHUB_ENV
echo "CHANGE_MINIKUBE_NONE_USER=true" >> $GITHUB_ENV
echo "MINIKUBE_WANTUPDATENOTIFICATION=false" >> $GITHUB_ENV
echo "MINIKUBE_WANTREPORTERRORPROMPT=false" >> $GITHUB_ENV
echo "GO_VERSION=v$(sed -n 's/GO_VERSION=//p' config.base.env)" >> $GITHUB_ENV
echo "HELM_VERSION=v$(sed -n 's/HELM_VERSION=//p' config.base.env)" >> $GITHUB_ENV
echo "GOPATH=/home/runner/go" >> $GITHUB_ENV
- name: Prepare go environment
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Ensure Golang runtime dependencies
run: make go-dependencies
- name: Verify code formatting
run: make verify
- name: Prepare environment for e2e
run: |
sudo apt-get update
sudo apt-get install socat
sudo mkdir -p $HOME/.kube $HOME/.minikube
sudo chown -R $USER $HOME/.kube $HOME/.minikube
make minikube-start MINIKUBE_DRIVER='docker' CPUS_NUMBER=2
- name: Jenkins Operator - e2e
run: make e2e E2E_TEST_ARGS='-ginkgo.v'
- name: Jenkins Operator - Helm Chart tests
run: |
git reset --hard
make helm-lint
eval $(bin/minikube docker-env)
make helm-e2e E2E_TEST_ARGS='-ginkgo.v'

View File

@ -0,0 +1,72 @@
name: auto-update-jenkins-lts
on:
schedule:
- cron: '0 7 * * 0'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
check-and-update-jenkins-lts:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up env vars
run: |
echo "GO111MODULE=on" >> $GITHUB_ENV
echo "GO_VERSION=v$(sed -n 's/GO_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "KIND_CLUSTER_NAME=$(sed -n 's/KIND_CLUSTER_NAME=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "GOPATH=/home/runner/go" >> $GITHUB_ENV
- name: Check if update needed
id: check
run: |
CURRENT=$(sed -n 's/LATEST_LTS_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"')
LATEST=$(curl -s https://www.jenkins.io/changelog-stable/ | grep -oP 'changelog/\K\d+\.\d+\.\d+' | head -1)
echo "current=$CURRENT" >> $GITHUB_OUTPUT
echo "latest=$LATEST" >> $GITHUB_OUTPUT
if [ "$CURRENT" != "$LATEST" ]; then
echo "needs_update=true" >> $GITHUB_OUTPUT
else
echo "needs_update=false" >> $GITHUB_OUTPUT
fi
- name: Prepare go environment
if: steps.check.outputs.needs_update == 'true'
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
with:
go-version: ${{ env.GO_VERSION }}
- name: Ensure Golang runtime dependencies
if: steps.check.outputs.needs_update == 'true'
run: make go-dependencies
- name: Update Jenkins lts version
if: steps.check.outputs.needs_update == 'true'
run: make update-jenkins-lts
- name: Update Jenkins base plugins
if: steps.check.outputs.needs_update == 'true'
run: make update-plugins
- name: Run verify
if: steps.check.outputs.needs_update == 'true'
run: make verify
- name: Create Pull Request
if: steps.check.outputs.needs_update == 'true'
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: update Jenkins lts version to ${{ steps.check.outputs.latest }}"
title: "chore: update Jenkins lts version to ${{ steps.check.outputs.latest }}"
body: "auto-update Jenkins lts version from ${{ steps.check.outputs.current }} to ${{ steps.check.outputs.latest }}"
branch: auto-update-jenkins-lts-${{ steps.check.outputs.latest }}
delete-branch: true

View File

@ -1,61 +0,0 @@
name: Publish nightly snapshot
on:
schedule:
- cron: '0 2 * * *'
jobs:
publish-image:
name: Publish nightly snapshot
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up env vars
run: |
echo "GO111MODULE=on" >> $GITHUB_ENV
echo "CHANGE_MINIKUBE_NONE_USER=true" >> $GITHUB_ENV
echo "MINIKUBE_WANTUPDATENOTIFICATION=false" >> $GITHUB_ENV
echo "MINIKUBE_WANTREPORTERRORPROMPT=false" >> $GITHUB_ENV
echo "GO_VERSION=v$(sed -n 's/GO_VERSION=//p' config.base.env)" >> $GITHUB_ENV
echo "HELM_VERSION=v$(sed -n 's/HELM_VERSION=//p' config.base.env)" >> $GITHUB_ENV
echo "GOPATH=/home/runner/go" >> $GITHUB_ENV
- name: Prepare go environment
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Ensure Golang runtime dependencies
run: make go-dependencies
- name: Verify code formatting
run: make verify
- name: Prepare environment for e2e
run: |
sudo apt-get update
sudo apt-get install socat
sudo mkdir -p $HOME/.kube $HOME/.minikube
sudo chown -R $USER $HOME/.kube $HOME/.minikube
make minikube-start MINIKUBE_DRIVER='docker' CPUS_NUMBER=2
- name: Jenkins Operator - e2e
run: make e2e E2E_TEST_ARGS='-ginkgo.v'
- name: Jenkins Operator - Helm Chart tests
run: |
git reset --hard
make helm-lint
eval $(bin/minikube docker-env)
make helm-e2e E2E_TEST_ARGS='-ginkgo.v'
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Release Container Runtime
run: |
git reset --hard
make container-runtime-snapshot-push

60
.github/workflows/release-backup.yaml vendored Normal file
View File

@ -0,0 +1,60 @@
name: Release Backup Pvc
on:
workflow_dispatch:
pull_request:
types: [edited, opened, reopened, synchronize]
paths:
- 'backup/pvc/**'
push:
branches:
- master
- main
tags: ["*"]
paths:
- 'backup/pvc/**'
jobs:
build-and-release-backup:
name: Release Backup Pvc, build, bump and push new image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Check envs
run: make -C backup/pvc check-env
- name: Build the e2e image
run: make -C backup/pvc docker-build-e2e
- name: Run the e2e tests
run: make -C backup/pvc docker-e2e
- name: Configure Git
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Bump the version
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
shell: bash
run: |
make -C backup/pvc sembump
make -C backup/pvc bump-version
- name: Login to Quay.io
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
with:
registry: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_TOKEN }}
- name: Build and push the image to Quay.io
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
run: |
git reset --hard
make -C backup/pvc docker-build
make -C backup/pvc docker-release

View File

@ -17,21 +17,21 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Deploy Helm chart
run: |
sed -i "/version:/c\version: ${{ github.event.inputs.chartVersion }}" chart/jenkins-operator/Chart.yaml
sed -i '0,/version:.*/s//version: ${{ github.event.inputs.chartVersion }}/' chart/jenkins-operator/Chart.yaml
if [ ${{ github.event.inputs.appVersion }} ] ; then
sed -i "/appVersion:/c\appVersion: \"${{ github.event.inputs.appVersion }}\"" chart/jenkins-operator/Chart.yaml
sed -i '/appVersion:.*/s//appVersion: "${{ github.event.inputs.appVersion }}"/' chart/jenkins-operator/Chart.yaml
fi
make helm-release-latest
# Creates pull request with new chart version
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v6
with:
commit-message: Release Helm chart ${{ github.event.inputs.chartVersion }}
branch: helm-chart-release-${{ github.event.inputs.chartVersion }}

89
.github/workflows/release-nightly.yaml vendored Normal file
View File

@ -0,0 +1,89 @@
name: Publish nightly snapshot
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
inputs:
skipTests:
description: "Flag for skipping the tests. If set to true (without quotation marks), the workflow will skip tests and go straight to releasing the nightly build. Use with caution!"
required: false
jobs:
publish-image:
name: Publish nightly snapshot
runs-on: ubuntu-latest
steps:
- name: Prep - check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Prep - Set up env vars
run: |
echo "GO111MODULE=on" >> $GITHUB_ENV
echo "GO_VERSION=v$(sed -n 's/GO_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "HELM_VERSION=v$(sed -n 's/HELM_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "KIND_CLUSTER_NAME=$(sed -n 's/KIND_CLUSTER_NAME=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "GOPATH=/home/runner/go" >> $GITHUB_ENV
- name: Prep - setup Bats and bats libs
if: ${{ github.event.inputs.skipTests != 'true' }}
uses: bats-core/bats-action@472edde1138d59aca53ff162fb8d996666d21e4a # 2.0.0
with:
support-path: "${{ github.workspace }}/.bats/bats-support"
assert-path: "${{ github.workspace }}/.bats/bats-assert"
detik-path: "${{ github.workspace }}/.bats/bats-detik"
file-path: "${{ github.workspace }}/.bats/bats-file"
- name: Prep - go environment
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Prep - Ensure Golang runtime dependencies
run: make go-dependencies
- name: Test - verify code formatting
run: make verify
- name: Prep - Minikube setup
if: ${{ github.event.inputs.skipTests != 'true' }}
run: |
sudo apt-get update
sudo apt-get install socat
sudo mkdir -p $HOME/.kube
sudo chown -R $USER $HOME/.kube
- name: Prep - Kind setup
if: ${{ github.event.inputs.skipTests != 'true' }}
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
cluster_name: ${{env.KIND_CLUSTER_NAME}}
config: kind-cluster.yaml
- name: Test - e2e
if: ${{ github.event.inputs.skipTests != 'true' }}
run: make e2e E2E_TEST_ARGS='-ginkgo.v'
- name: Test - Helm Chart
if: ${{ github.event.inputs.skipTests != 'true' }}
run: |
git reset --hard
make helm-lint
make helm-e2e E2E_TEST_ARGS='-ginkgo.v'
- name: Test - bats
env:
BATS_LIB_PATH: "${{ github.workspace }}/.bats"
if: ${{ github.event.inputs.skipTests != 'true' }}
run: make bats-tests
- name: Post - Login to Quay.io
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
with:
registry: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_TOKEN }}
- name: Post - Push image
run: |
git reset --hard
make container-runtime-snapshot-push

57
.github/workflows/release.yaml vendored Normal file
View File

@ -0,0 +1,57 @@
name: Release Operator
on:
workflow_dispatch:
jobs:
build-and-release:
name: Release Operator, build and push newest image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Set up env vars
run: |
echo "GO111MODULE=on" >> $GITHUB_ENV
echo "GO_VERSION=v$(sed -n 's/GO_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"')" >> $GITHUB_ENV
echo "GOPATH=/home/runner/go" >> $GITHUB_ENV
- name: Prepare go environment
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Ensure Golang runtime dependencies
run: make go-dependencies
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Tag the release
run: make tag
- name: Set version for release tag name
run: |
echo "VERSION=$(cat VERSION.txt)" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2
with:
tag_name: ${{ env.VERSION }}
- name: Login to Quay.io
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
with:
registry: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_TOKEN }}
- name: Build and push the image to Quay.io
run: |
git reset --hard
make container-runtime-release

126
.github/workflows/update-plugins.sh vendored Executable file
View File

@ -0,0 +1,126 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../" && pwd)"
PLUGINS=(
"configuration-as-code"
"git"
"job-dsl"
"kubernetes"
"kubernetes-credentials-provider"
"workflow-aggregator"
)
version_compare() {
local ver1="$1"
local ver2="$2"
ver1=$(echo "$ver1" | sed 's/\([0-9.]*\).*/\1/')
ver2=$(echo "$ver2" | sed 's/\([0-9.]*\).*/\1/')
if [ "$ver1" = "$ver2" ]; then
return 0
fi
local sorted=$(printf '%s\n%s' "$ver1" "$ver2" | sort -V)
local first=$(echo "$sorted" | head -n1)
if [ "$first" = "$ver1" ]; then
return 1
else
return 2
fi
}
fetch_update_center_data() {
local jenkins_version="$1"
local url="https://updates.jenkins.io/update-center.actual.json?version=${jenkins_version}"
local data=$(curl -s -L -f "$url")
if ! echo "$data" | jq . > /dev/null 2>&1; then
echo "error something happened" >&2
return 1
fi
echo "$data"
}
find_compatible_version() {
local plugin_id="$1"
local jenkins_version="$2"
local update_data="$3"
local plugin_data=$(echo "$update_data" | jq ".plugins[\"$plugin_id\"]")
local plugin_version=$(echo "$plugin_data" | jq -r '.version')
local compatible_since=$(echo "$plugin_data" | jq -r '.compatibleSinceVersion // empty')
if [ -n "$compatible_since" ]; then
version_compare "$jenkins_version" "$compatible_since"
local result=$?
if [ $result -eq 1 ]; then
echo "Error: Plugin '$plugin_id' requires Jenkins $compatible_since or newer" >&2
return 1
fi
fi
echo "$plugin_version"
}
update_go_file() {
local file_path="$1"
local plugin_id="$2"
local new_version="$3"
local dry_run="$4"
local var_name=""
case "$plugin_id" in
"configuration-as-code") var_name="configurationAsCodePlugin" ;;
"git") var_name="gitPlugin" ;;
"job-dsl") var_name="jobDslPlugin" ;;
"kubernetes") var_name="kubernetesPlugin" ;;
"kubernetes-credentials-provider") var_name="kubernetesCredentialsProviderPlugin" ;;
"workflow-aggregator") var_name="workflowAggregatorPlugin" ;;
esac
local relative_path=$(realpath --relative-to="$PROJECT_ROOT" "$file_path")
local new_line=" ${var_name} = \"${plugin_id}:${new_version}\""
if [ "$dry_run" = "true" ]; then
echo "$relative_path: $plugin_id:$new_version"
else
sed -i "s|^[[:space:]]*${var_name}[[:space:]]*=.*|${new_line}|" "$file_path"
echo "$relative_path: $var_name -> $plugin_id:$new_version"
fi
}
main() {
if [ $# -lt 1 ]; then
echo "usage: $0 <jenkins-version> [--dry-run]" >&2
exit 1
fi
local jenkins_version="$1"
local dry_run="false"
if [ $# -gt 1 ] && [ "$2" = "--dry-run" ]; then
dry_run="true"
fi
local update_data
if ! update_data=$(fetch_update_center_data "$jenkins_version"); then
exit 1
fi
for plugin_id in "${PLUGINS[@]}"; do
local compatible_version
if compatible_version=$(find_compatible_version "$plugin_id" "$jenkins_version" "$update_data"); then
#printf "%-35s %-30s\n" "$plugin_id" "$compatible_version"
update_go_file "$PROJECT_ROOT/pkg/plugins/base_plugins.go" "$plugin_id" "$compatible_version" "$dry_run"
update_go_file "$PROJECT_ROOT/test/e2e/configuration_test.go" "$plugin_id" "$compatible_version" "$dry_run"
fi
done
}
main "$@"

11
.gitignore vendored
View File

@ -91,3 +91,14 @@ tags
/bin
testbin/*
### Bats
chart/jenkins-operator/deploy.tmp
### Nix
result
### website
website/node_modules
website/public
website/.hugo_build.lock

View File

@ -1,29 +1,41 @@
run:
deadline: 10m
linters-settings:
errcheck:
check-blank: false
ignore: fmt:.*,io/ioutil:^Read.*,Write
deadline: 5m
allow-parallel-runners: true
skip-files:
- api/v1alpha2/zz_generated.deepcopy.go
issues:
exclude-use-default: false
exclude-rules:
- path: "internal/*"
linters:
enable-all: true
disable:
- funlen
- gocognit
- godox
- gomnd
- gochecknoglobals
- gochecknoinits
- lll
- prealloc
- wsl
- gocyclo
- scopelint
- dupl
- gosec
- maligned
- testpackage
- goerr113
- path: (.+)_test.go
linters:
- dupl
linters:
disable-all: true
enable:
- dupl
- errcheck
- exportloopref
- goconst
- gocyclo
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- loggercheck
- misspell
- nakedret
- nestif
- godot
- staticcheck
- typecheck
- unconvert
- unparam
- unused
output:
sort-results: true
sort-order:
- file
- severity
- linter

26
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,26 @@
repos:
- repo: https://github.com/sirosen/check-jsonschema
rev: a167de9d5f4e87e1cdb16cb560aa704b79b6f655 # frozen: 0.32.1
hooks:
- id: check-github-workflows
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: detect-private-key
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/gruntwork-io/pre-commit
rev: "d9196b3a0a6fbc530f2bacea36c11a3b0214ff13" # frozen: v0.1.28
hooks:
- id: helmlint
- repo: https://github.com/norwoodj/helm-docs
rev: "37d3055fece566105cf8cff7c17b7b2355a01677" # frozen: v1.14.2
hooks:
- id: helm-docs
args:
- --chart-search-root=chart/jenkins-operator
- repo: https://github.com/brokenpip3/pre-commit-hooks
rev: dd7b3821637ba3c3a8628ad487fd84edec8006f2 # frozen: 0.0.1
hooks:
- id: github-actions-hash
files: ^.github/workflows/.*\.(yml|yaml)$ # limit only to github workflows

1
CODEOWNERS Normal file
View File

@ -0,0 +1 @@
* @brokenpip3

View File

@ -3,6 +3,8 @@ ARG GO_VERSION
# Build the manager binary
FROM golang:$GO_VERSION as builder
ARG CTIMEVAR
ARG TARGETOS
ARG TARGETARCH
WORKDIR /workspace
# Copy the Go Modules manifests
@ -14,18 +16,25 @@ RUN go mod download
# Copy the go source
COPY api/ api/
COPY controllers/ controllers/
COPY internal/controller/ internal/controller/
COPY internal/ internal/
COPY pkg/ pkg/
COPY version/ version/
COPY main.go main.go
COPY cmd/main.go cmd/main.go
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags "-w $CTIMEVAR" -o manager main.go
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
LABEL maintainer="Jenkins Kubernetes Operator Community" \
org.opencontainers.image.authors="Jenkins Kubernetes Operator Community" \
org.opencontainers.image.title="jenkins-kubernetes-operator" \
org.opencontainers.image.description="Kubernetes native Jenkins Operator" \
org.opencontainers.image.url="quay.io/jenkins-kubernetes-operator/operator" \
org.opencontainers.image.source="https://github.com/jenkinsci/kubernetes-operator/tree/master" \
org.opencontainers.image.base.name="gcr.io/distroless/static:nonroot"
WORKDIR /
COPY --from=builder /workspace/manager .
USER 65532:65532

370
Makefile
View File

@ -70,16 +70,20 @@ HAS_GOLINT := $(shell which $(PROJECT_DIR)/bin/golangci-lint)
lint: ## Verifies `golint` passes
@echo "+ $@"
ifndef HAS_GOLINT
$(call go-get-tool,$(PROJECT_DIR)/bin/golangci-lint,github.com/golangci/golangci-lint/cmd/golangci-lint@v1.26.0)
GOBIN=$(PROJECT_DIR)/bin go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.0
endif
@bin/golangci-lint run
.PHONY: lint-fix
lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes
@bin/golangci-lint run --fix
.PHONY: goimports
HAS_GOIMPORTS := $(shell which $(PROJECT_DIR)/bin/goimports)
goimports: ## Verifies `goimports` passes
@echo "+ $@"
ifndef HAS_GOIMPORTS
$(call go-get-tool,$(PROJECT_DIR)/bin/goimports,golang.org/x/tools/cmd/goimports@v0.1.0)
$(call GOBIN=$(PROJECT_DIR)/bin go install golang.org/x/tools/cmd/goimports@v0.1.0)
endif
@bin/goimports -l -e $(shell find . -type f -name '*.go' -not -path "./vendor/*")
@ -89,18 +93,64 @@ test: ## Runs the go tests
@RUNNING_TESTS=1 go test -tags "$(BUILDTAGS) cgo" $(PACKAGES_FOR_UNIT_TESTS)
.PHONY: e2e
e2e: deepcopy-gen manifests ## Runs e2e tests, you can use EXTRA_ARGS
e2e: deepcopy-gen manifests backup-kind-load jenkins-kind-load ## Runs e2e tests, you can use EXTRA_ARGS
@echo "+ $@"
RUNNING_TESTS=1 go test -parallel=1 "./test/e2e/" -ginkgo.v -tags "$(BUILDTAGS) cgo" -v -timeout 60m -run "$(E2E_TEST_SELECTOR)" \
-jenkins-api-hostname=$(JENKINS_API_HOSTNAME) -jenkins-api-port=$(JENKINS_API_PORT) -jenkins-api-use-nodeport=$(JENKINS_API_USE_NODEPORT) $(E2E_TEST_ARGS)
.PHONY: helm-e2e
IMAGE_NAME := $(DOCKER_REGISTRY):$(GITCOMMIT)
.PHONY: jenkins-kind-load
jenkins-kind-load: ## Load the jenkins lts version in kind to speed up tests
@echo "+ $@"
docker pull jenkins/jenkins:$(LATEST_LTS_VERSION)
kind load docker-image jenkins/jenkins:$(LATEST_LTS_VERSION) --name $(KIND_CLUSTER_NAME)
helm-e2e: helm container-runtime-build ## Runs helm e2e tests, you can use EXTRA_ARGS
## Backup Section
.PHONY: backup-kind-load
backup-kind-load: ## Load latest backup image in the cluster
@echo "+ $@"
make -C backup/pvc backup-kind-load
## HELM Section
.PHONY: helm
HAS_HELM := $(shell command -v helm 2> /dev/null)
helm: ## Download helm if it's not present, otherwise symlink
@echo "+ $@"
ifeq ($(strip $(HAS_HELM)),)
mkdir -p $(PROJECT_DIR)/bin
curl -Lo $(PROJECT_DIR)/bin/helm.tar.gz https://get.helm.sh/helm-v$(HELM_VERSION)-$(PLATFORM)-amd64.tar.gz && tar xzfv $(PROJECT_DIR)/bin/helm.tar.gz -C $(PROJECT_DIR)/bin
mv $(PROJECT_DIR)/bin/$(PLATFORM)-amd64/helm $(PROJECT_DIR)/bin/helm
rm -rf $(PROJECT_DIR)/bin/$(PLATFORM)-amd64
rm -rf $(PROJECT_DIR)/bin/helm.tar.gz
else
mkdir -p $(PROJECT_DIR)/bin
test -L $(PROJECT_DIR)/bin/helm || ln -sf $(shell command -v helm) $(PROJECT_DIR)/bin/helm
endif
.PHONY: helm-lint
helm-lint: helm
bin/helm lint chart/jenkins-operator
.PHONY: helm-release-latest
helm-release-latest: helm
mkdir -p /tmp/jenkins-operator-charts
mv chart/jenkins-operator/*.tgz /tmp/jenkins-operator-charts
cd chart && ../bin/helm package jenkins-operator
mv chart/jenkins-operator-*.tgz chart/jenkins-operator/
bin/helm repo index chart/ --url https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/ --merge chart/index.yaml
mv /tmp/jenkins-operator-charts/*.tgz chart/jenkins-operator/
.PHONY: helm-e2e
IMAGE_NAME := quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY):$(GITCOMMIT)-amd64
helm-e2e: helm container-runtime-build-amd64 backup-kind-load ## Runs helm e2e tests, you can use EXTRA_ARGS
kind load docker-image ${IMAGE_NAME} --name $(KIND_CLUSTER_NAME)
@echo "+ $@"
RUNNING_TESTS=1 go test -parallel=1 "./test/helm/" -ginkgo.v -tags "$(BUILDTAGS) cgo" -v -timeout 60m -run "$(E2E_TEST_SELECTOR)" -image-name=$(IMAGE_NAME) $(E2E_TEST_ARGS)
## CODE CHECKS section
.PHONY: vet
vet: ## Verifies `go vet` passes
@echo "+ $@"
@ -112,7 +162,7 @@ staticcheck: ## Verifies `staticcheck` passes
@echo "+ $@"
ifndef HAS_STATICCHECK
$(eval TMP_DIR := $(shell mktemp -d))
wget -O $(TMP_DIR)/staticcheck_$(PLATFORM)_amd64.tar.gz https://github.com/dominikh/go-tools/releases/download/2020.1.3/staticcheck_$(PLATFORM)_amd64.tar.gz
wget -O $(TMP_DIR)/staticcheck_$(PLATFORM)_amd64.tar.gz https://github.com/dominikh/go-tools/releases/download/2023.1.7/staticcheck_$(PLATFORM)_amd64.tar.gz
tar zxvf $(TMP_DIR)/staticcheck_$(PLATFORM)_amd64.tar.gz -C $(TMP_DIR)
mkdir -p $(PROJECT_DIR)/bin
mv $(TMP_DIR)/staticcheck/staticcheck $(PROJECT_DIR)/bin
@ -124,7 +174,8 @@ endif
cover: ## Runs go test with coverage
@echo "" > coverage.txt
@for d in $(PACKAGES); do \
IMG_RUNNING_TESTS=1 go test -race -coverprofile=profile.out -covermode=atomic "$$d"; \
ENVTEST_K8S_VERSION = 1.26
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" IMG_RUNNING_TESTS=1 go test -race -coverprofile=profile.out -covermode=atomic "$$d"; \
if [ -f profile.out ]; then \
cat profile.out >> coverage.txt; \
rm profile.out; \
@ -140,12 +191,55 @@ install: ## Installs the executable
@echo "+ $@"
go install -tags "$(BUILDTAGS)" ${GO_LDFLAGS} $(BUILD_PATH)
.PHONY: update-plugins
update-plugins: ## Update jenkins base plugins
@echo "+ $@"
@JENKINS_VERSION=$$(sed -n 's/LATEST_LTS_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"'); \
echo "updating plugins for Jenkins $$JENKINS_VERSION"; \
./.github/workflows/update-plugins.sh "$$JENKINS_VERSION"
.PHONY: update-plugins-dry-run
update-plugins-dry-run: ## Update jenkins base plugin -- dry run
@echo "+ $@"
@JENKINS_VERSION=$$(sed -n 's/LATEST_LTS_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"'); \
echo "checking plugins for Jenkins $$JENKINS_VERSION -- dry run"; \
./.github/workflows/update-plugins.sh "$$JENKINS_VERSION" --dry-run
.PHONY: update-jenkins-lts
update-jenkins-lts: ## Fetch latest Jenkins lts version and update if necessary
@echo "+ $@"
@LATEST_VERSION=$$(curl -s https://www.jenkins.io/changelog-stable/ | grep -oP 'changelog/\K\d+\.\d+\.\d+' | head -1); \
CURRENT_VERSION=$$(sed -n 's/LATEST_LTS_VERSION=//p' config.base.env | tr -d '\n' | tr -d '"'); \
echo "current version: $$CURRENT_VERSION"; \
echo "latest version: $$LATEST_VERSION"; \
if [ "$$CURRENT_VERSION" != "$$LATEST_VERSION" ]; then \
echo "updating Jenkins lts version from $$CURRENT_VERSION to $$LATEST_VERSION"; \
sed -i "s/LATEST_LTS_VERSION=\".*\"/LATEST_LTS_VERSION=\"$$LATEST_VERSION\"/" config.base.env; \
$(MAKE) update-lts-version LATEST_LTS_VERSION=$$LATEST_VERSION; \
echo "updated Jenkins LTS version to $$LATEST_VERSION"; \
else \
echo "up to date"; \
fi
.PHONY: update-lts-version
update-lts-version: ## Update the latest lts version
@echo "+ $@"
echo $(LATEST_LTS_VERSION)
sed -i 's|jenkins/jenkins:[0-9]\+.[0-9]\+.[0-9]\+|jenkins/jenkins:$(LATEST_LTS_VERSION)|g' chart/jenkins-operator/values.yaml
sed -i 's|jenkins/jenkins:[0-9]\+.[0-9]\+.[0-9]\+|jenkins/jenkins:$(LATEST_LTS_VERSION)|g' test/e2e/test_utility.go
sed -i 's|jenkins/jenkins:[0-9]\+.[0-9]\+.[0-9]\+|jenkins/jenkins:$(LATEST_LTS_VERSION)|g' test/helm/helm_test.go
sed -i 's|jenkins/jenkins:[0-9]\+.[0-9]\+.[0-9]\+|jenkins/jenkins:$(LATEST_LTS_VERSION)|g' pkg/constants/constants.go
#TODO: source the version from config.base.env for bats test, no need of hardcoded version
sed -i 's|jenkins/jenkins:[0-9]\+.[0-9]\+.[0-9]\+|jenkins/jenkins:$(LATEST_LTS_VERSION)|g' test/bats/1-deploy.bats
sed -i 's|jenkins/jenkins:[0-9]\+.[0-9]\+.[0-9]\+|jenkins/jenkins:$(LATEST_LTS_VERSION)|g' test/bats/2-deploy-with-more-options.bats
sed -i 's|jenkins/jenkins:[0-9]\+.[0-9]\+.[0-9]\+|jenkins/jenkins:$(LATEST_LTS_VERSION)|g' test/bats/3-deploy-with-webhook.bats
.PHONY: run
run: export WATCH_NAMESPACE = $(NAMESPACE)
run: export OPERATOR_NAME = $(NAME)
run: fmt vet install-crds build ## Run the executable, you can use EXTRA_ARGS
@echo "+ $@"
ifeq ($(KUBERNETES_PROVIDER),minikube)
ifeq ($(KUBERNETES_PROVIDER),kind)
kubectl config use-context $(KUBECTL_CONTEXT)
endif
ifeq ($(KUBERNETES_PROVIDER),crc)
@ -207,46 +301,66 @@ endif
container-runtime-login: ## Log in into the Docker repository
@echo "+ $@"
.PHONY: container-runtime-build
container-runtime-build: check-env deepcopy-gen ## Build the container
.PHONY: container-runtime-build-%
container-runtime-build-%: ## Build the container
@echo "+ $@"
$(CONTAINER_RUNTIME_COMMAND) build \
$(CONTAINER_RUNTIME_COMMAND) buildx build \
--output=type=docker --platform linux/$* \
--build-arg GO_VERSION=$(GO_VERSION) \
--build-arg CTIMEVAR="$(CTIMEVAR)" \
-t $(DOCKER_REGISTRY):$(GITCOMMIT) . \
--tag quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY):$(GITCOMMIT)-$* . \
--file Dockerfile $(CONTAINER_RUNTIME_EXTRA_ARGS)
.PHONY: container-runtime-build
container-runtime-build: check-env deepcopy-gen container-runtime-build-amd64 container-runtime-build-arm64
.PHONY: container-runtime-images
container-runtime-images: ## List all local containers
@echo "+ $@"
$(CONTAINER_RUNTIME_COMMAND) images $(CONTAINER_RUNTIME_EXTRA_ARGS)
define buildx-create-command
$(CONTAINER_RUNTIME_COMMAND) buildx create \
--driver=docker-container \
--use
endef
## Parameter is version
define container-runtime-push-command
$(CONTAINER_RUNTIME_COMMAND) buildx build \
--output=type=registry --platform linux/amd64,linux/arm64 \
--build-arg GO_VERSION=$(GO_VERSION) \
--build-arg CTIMEVAR="$(CTIMEVAR)" \
--tag quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY):$(1) . \
--file Dockerfile $(CONTAINER_RUNTIME_EXTRA_ARGS)
endef
.PHONY: container-runtime-push
container-runtime-push: ## Push the container
container-runtime-push: check-env deepcopy-gen ## Push the container
@echo "+ $@"
$(CONTAINER_RUNTIME_COMMAND) tag $(DOCKER_REGISTRY):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY):$(BUILD_TAG) $(CONTAINER_RUNTIME_EXTRA_ARGS)
$(CONTAINER_RUNTIME_COMMAND) push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY):$(BUILD_TAG) $(CONTAINER_RUNTIME_EXTRA_ARGS)
$(call buildx-create-command)
$(call container-runtime-push-command,$(BUILD_TAG))
.PHONY: container-runtime-snapshot-push
container-runtime-snapshot-push: container-runtime-build
container-runtime-snapshot-push: check-env deepcopy-gen
@echo "+ $@"
$(CONTAINER_RUNTIME_COMMAND) tag $(DOCKER_REGISTRY):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY):$(GITCOMMIT) $(CONTAINER_RUNTIME_EXTRA_ARGS)
$(CONTAINER_RUNTIME_COMMAND) push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY):$(GITCOMMIT) $(CONTAINER_RUNTIME_EXTRA_ARGS)
$(call buildx-create-command)
$(call container-runtime-push-command,$(GITCOMMIT))
.PHONY: container-runtime-release-version
container-runtime-release-version: ## Release image with version tag (in addition to build tag)
container-runtime-release-version: check-env deepcopy-gen ## Release image with version tag (in addition to build tag)
@echo "+ $@"
$(CONTAINER_RUNTIME_COMMAND) tag $(DOCKER_REGISTRY):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY):$(VERSION_TAG) $(CONTAINER_RUNTIME_EXTRA_ARGS)
$(CONTAINER_RUNTIME_COMMAND) push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY):$(VERSION_TAG) $(CONTAINER_RUNTIME_EXTRA_ARGS)
$(call buildx-create-command)
$(call container-runtime-push-command,$(VERSION_TAG))
.PHONY: container-runtime-release-latest
container-runtime-release-latest: ## Release image with latest tags (in addition to build tag)
container-runtime-release-latest: check-env deepcopy-gen ## Release image with latest tags (in addition to build tag)
@echo "+ $@"
$(CONTAINER_RUNTIME_COMMAND) tag $(DOCKER_REGISTRY):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY):$(LATEST_TAG) $(CONTAINER_RUNTIME_EXTRA_ARGS)
$(CONTAINER_RUNTIME_COMMAND) push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY):$(LATEST_TAG) $(CONTAINER_RUNTIME_EXTRA_ARGS)
$(call buildx-create-command)
$(call container-runtime-push-command,$(LATEST_TAG))
.PHONY: container-runtime-release
container-runtime-release: container-runtime-build container-runtime-release-version container-runtime-release-latest ## Release image with version and latest tags (in addition to build tag)
container-runtime-release: container-runtime-release-version container-runtime-release-latest ## Release image with version and latest tags (in addition to build tag)
@echo "+ $@"
# if this session isn't interactive, then we don't want to allocate a
@ -262,13 +376,7 @@ container-runtime-run: ## Run the container in docker, you can use EXTRA_ARGS
@echo "+ $@"
$(CONTAINER_RUNTIME_COMMAND) run $(CONTAINER_RUNTIME_EXTRA_ARGS) --rm -i $(DOCKER_FLAGS) \
--volume $(HOME)/.kube/config:/home/jenkins-operator/.kube/config \
$(DOCKER_REGISTRY):$(GITCOMMIT) /usr/bin/jenkins-operator $(OPERATOR_ARGS)
.PHONY: minikube-run
minikube-run: export WATCH_NAMESPACE = $(NAMESPACE)
minikube-run: export OPERATOR_NAME = $(NAME)
minikube-run: minikube-start run ## Run the operator locally and use minikube as Kubernetes cluster, you can use OPERATOR_ARGS
@echo "+ $@"
quay.io/${QUAY_ORGANIZATION}/$(QUAY_REGISTRY):$(GITCOMMIT) /usr/bin/jenkins-operator $(OPERATOR_ARGS)
.PHONY: crc-run
crc-run: export WATCH_NAMESPACE = $(NAMESPACE)
@ -292,14 +400,6 @@ ifndef HAS_GEN_CRD_API_REFERENCE_DOCS
endif
$(GEN_CRD_API)/$(GEN_CRD_API) -config gen-crd-api-config.json -api-dir $(PKG)/api/$(API_VERSION) -template-dir $(GEN_CRD_API)/template -out-file documentation/$(VERSION)/jenkins-$(API_VERSION)-scheme.md
.PHONY: check-minikube
check-minikube: ## Checks if KUBERNETES_PROVIDER is set to minikube
@echo "+ $@"
@echo "KUBERNETES_PROVIDER '$(KUBERNETES_PROVIDER)'"
ifneq ($(KUBERNETES_PROVIDER),minikube)
$(error KUBERNETES_PROVIDER not set to 'minikube')
endif
.PHONY: check-crc
check-crc: ## Checks if KUBERNETES_PROVIDER is set to crc
@echo "+ $@"
@ -308,33 +408,33 @@ ifneq ($(KUBERNETES_PROVIDER),crc)
$(error KUBERNETES_PROVIDER not set to 'crc')
endif
.PHONY: helm
HAS_HELM := $(shell which $(PROJECT_DIR)/bin/helm)
helm: ## Download helm if it's not present
.PHONY: kind-setup
kind-setup: ## Setup kind cluster
@echo "+ $@"
ifndef HAS_HELM
mkdir -p $(PROJECT_DIR)/bin
curl -Lo bin/helm.tar.gz https://get.helm.sh/helm-v$(HELM_VERSION)-$(PLATFORM)-amd64.tar.gz && tar xzfv bin/helm.tar.gz -C $(PROJECT_DIR)/bin
mv $(PROJECT_DIR)/bin/$(PLATFORM)-amd64/helm $(PROJECT_DIR)/bin/helm
rm -rf $(PROJECT_DIR)/bin/$(PLATFORM)-amd64
rm -rf $(PROJECT_DIR)/bin/helm.tar.gz
endif
kind create cluster --config kind-cluster.yaml --name $(KIND_CLUSTER_NAME)
.PHONY: minikube
HAS_MINIKUBE := $(shell which $(PROJECT_DIR)/bin/minikube)
minikube: ## Download minikube if it's not present
.PHONY: kind-clean
kind-clean: ## Delete kind cluster
@echo "+ $@"
ifndef HAS_MINIKUBE
mkdir -p $(PROJECT_DIR)/bin
wget -O $(PROJECT_DIR)/bin/minikube https://github.com/kubernetes/minikube/releases/download/v$(MINIKUBE_VERSION)/minikube-$(PLATFORM)-amd64
chmod +x $(PROJECT_DIR)/bin/minikube
endif
kind delete cluster --name $(KIND_CLUSTER_NAME)
.PHONY: minikube-start
minikube-start: minikube check-minikube ## Start minikube
.PHONY: kind-revamp
kind-revamp: kind-clean kind-setup ## Delete and recreate kind cluster
@echo "+ $@"
bin/minikube status && exit 0 || \
bin/minikube start --kubernetes-version $(MINIKUBE_KUBERNETES_VERSION) --dns-domain=$(CLUSTER_DOMAIN) --extra-config=kubelet.cluster-domain=$(CLUSTER_DOMAIN) --driver=$(MINIKUBE_DRIVER) --memory 4096 --cpus $(CPUS_NUMBER)
.PHONY: bats-tests ## Run bats tests
IMAGE_NAME := quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY):$(GITCOMMIT)-amd64
BUILD_PRESENT := $(shell docker images |grep -q ${IMAGE_NAME})
ifndef BUILD_PRESENT
bats-tests: backup-kind-load container-runtime-build-amd64 ## Run bats tests
@echo "+ $@"
kind load docker-image ${IMAGE_NAME} --name $(KIND_CLUSTER_NAME)
OPERATOR_IMAGE="${IMAGE_NAME}" TERM=xterm bats -T -p test/bats$(if $(BATS_TEST_PATH),/${BATS_TEST_PATH})
else
bats-tests: backup-kind-load
@echo "+ $@"
OPERATOR_IMAGE="${IMAGE_NAME}" TERM=xterm bats -T -p test/bats$(if $(BATS_TEST_PATH),/${BATS_TEST_PATH})
endif
.PHONY: crc-start
crc-start: check-crc ## Start CodeReady Containers Kubernetes cluster
@ -378,7 +478,7 @@ bump-version: sembump ## Bump the version in the version file. Set BUMP to [ pat
.PHONY: tag
tag: ## Create a new git tag to prepare to build a release
@echo "+ $@"
git tag -s -a $(VERSION) -m "$(VERSION)"
git tag -a $(VERSION) -m "$(VERSION)"
git push origin $(VERSION)
.PHONY: help
@ -397,32 +497,19 @@ ifneq ($(GITUNTRACKEDCHANGES),)
endif
ifneq ($(GITIGNOREDBUTTRACKEDCHANGES),)
@echo "Ignored but tracked files:"
@git ls-files -i --exclude-standard
@git ls-files -i -o --exclude-standard
@echo
endif
@echo "Dependencies:"
go mod vendor -v
@echo
.PHONY: helm-lint
helm-lint: helm
@echo "+ $@"
bin/helm lint chart/jenkins-operator
.PHONY: helm-release-latest
helm-release-latest: helm
@echo "+ $@"
mkdir -p /tmp/jenkins-operator-charts
mv chart/jenkins-operator/*.tgz /tmp/jenkins-operator-charts
cd chart && ../bin/helm package jenkins-operator
mv chart/jenkins-operator-*.tgz chart/jenkins-operator/
bin/helm repo index chart/ --url https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/ --merge chart/index.yaml
mv /tmp/jenkins-operator-charts/*.tgz chart/jenkins-operator/
# Download and build hugo extended locally if necessary
HUGO_PATH = $(shell pwd)/bin/hugo
HUGO_VERSION = v0.62.2
HUGO_VERSION = v0.99.1
HAS_HUGO := $(shell $(HUGO_PATH)/hugo version 2>&- | grep $(HUGO_VERSION))
.PHONY: hugo
hugo:
ifeq ($(HAS_HUGO), )
@echo "Installing Hugo $(HUGO_VERSION)"
@ -445,59 +532,77 @@ run-docs: hugo
##################### FROM OPERATOR SDK ########################
# Install CRDs into a cluster
.PHONY: install-crds
install-crds: manifests kustomize
$(KUSTOMIZE) build config/crd | kubectl apply -f -
# Uninstall CRDs from a cluster
ifndef ignore-not-found
ignore-not-found = false
endif
.PHONY: uninstall-crds
uninstall-crds: manifests kustomize
$(KUSTOMIZE) build config/crd | kubectl delete -f -
$(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
# Deploy controller in the configured Kubernetes cluster in ~/.kube/config
.PHONY: deploy
deploy: manifests kustomize
cd config/manager && $(KUSTOMIZE) edit set image controller=$(DOCKER_REGISTRY):$(GITCOMMIT)
cd config/manager && $(KUSTOMIZE) edit set image controller=quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY):$(GITCOMMIT)
$(KUSTOMIZE) build config/default | kubectl apply -f -
# UnDeploy controller from the configured Kubernetes cluster in ~/.kube/config
.PHONY: undeploy
undeploy:
$(KUSTOMIZE) build config/default | kubectl delete -f -
$(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
# Generate manifests e.g. CRD, RBAC etc.
.PHONY: manifests
manifests: controller-gen
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
# Generate code
.PHONY: generate
generate: controller-gen
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
# Download controller-gen locally if necessary
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen:
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1)
##@ Build Dependencies
# Download kustomize locally if necessary
KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize:
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3@v3.8.7)
## Location to install dependencies to
LOCALBIN ?= $(shell pwd)/bin
$(LOCALBIN):
mkdir -p $(LOCALBIN)
# go-get-tool will 'go get' any package $2 and install it to $1.
define go-get-tool
@[ -f $(1) ] || { \
set -e ;\
TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef
## Tool Binaries
KUSTOMIZE ?= $(LOCALBIN)/kustomize
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest
## Tool Versions
KUSTOMIZE_VERSION ?= v5.3.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
$(KUSTOMIZE): $(LOCALBIN)
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@release-0.17
.PHONY: operator-sdk
HAS_OPERATOR_SDK := $(shell which $(PROJECT_DIR)/bin/operator-sdk)
operator-sdk: # Download operator-sdk locally if necessary
@echo "+ $@"
ifndef HAS_OPERATOR_SDK
wget -O $(PROJECT_DIR)/bin/operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/v1.3.0/operator-sdk_$(PLATFORM)_amd64
wget -O $(PROJECT_DIR)/bin/operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/v${OPERATOR_SDK_VERSION}/operator-sdk_$(PLATFORM)_amd64
chmod +x $(PROJECT_DIR)/bin/operator-sdk
endif
@ -505,8 +610,8 @@ endif
.PHONY: bundle
bundle: manifests operator-sdk kustomize
bin/operator-sdk generate kustomize manifests -q
cd config/manager && $(KUSTOMIZE) edit set image controller=$(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY):$(VERSION_TAG)
$(KUSTOMIZE) build config/manifests | bin/operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
cd config/manager && $(KUSTOMIZE) edit set image controller=quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY):$(VERSION_TAG)
$(KUSTOMIZE) build config/manifests | bin/operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
bin/operator-sdk bundle validate ./bundle
# Build the bundle image.
@ -515,19 +620,64 @@ bundle-build:
docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
# Download kubebuilder
.PHONY: kubebuilder
kubebuilder:
mkdir -p ${ENVTEST_ASSETS_DIR}
test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.7.0/hack/setup-envtest.sh
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR);
# install cert-manager v1.5.1
install-cert-manager: minikube-start
install-cert-manager: kind-setup
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.yaml
uninstall-cert-manager: minikube-start
uninstall-cert-manager: kind-setup
kubectl delete -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.yaml
# Deploy the operator locally along with webhook using helm charts
deploy-webhook: container-runtime-build
.PHONY: deploy-webhook
deploy-webhook: container-runtime-build-amd64
@echo "+ $@"
bin/helm upgrade jenkins chart/jenkins-operator --install --set-string operator.image=${IMAGE_NAME} --set webhook.enabled=true --set jenkins.enabled=false
# https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.6.1/#gov2-gov3-ansiblev1-helmv1-add-opm-and-catalog-build-makefile-targets
.PHONY: opm
OPM = ./bin/opm
opm:
ifeq (,$(wildcard $(OPM)))
ifeq (,$(shell which opm 2>/dev/null))
@{ \
set -e ;\
mkdir -p $(dir $(OPM)) ;\
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.23.0/$${OS}-$${ARCH}-opm ;\
chmod +x $(OPM) ;\
}
else
OPM = $(shell which opm)
endif
endif
BUNDLE_IMGS ?= $(BUNDLE_IMG)
CATALOG_IMG ?= $(IMAGE_TAG_BASE)-catalog:v$(VERSION) ifneq ($(origin CATALOG_BASE_IMG), undefined) FROM_INDEX_OPT := --from-index $(CATALOG_BASE_IMG) endif
.PHONY: catalog-build
catalog-build: opm
$(OPM) index add --container-tool docker --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)
.PHONY: catalog-push
catalog-push: ## Push the catalog image.
$(MAKE) docker-push IMG=$(CATALOG_IMG)
# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/
# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/
# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=<myregistry/image:<tag>> than the export will fail)
# To properly provided solutions that supports more than one platform you should use this option.
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
.PHONY: docker-buildx
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
- docker buildx create --name project-v3-builder
docker buildx use project-v3-builder
- docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross
- docker buildx rm project-v3-builder
rm Dockerfile.cross

13
PROJECT
View File

@ -1,14 +1,21 @@
domain: jenkins.io
layout: go.kubebuilder.io/v3
layout: go.kubebuilder.io/v4
projectName: jenkins-operator
repo: github.com/jenkinsci/kubernetes-operator
resources:
- crdVersion: v1
- api:
crdVersion: v1
namespaced: true
# TODO(user): Uncomment the below line if this resource implements a controller, else delete it.
# controller: true
domain: jenkins.io
group: jenkins.io
kind: Jenkins
path: github.com/jenkinsci/kubernetes-operator/api/v1alpha2
version: v1alpha2
webhooks:
webhookVersion: v1
version: 3-alpha
version: "3"
plugins:
manifests.sdk.operatorframework.io/v2: {}
scorecard.sdk.operatorframework.io/v2: {}

View File

@ -1,11 +1,16 @@
# Jenkins Operator
[![Version](https://img.shields.io/badge/version-v0.7.0-brightgreen.svg)](https://github.com/jenkinsci/kubernetes-operator/releases/tag/v0.7.0)
[![Build status](https://github.com/jenkinsci/kubernetes-operator/actions/workflows/auto-tests.yaml/badge.svg)](https://github.com/jenkinsci/kubernetes-operator/actions/workflows/auto-tests.yaml)
[![Version](https://img.shields.io/badge/version-v0.8.0-brightgreen.svg)](https://github.com/jenkinsci/kubernetes-operator/releases/tag/v0.8.0)
[![Build status](https://github.com/jenkinsci/kubernetes-operator/actions/workflows/auto-tests-e2e.yaml/badge.svg)](https://github.com/jenkinsci/kubernetes-operator/actions/workflows/auto-tests-e2e.yaml)
[![Go Report Card](https://goreportcard.com/badge/github.com/jenkinsci/kubernetes-operator "Go Report Card")](https://goreportcard.com/report/github.com/jenkinsci/kubernetes-operator)
[![Docker Pulls](https://img.shields.io/docker/pulls/virtuslab/jenkins-operator.svg)](https://hub.docker.com/r/virtuslab/jenkins-operator/tags)
[![Gitter chat](https://badges.gitter.im/jenkinsci/kubernetes-operator.png)](https://gitter.im/jenkinsci/kubernetes-operator)
![logo](/assets/jenkins_gopher_wide.png)
<a href="">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins_gopher_wide_exp_dark.png">
<img src="https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins_gopher_wide_exp.png">
</picture>
</a>
## What's the Jenkins Operator?
@ -28,7 +33,7 @@ Jenkins uses [plugins](https://plugins.jenkins.io/) like CasC to extend it's sol
- Integration with Kubernetes ([Jenkins kubernetes-plugin](https://github.com/jenkinsci/kubernetes-plugin))
- Pipelines as Code ([Jenkins pipelines](https://jenkins.io/doc/book/pipeline/))
- Extensibility via Groovy Scripts (similar to [Jenkins script console](https://wiki.jenkins.io/display/JENKINS/Jenkins+Script+Console)) or ([configuration as code plugin](https://github.com/jenkinsci/configuration-as-code-plugin))
- Secure Defaults and Hardening (see [the security section](https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/security/) of the documentation)
- Secure Defaults and Hardening (see [the security section](https://jenkinsci.github.io/kubernetes-operator/docs/security/) of the documentation)
## Problem statement and goals
@ -38,7 +43,7 @@ We want to make Jenkins more robust, suitable for dynamic and multi-tenant envir
Some of the problems we want to solve:
- [installing plugins with incompatible versions or security vulnerabilities](https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customizing-jenkins/#install-plugins/)
- [better configuration as code](https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customizing-jenkins/)
- [security and hardening out of the box](https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/security/)
- [security and hardening out of the box](https://jenkinsci.github.io/kubernetes-operator/docs/security/)
- [make errors more visible for end users](https://jenkinsci.github.io/kubernetes-operator/docs/troubleshooting/)
- orphaned jobs with no JNLP connection
- handle graceful shutdown properly
@ -51,7 +56,7 @@ Go to [**our documentation website**](https://jenkinsci.github.io/kubernetes-ope
Selected content:
1. [How it works](https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/)
2. [Getting Started](https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/)
3. [Security](https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/security/)
3. [Security](https://jenkinsci.github.io/kubernetes-operator/docs/security/)
4. [Troubleshooting](https://jenkinsci.github.io/kubernetes-operator/docs/troubleshooting/)
5. [Developer Guide](https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/)
6. [FAQ](https://jenkinsci.github.io/kubernetes-operator/docs/faq/)
@ -66,15 +71,14 @@ Main channel of communication on topics related to Jenkins Operator is [Jenkins
Here you can ask questions about the project, discuss best practices on using it, and talk to other users of the Operator, contributors and project's maintainers.
We also have a dedicated channel called `#jenkins-operator` on [virtuslab-oss.slack.com](https://virtuslab-oss.slack.com).
Fill out ([Invite form](https://forms.gle/X3X8qA1XMirdBuEH7)) and come say hi!
We also have a [gitter](https://gitter.im/jenkinsci/kubernetes-operator)/[matrix](https://matrix.to/#/#jenkinsci_kubernetes-operator:gitter.im) channel, come to say hi!
## Snapshots between releases
We are trying our best to resolve issues quickly, but they have to wait to be released. If you can't wait for an official
docker image release and acknowledge the risk, you can use our unofficial images, which are built nightly.
You can find the project's Docker Hub repository [here](https://hub.docker.com/r/virtuslab/jenkins-operator).
You can find the project's Quay.io repository [here](https://quay.io/organization/jenkins-kubernetes-operator).
Look for the images with tag "{git-hash}", where {git-hash} is the hash of the master commit that interests you.

View File

@ -1,19 +0,0 @@
# Security Policy
The Jenkins project takes security seriously.
We make every possible effort to ensure users can adequately secure their automation infrastructure.
To that end, we work with Jenkins core and plugin developers, as well as security researchers, to fix security vulnerabilities in Jenkins in a timely manner, and to improve the security of Jenkins in general.
## Reporting Security Vulnerabilities
Please report security vulnerabilities in the Jenkins issue tracker under the [SECURITY project](https://issues.jenkins-ci.org/browse/SECURITY).
This project is configured in such a way that only the reporter and the security team can see the details.
By restricting access to this potentially sensitive information, we can work on a fix and deliver it before the method of attack becomes well-known.
If you are unable to report using our issue tracker, you can also send your report to the private Jenkins security team mailing list: `jenkinsci-cert@googlegroups.com`
The Jenkins security team will then file an issue on your behalf, and will work with the maintainers of the affected component(s) to get the issue resolved.
## Learn More
For further details about our scope, issue handling process, or disclosure process, see [Reporting Security Vulnerabilities on jenkins.io](https://jenkins.io/security/reporting/).

View File

@ -1 +1 @@
v0.7.0
v0.9.0-beta1

View File

@ -14,10 +14,14 @@ type JenkinsSpec struct {
Master JenkinsMaster `json:"master"`
// SeedJobs defines list of Jenkins Seed Job configurations
// More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines
// More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/
// +optional
SeedJobs []SeedJob `json:"seedJobs,omitempty"`
// SeedJobAgentImage defines the image that will be used by the seed job agent. If not defined jenkins/inbound-agent:4.9-1 will be used.
// +optional
SeedJobAgentImage string `json:"seedJobAgentImage,omitempty"`
// ValidateSecurityWarnings enables or disables validating potential security warnings in Jenkins plugins via admission webhooks.
//+optional
ValidateSecurityWarnings bool `json:"validateSecurityWarnings,omitempty"`
@ -42,12 +46,12 @@ type JenkinsSpec struct {
SlaveService Service `json:"slaveService,omitempty"`
// Backup defines configuration of Jenkins backup
// More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/
// More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-backup-and-restore/
// +optional
Backup Backup `json:"backup,omitempty"`
// Backup defines configuration of Jenkins backup restore
// More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/
// More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-backup-and-restore/
// +optional
Restore Restore `json:"restore,omitempty"`
@ -307,6 +311,7 @@ type JenkinsMaster struct {
// periodSeconds: 10
// successThreshold: 1
// timeoutSeconds: 5
// lifecycle: {}
// name: jenkins-master
// readinessProbe:
// failureThreshold: 3
@ -346,26 +351,38 @@ type JenkinsMaster struct {
// BasePlugins contains plugins required by operator
// +optional
// Defaults to :
// - name: kubernetes
// version: "1.30.11"
// - name: workflow-job
// version: "2.42"
// - name: workflow-aggregator
// version: "2.6"
// - name: git
// version: "4.10.0"
// - name: job-dsl
// version: "1.78.1"
// - name: configuration-as-code
// version: "1.55"
// version: "1625.v27444588cc3d"
// - name: git
// version: "5.0.0"
// - name: job-dsl
// version: "1.83"
// - name: kubernetes
// version: "3909.v1f2c633e8590"
// - name: kubernetes-credentials-provider
// version: "0.20"
// version: "1.211.vc236a_f5a_2f3c"
// - name: workflow-aggregator
// version: "596.v8c21c963d92d"
// - name: workflow-job
// version: "1289.vd1c337fd5354"
BasePlugins []Plugin `json:"basePlugins,omitempty"`
// Plugins contains plugins required by user
// +optional
Plugins []Plugin `json:"plugins,omitempty"`
// Allow to override jenkins-plugin-cli default behavior
// while downloading the plugin and dependencies
// see: https://github.com/jenkinsci/plugin-installation-manager-tool#cli-options
// +optional
LatestPlugins *bool `json:"latestPlugins,omitempty"`
// Allow to skip installation of both BasePlugins and Plugins.
// Requires using a custom image which includes the BasePlugins.
// Defaults to false.
// +optional
SkipPlugins *bool `json:"skipPlugins,omitempty"`
// DisableCSRFProtection allows you to toggle CSRF Protection on Jenkins
DisableCSRFProtection bool `json:"disableCSRFProtection"`
@ -376,6 +393,13 @@ type JenkinsMaster struct {
// HostAliases for Jenkins master pod and SeedJob agent
// +optional
HostAliases []corev1.HostAlias `json:"hostAliases,omitempty"`
// The grace period is the duration in seconds after the processes running in the pod are sent
// a termination signal and the time when the processes are forcibly halted with a kill signal.
// Set this value longer than the expected cleanup time for your process.
// Defaults to 30 seconds.
// +optional
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
}
// Service defines Kubernetes service attributes
@ -527,6 +551,7 @@ const (
BasicSSHCredentialType JenkinsCredentialType = "basicSSHUserPrivateKey"
// UsernamePasswordCredentialType define username & password Jenkins credential type
UsernamePasswordCredentialType JenkinsCredentialType = "usernamePassword"
GithubAppCredentialType JenkinsCredentialType = "githubApp"
// ExternalCredentialType defines other credential type
ExternalCredentialType JenkinsCredentialType = "external"
)
@ -536,6 +561,7 @@ var AllowedJenkinsCredentialMap = map[string]string{
string(NoJenkinsCredentialCredentialType): "",
string(BasicSSHCredentialType): "",
string(UsernamePasswordCredentialType): "",
string(GithubAppCredentialType): "",
string(ExternalCredentialType): "",
}

View File

@ -21,7 +21,6 @@ import (
"encoding/json"
"errors"
"io"
"io/ioutil"
"net/http"
"os"
"time"
@ -34,6 +33,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)
var (
@ -45,7 +45,7 @@ var (
const (
Hosturl = "https://ci.jenkins.io/job/Infra/job/plugin-site-api/job/generate-data/lastSuccessfulBuild/artifact/plugins.json.gzip"
CompressedFilePath = "/tmp/plugins.json.gzip"
PluginDataFileCompressedPath = "/tmp/plugins.json.gzip"
PluginDataFile = "/tmp/plugins.json"
shortenedCheckingPeriod = 1 * time.Hour
defaultCheckingPeriod = 12 * time.Minute
@ -58,30 +58,31 @@ func (in *Jenkins) SetupWebhookWithManager(mgr ctrl.Manager) error {
}
// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation.
// +kubebuilder:webhook:path=/validate-jenkins-io-jenkins-io-v1alpha2-jenkins,mutating=false,failurePolicy=fail,sideEffects=None,groups=jenkins.io.jenkins.io,resources=jenkins,verbs=create;update,versions=v1alpha2,name=vjenkins.kb.io,admissionReviewVersions={v1,v1beta1}
// +kubebuilder:webhook:path=/validate-jenkins-io-jenkins-io-v1alpha2-jenkins,mutating=false,failurePolicy=fail,sideEffects=None,groups=jenkins.io.jenkins.io,resources=jenkins,verbs=create;update,versions=v1alpha2,name=vjenkins.kb.io,admissionReviewVersions={v1}
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (in *Jenkins) ValidateCreate() error {
func (in *Jenkins) ValidateCreate() (admission.Warnings, error) {
if in.Spec.ValidateSecurityWarnings {
jenkinslog.Info("validate create", "name", in.Name)
return Validate(*in)
err := Validate(*in)
return nil, err
}
return nil
return nil, nil
}
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (in *Jenkins) ValidateUpdate(old runtime.Object) error {
func (in *Jenkins) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
if in.Spec.ValidateSecurityWarnings {
jenkinslog.Info("validate update", "name", in.Name)
return Validate(*in)
return nil, Validate(*in)
}
return nil
return nil, nil
}
func (in *Jenkins) ValidateDelete() error {
return nil
func (in *Jenkins) ValidateDelete() (admission.Warnings, error) {
return nil, nil
}
type SecurityValidator struct {
@ -263,11 +264,17 @@ func (in *SecurityValidator) fetchPluginData() error {
}
func (in *SecurityValidator) download() error {
out, err := os.Create(CompressedFilePath)
pluginDataFileCompressed, err := os.Create(PluginDataFileCompressedPath)
if err != nil {
return err
}
defer out.Close()
// ensure pluginDataFileCompressed is closed
defer func() {
if err := pluginDataFileCompressed.Close(); err != nil {
jenkinslog.V(log.VDebug).Info("Failed to close SecurityValidator.download io", "error", err)
}
}()
req, err := http.NewRequest(http.MethodGet, Hosturl, nil)
if err != nil {
@ -284,30 +291,45 @@ func (in *SecurityValidator) download() error {
return err
}
defer response.Body.Close()
defer httpResponseCloser(response)
_, err = io.Copy(pluginDataFileCompressed, response.Body)
_, err = io.Copy(out, response.Body)
return err
}
func (in *SecurityValidator) extract() error {
reader, err := os.Open(CompressedFilePath)
reader, err := os.Open(PluginDataFileCompressedPath)
if err != nil {
return err
}
defer reader.Close()
defer func() {
if err := reader.Close(); err != nil {
log.Log.Error(err, "failed to close SecurityValidator.extract.reader ")
}
}()
archive, err := gzip.NewReader(reader)
if err != nil {
return err
}
defer archive.Close()
defer func() {
if err := archive.Close(); err != nil {
log.Log.Error(err, "failed to close SecurityValidator.extract.archive ")
}
}()
writer, err := os.Create(PluginDataFile)
if err != nil {
return err
}
defer writer.Close()
defer func() {
if err := writer.Close(); err != nil {
log.Log.Error(err, "failed to close SecurityValidator.extract.writer")
}
}()
_, err = io.Copy(writer, archive)
return err
@ -319,8 +341,12 @@ func (in *SecurityValidator) cache() error {
if err != nil {
return err
}
defer jsonFile.Close()
byteValue, err := ioutil.ReadAll(jsonFile)
defer func() {
if err := jsonFile.Close(); err != nil {
log.Log.Error(err, "failed to close SecurityValidator.cache.jsonFile")
}
}()
byteValue, err := io.ReadAll(jsonFile)
if err != nil {
return err
}
@ -346,3 +372,9 @@ func compareVersions(firstVersion string, lastVersion string, pluginVersion stri
}
return true
}
func httpResponseCloser(response *http.Response) {
if err := response.Body.Close(); err != nil {
log.Log.Error(err, "failed to close http response body")
}
}

View File

@ -79,7 +79,7 @@ func TestValidate(t *testing.T) {
t.Run("Validating when plugins data file is not fetched", func(t *testing.T) {
userplugins := []Plugin{{Name: "script-security", Version: "1.77"}, {Name: "git-client", Version: "3.9"}, {Name: "git", Version: "4.8.1"}, {Name: "plain-credentials", Version: "1.7"}}
jenkinscr := *createJenkinsCR(userplugins, true)
got := jenkinscr.ValidateCreate()
_, got := jenkinscr.ValidateCreate()
assert.Equal(t, got, errors.New("plugins data has not been fetched"))
})
@ -95,7 +95,7 @@ func TestValidate(t *testing.T) {
{Name: "plain-credentials"}}}
userplugins := []Plugin{{Name: "script-security", Version: "1.77"}, {Name: "git-client", Version: "3.9"}, {Name: "git", Version: "4.8.1"}, {Name: "plain-credentials", Version: "1.7"}}
jenkinscr := *createJenkinsCR(userplugins, true)
got := jenkinscr.ValidateCreate()
_, got := jenkinscr.ValidateCreate()
assert.Nil(t, got)
})
@ -113,7 +113,7 @@ func TestValidate(t *testing.T) {
}}
userplugins := []Plugin{{Name: "google-login", Version: "1.2"}, {Name: "mailer", Version: "1.1"}, {Name: "git", Version: "4.8.1"}, {Name: "command-launcher", Version: "1.6"}, {Name: "workflow-cps", Version: "2.59"}}
jenkinscr := *createJenkinsCR(userplugins, true)
got := jenkinscr.ValidateCreate()
_, got := jenkinscr.ValidateCreate()
assert.Equal(t, got, errors.New("security vulnerabilities detected in the following user-defined plugins: \nworkflow-cps:2.59\ngoogle-login:1.2\nmailer:1.1"))
})
@ -136,19 +136,19 @@ func TestValidate(t *testing.T) {
userplugins = []Plugin{{Name: "handy-uri-templates-2-api", Version: "2.1.8-1.0"}, {Name: "resource-disposer", Version: "0.8"}, {Name: "jjwt-api", Version: "0.11.2-9.c8b45b8bb173"}, {Name: "blueocean-github-pipeline", Version: "1.2.0-beta-3"}, {Name: "ghprb", Version: "1.39"}}
newjenkinscr := *createJenkinsCR(userplugins, true)
got := newjenkinscr.ValidateUpdate(&oldjenkinscr)
_, got := newjenkinscr.ValidateUpdate(&oldjenkinscr)
assert.Equal(t, got, errors.New("security vulnerabilities detected in the following user-defined plugins: \nhandy-uri-templates-2-api:2.1.8-1.0\nresource-disposer:0.8\nblueocean-github-pipeline:1.2.0-beta-3\nghprb:1.39"))
})
t.Run("Validation is turned off", func(t *testing.T) {
userplugins := []Plugin{{Name: "google-login", Version: "1.2"}, {Name: "mailer", Version: "1.1"}, {Name: "git", Version: "4.8.1"}, {Name: "command-launcher", Version: "1.6"}, {Name: "workflow-cps", Version: "2.59"}}
jenkinscr := *createJenkinsCR(userplugins, false)
got := jenkinscr.ValidateCreate()
_, got := jenkinscr.ValidateCreate()
assert.Nil(t, got)
userplugins = []Plugin{{Name: "google-login", Version: "1.2"}, {Name: "mailer", Version: "1.1"}, {Name: "git", Version: "4.8.1"}, {Name: "command-launcher", Version: "1.6"}, {Name: "workflow-cps", Version: "2.59"}}
newjenkinscr := *createJenkinsCR(userplugins, false)
got = newjenkinscr.ValidateUpdate(&jenkinscr)
_, got = newjenkinscr.ValidateUpdate(&jenkinscr)
assert.Nil(t, got)
})
}

View File

@ -1,4 +1,4 @@
// +build !ignore_autogenerated
//go:build !ignore_autogenerated
/*
Copyright 2021.
@ -22,7 +22,7 @@ package v1alpha2
import (
corev1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
"k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg/runtime"
)
@ -356,6 +356,16 @@ func (in *JenkinsMaster) DeepCopyInto(out *JenkinsMaster) {
*out = make([]Plugin, len(*in))
copy(*out, *in)
}
if in.LatestPlugins != nil {
in, out := &in.LatestPlugins, &out.LatestPlugins
*out = new(bool)
**out = **in
}
if in.SkipPlugins != nil {
in, out := &in.SkipPlugins, &out.SkipPlugins
*out = new(bool)
**out = **in
}
if in.HostAliases != nil {
in, out := &in.HostAliases, &out.HostAliases
*out = make([]corev1.HostAlias, len(*in))
@ -363,6 +373,11 @@ func (in *JenkinsMaster) DeepCopyInto(out *JenkinsMaster) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.TerminationGracePeriodSeconds != nil {
in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds
*out = new(int64)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsMaster.
@ -399,7 +414,7 @@ func (in *JenkinsSpec) DeepCopyInto(out *JenkinsSpec) {
in.ConfigurationAsCode.DeepCopyInto(&out.ConfigurationAsCode)
if in.Roles != nil {
in, out := &in.Roles, &out.Roles
*out = make([]rbacv1.RoleRef, len(*in))
*out = make([]v1.RoleRef, len(*in))
copy(*out, *in)
}
in.ServiceAccount.DeepCopyInto(&out.ServiceAccount)

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

View File

@ -1,11 +1,22 @@
FROM debian:buster-slim
FROM debian:bookworm-slim
LABEL maintainer="Jenkins Kubernetes Operator Community" \
org.opencontainers.image.authors="Jenkins Kubernetes Operator Community" \
org.opencontainers.image.title="backup-pvc" \
org.opencontainers.image.description="Jenkins Operator Backup img via pvc volume" \
org.opencontainers.image.url="quay.io/jenkins-kubernetes-operator/backup-pvc" \
org.opencontainers.image.source="https://github.com/jenkinsci/kubernetes-operator/tree/master/backup/pvc" \
org.opencontainers.image.base.name="debian:bookworm-slim"
ARG UID
ARG GID
ENV USER=user
RUN addgroup --gid "$GID" "$USER" && \
RUN apt update \
&& apt install -y procps zstd \
&& rm -rf /var/lib/apt/lists/* \
&& addgroup --gid "$GID" "$USER" && \
adduser \
--disabled-password \
--gecos "" \
@ -13,9 +24,9 @@ RUN addgroup --gid "$GID" "$USER" && \
--uid "$UID" \
"$USER"
COPY bin/*.sh /home/user/bin/
RUN chmod -R a+rx /home/user
WORKDIR /home/user/bin
COPY bin .
RUN chmod +x *.sh
USER user
CMD ./run.sh

View File

@ -15,7 +15,7 @@ PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
GITCOMMIT := $(shell git rev-parse --short HEAD)
GITBRANCH := $(shell git rev-parse --abbrev-ref HEAD)
GITUNTRACKEDCHANGES := $(shell git status --porcelain --untracked-files=no)
GITIGNOREDBUTTRACKEDCHANGES := $(shell git ls-files -i --exclude-standard)
GITIGNOREDBUTTRACKEDCHANGES := $(shell git ls-files -i -o --exclude-standard)
ifneq ($(GITUNTRACKEDCHANGES),)
GITCOMMIT := $(GITCOMMIT)-dirty
endif
@ -58,7 +58,7 @@ spring-clean: ## Cleanup git ignored files (interactive)
git clean -Xdi
.PHONY: checkmake
HAS_CHECKMAKE := $(shell which checkmake)
HAS_CHECKMAKE := $(shell command -v checkmake)
checkmake: ## Check this Makefile
@echo "+ $@"
ifndef HAS_CHECKMAKE
@ -68,12 +68,12 @@ endif
define e2e
echo "\nRunning $(1) e2e test";
@e2e/$(1)/test.sh $(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT)
@e2e/$(1)/test.sh quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):$(GITCOMMIT)
endef
.PHONY: docker-e2e
E2E_TESTS := $(shell ls e2e)
docker-e2e: docker-build ## Make e2e tests for docker image
docker-e2e: docker-build-e2e ## Make e2e tests for docker image
@echo "+ $@"
$(foreach TEST_NAME,$(E2E_TESTS), $(call e2e,$(TEST_NAME)))
@ -81,10 +81,15 @@ docker-e2e: docker-build ## Make e2e tests for docker image
docker-login: ## Log in into the Docker repository
@echo "+ $@"
.PHONY: docker-build-e2e
docker-build-e2e: UID=1001
docker-build-e2e: GID=1001
docker-build-e2e: docker-build
.PHONY: docker-build
docker-build: check-env ## Build the container
@echo "+ $@"
docker build . --build-arg UID=$(UID) --build-arg GID=$(GID) -t $(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT) --file Dockerfile
docker build . --build-arg UID=$(UID) --build-arg GID=$(GID) -t quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):$(GITCOMMIT) --file Dockerfile
.PHONY: docker-images
docker-images: ## List all local containers
@ -94,25 +99,31 @@ docker-images: ## List all local containers
.PHONY: docker-push
docker-push: docker-build ## Push the container
@echo "+ $@"
docker tag $(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)-$(NAME):$(BUILD_TAG)
docker push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)-$(NAME):$(BUILD_TAG)
docker tag quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):$(GITCOMMIT) quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):$(BUILD_TAG)
docker push quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):$(BUILD_TAG)
.PHONY: docker-release-version
docker-release-version: docker-build ## Release image with version tag (in addition to build tag)
@echo "+ $@"
docker tag $(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)-$(NAME):$(VERSION_TAG)
docker push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)-$(NAME):$(VERSION_TAG)
docker tag quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):$(GITCOMMIT) quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):$(VERSION_TAG)
docker push quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):$(VERSION_TAG)
.PHONY: docker-release-latest
docker-release-latest: docker-build ## Release image with latest tags (in addition to build tag)
@echo "+ $@"
docker tag $(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)-$(NAME):$(LATEST_TAG)
docker push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)-$(NAME):$(LATEST_TAG)
docker tag quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):$(GITCOMMIT) quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):$(LATEST_TAG)
docker push quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):$(LATEST_TAG)
.PHONY: docker-release
docker-release: docker-release-version docker-release-latest ## Release image with version and latest tags (in addition to build tag)
@echo "+ $@"
.PHONY: backup-kind-load
backup-kind-load: docker-build ## Build and load backup img in kind with e2e-test tag
@echo "+ $@"
docker tag quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):$(GITCOMMIT) quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):e2e-test
kind load docker-image quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):e2e-test --name $(KIND_CLUSTER_NAME)
# if this session isn't interactive, then we don't want to allocate a
# TTY, which would fail, but if it is interactive, we do want to attach
# so that the user can send e.g. ^C through.
@ -122,20 +133,30 @@ ifeq ($(INTERACTIVE), 1)
endif
.PHONY: docker-run
docker-run: docker-build ## Run the container in docker, you can use EXTRA_ARGS
docker-run: docker-build
@echo "+ $@"
docker run --rm -i $(DOCKER_FLAGS) \
$(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT) $(ARGS)
quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY)-$(NAME):$(GITCOMMIT) $(ARGS)
.PHONY: sembump
HAS_SEMBUMP := $(shell which $(PROJECT_DIR)/bin/sembump)
sembump: # Download sembump locally if necessary
@echo "+ $@"
ifndef HAS_SEMBUMP
mkdir -p $(PROJECT_DIR)/bin
wget -O $(PROJECT_DIR)/bin/sembump https://github.com/justintout/sembump/releases/download/v0.1.0/sembump-linux-amd64
chmod +x $(PROJECT_DIR)/bin/sembump
endif
.PHONY: bump-version
BUMP := patch
bump-version: ## Bump the version in the version file. Set BUMP to [ patch | major | minor ]
bump-version: sembump ## Bump the version in the version file. Set BUMP to [ patch | major | minor ]
@echo "+ $@"
$(eval NEW_VERSION=$(shell $(PROJECT_DIR)/../../bin/sembump --kind $(BUMP) $(VERSION)))
$(eval NEW_VERSION=$(shell $(PROJECT_DIR)/bin/sembump --kind $(BUMP) $(VERSION)))
@echo "Bumping VERSION.txt from $(VERSION) to $(NEW_VERSION)"
echo $(NEW_VERSION) > VERSION.txt
git add VERSION.txt
git commit -vaem "Bump backup PVC version to $(NEW_VERSION)"
git commit -avm "Bump backup PVC version to $(NEW_VERSION)"
.PHONY: tag
tag: ## Create a new git tag to prepare to build a release
@ -159,7 +180,7 @@ ifneq ($(GITUNTRACKEDCHANGES),)
endif
ifneq ($(GITIGNOREDBUTTRACKEDCHANGES),)
@echo "Ignored but tracked files:"
@git ls-files -i --exclude-standard
@git ls-files -i -c --exclude-standard
@echo
endif
@echo "Dependencies:"

View File

@ -1 +1 @@
v0.1.1
v0.4.3

68
backup/pvc/bin/backup.sh Normal file → Executable file
View File

@ -1,25 +1,67 @@
#!/usr/bin/env bash
set -eo pipefail
source "$(dirname "$0")/utils.sh"
[[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1;
[[ -z "${BACKUP_DIR}" ]] && echo "Required 'BACKUP_DIR' env not set" && exit 1;
[[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
BACKUP_TMP_DIR=$(mktemp -d)
[[ ! $# -eq 1 ]] && _log "ERROR" "Usage: $0 BACKUP_NUMBER" && exit 1
[[ -z "${BACKUP_DIR}" ]] && _log "ERROR" "Required 'BACKUP_DIR' env not set" && exit 1
[[ -z "${JENKINS_HOME}" ]] && _log "ERROR" "Required 'JENKINS_HOME' env not set" && exit 1
BACKUP_RETRY_COUNT=${BACKUP_RETRY_COUNT:-3}
BACKUP_RETRY_INTERVAL=${BACKUP_RETRY_INTERVAL:-60}
BACKUP_NUMBER=$1
TRAP_FILE="/tmp/_backup_${BACKUP_NUMBER}_is_running"
backup_number=$1
echo "Running backup"
# --> Check if another backup process is running (operator restart/crash)
for ((i=0; i<BACKUP_RETRY_COUNT; i++)); do
[[ ! -f "${TRAP_FILE}" ]] && _log "INFO" "[backup] no other backup process are running" && break
_log "INFO" "[backup] backup is already running. Waiting for ${BACKUP_RETRY_INTERVAL} seconds..."
sleep "${BACKUP_RETRY_INTERVAL}"
done
[[ -f "${TRAP_FILE}" ]] && { _log "ERROR" "[backup] backup is still running after waiting ${BACKUP_RETRY_COUNT} time ${BACKUP_RETRY_INTERVAL}s. Exiting."; exit 1; }
# --< Done
# config.xml in a job directory is a config file that shouldnt be backed up
# config.xml in child directores is state that should. For example-
_log "INFO" "[backup] running backup ${BACKUP_NUMBER}"
touch "${TRAP_FILE}"
# create temp dir on the same filesystem with a BACKUP_DIR to be able use atomic mv enstead of copy
BACKUP_TMP_DIR=$(mktemp -d --tmpdir="${BACKUP_DIR}")
_clean(){
test -d "${BACKUP_TMP_DIR}" && rm -fr "${BACKUP_TMP_DIR}"
test -f "${TRAP_FILE}" && rm -f "${TRAP_FILE}"
}
_trap(){
_clean
_log "ERROR" "[backup] something wrong happened, check the logs"
}
trap '_trap' SIGQUIT SIGINT SIGTERM
# config.xml in a job directory is a config file that shouldn't be backed up
# config.xml in child directories is state that should. For example-
# branches/myorg/branches/myrepo/branches/master/config.xml should be retained while
# branches/myorg/config.xml should not
tar -C ${JENKINS_HOME} -czf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz" --exclude jobs/*/workspace* --no-wildcards-match-slash --anchored --exclude jobs/*/config.xml -c jobs && \
mv ${BACKUP_TMP_DIR}/${backup_number}.tar.gz ${BACKUP_DIR}/${backup_number}.tar.gz
tar --zstd -C "${JENKINS_HOME}" -cf "${BACKUP_TMP_DIR}/${BACKUP_NUMBER}.tar.zstd" \
--exclude jobs/*/workspace* \
--no-wildcards-match-slash --anchored \
--ignore-failed-read \
--exclude jobs/*/config.xml -c jobs || ret=$?
rm -r ${BACKUP_TMP_DIR}
if [[ "$ret" -eq 0 ]]; then
_log "INFO" "[backup] backup ${BACKUP_NUMBER} was completed without warnings"
elif [[ "$ret" -eq 1 ]]; then
_log "INFO" "[backup] backup ${BACKUP_NUMBER} was completed with some warnings"
else
_log "ERROR" "[backup] backup ${BACKUP_NUMBER} failed with error code: $ret"
_clean
exit "$ret"
fi
[[ ! -s ${BACKUP_DIR}/${backup_number}.tar.gz ]] && echo "backup file '${BACKUP_DIR}/${backup_number}.tar.gz' is empty" && exit 1;
mv "${BACKUP_TMP_DIR}/${BACKUP_NUMBER}.tar.zstd" "${BACKUP_DIR}/${BACKUP_NUMBER}.tar.zstd"
echo Done
_log "INFO" "[backup] cleaning ${BACKUP_TMP_DIR} and trap file ${TRAP_FILE}"
_clean
[[ ! -s ${BACKUP_DIR}/${BACKUP_NUMBER}.tar.zstd ]] && _log "ERROR" "[backup] file '${BACKUP_DIR}/${BACKUP_NUMBER}.tar.zstd' is empty" && exit 1
_log "INFO" "[backup] ${BACKUP_NUMBER} done"
exit 0

31
backup/pvc/bin/get-latest.sh Normal file → Executable file
View File

@ -1,12 +1,39 @@
#!/usr/bin/env bash
set -eo pipefail
source "$(dirname "$0")/utils.sh"
[[ -z "${BACKUP_DIR}" ]] && echo "Required 'BACKUP_DIR' env not set" && exit 1
is_backup_not_exist() {
local backup_dir="$1"
# Save the current value of 'set -e'
local previous_e
previous_e=$(set +e; :; echo $?)
# Temporarily turn off 'set -e'
set +e
# Run ls command to check if any files matching the pattern exist
ls "${backup_dir}"/*.tar.* 1> /dev/null 2>&1
# Store the exit status of the ls command
local ls_exit_status=$?
# Restore the previous value of 'set -e'
[ "$previous_e" = "0" ] && set -e
# Return true if ls command succeeded (no files found), otherwise return false
[ $ls_exit_status -ne 0 ]
}
latest=$(find ${BACKUP_DIR} -name '*.tar.gz' -exec basename {} \; | sort -g | tail -n 1)
[[ -z "${BACKUP_DIR}" ]] && { _log "ERROR" "Required 'BACKUP_DIR' env not set"; exit 1; }
# Check if we have any backup
if is_backup_not_exist "${BACKUP_DIR}"; then
_log "No backups exist in ${BACKUP_DIR}"
echo "-1"
exit 0
fi
# Search for all the tar.* inside the backup dir to support the migration between gzip vs zstd
latest=$(find "${BACKUP_DIR}"/*.tar.* -maxdepth 0 -exec basename {} \; | sort -g | tail -n 1)
if [[ "${latest}" == "" ]]; then
_log "Could not get the latest backup."
echo "-1"
else
echo "${latest%%.*}"

56
backup/pvc/bin/restore.sh Normal file → Executable file
View File

@ -1,15 +1,57 @@
#!/usr/bin/env bash
set -eo pipefail
source "$(dirname "$0")/utils.sh"
[[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1
[[ -z "${BACKUP_DIR}" ]] && echo "Required 'BACKUP_DIR' env not set" && exit 1;
[[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
[[ ! $# -eq 1 ]] && _log "ERROR" "Usage: $0 <backup number>" && exit 1
[[ -z "${BACKUP_DIR}" ]] && _log "ERROR" "Required 'BACKUP_DIR' env not set" && exit 1
[[ -z "${JENKINS_HOME}" ]] && _log "ERROR" "Required 'JENKINS_HOME' env not set" && exit 1
BACKUP_NUMBER=$1
RESTORE_RETRY_COUNT=${RESTORE_RETRY_COUNT:-10}
RESTORE_RETRY_INTERVAL=${RESTORE_RETRY_INTERVAL:-10}
backup_number=$1
echo "Running restore backup"
# --> Check if another restore process is running (operator restart/crash)
TRAP_FILE="/tmp/_restore_${BACKUP_NUMBER}_is_running"
trap "rm -f ${TRAP_FILE}" SIGINT SIGTERM
tar -C ${JENKINS_HOME} -zxf "${BACKUP_DIR}/${backup_number}.tar.gz"
for ((i=0; i<RESTORE_RETRY_COUNT; i++)); do
[[ ! -f "${TRAP_FILE}" ]] && _log "INFO" "[restore] no other process are running, restoring" && break
_log "INFO" "[restore] is already running. Waiting for ${RESTORE_RETRY_INTERVAL} seconds..."
sleep "${RESTORE_RETRY_INTERVAL}"
done
[[ -f "${TRAP_FILE}" ]] && { _log "ERROR" "[restore] is still running after waiting ${RESTORE_RETRY_COUNT} time ${RESTORE_RETRY_INTERVAL}s. Exiting."; exit 1; }
# --< Done
echo Done
_log "INFO" "[restore] restore backup with backup number #${BACKUP_NUMBER}"
touch "${TRAP_FILE}"
BACKUP_FILE="${BACKUP_DIR}/${BACKUP_NUMBER}"
if [[ -f "$BACKUP_FILE.tar.gz" ]]; then
_log "INFO" "[restore] old format tar.gz found, restoring it"
OPTS=""
EXT="tar.gz"
elif [[ -f "$BACKUP_FILE.tar.zstd" ]]; then
_log "INFO" "[restore] Backup file found, proceeding"
OPTS="--zstd"
EXT="tar.zstd"
else
_log "ERROR" "[restore] backup file not found: $BACKUP_FILE"
exit 1
fi
tar $OPTS -C "${JENKINS_HOME}" -xf "${BACKUP_DIR}/${BACKUP_NUMBER}.${EXT}" || ret=$?
if [[ "$ret" -eq 0 ]]; then
_log "INFO" "[restore] restore ${BACKUP_NUMBER} was completed without warnings"
elif [[ "$ret" -eq 1 ]]; then
_log "INFO" "[restore] restore ${BACKUP_NUMBER} was completed with some warnings"
else
_log "ERROR" "[restore] restore ${BACKUP_NUMBER} failed with error code: $ret"
exit "$ret"
fi
_log "INFO" "[restore] deleting lock file ${TRAP_FILE}"
test -f "${TRAP_FILE}" && rm -f "${TRAP_FILE}"
_log "INFO" "[restore] restoring ${BACKUP_NUMBER} Done"
exit 0

69
backup/pvc/bin/run.sh Normal file → Executable file
View File

@ -1,15 +1,72 @@
#!/usr/bin/env bash
set -eo pipefail
source "$(dirname "$0")/utils.sh"
[[ -z "${BACKUP_DIR}" ]] && echo "Required 'BACKUP_DIR' env not set" && exit 1;
[[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
# Use 60 as default in case BACKUP_CLEANUP_INTERVAL did not set
BACKUP_CLEANUP_INTERVAL=${BACKUP_CLEANUP_INTERVAL:=60}
# Ensure required environment variables are set
check_env_var() {
if [[ -z "${!1}" ]]; then
_log "ERROR" "Required '$1' environment variable is not set"
exit 1
fi
}
is_backup_not_exist() {
local backup_dir="$1"
# Save the current value of 'set -e'
local previous_e
previous_e=$(set +e; :; echo $?)
# Temporarily turn off 'set -e'
set +e
# Run ls command to check if any files matching the pattern exist
ls "${backup_dir}"/*.tar.* 1> /dev/null 2>&1
# Store the exit status of the ls command
local ls_exit_status=$?
# Restore the previous value of 'set -e'
[ "$previous_e" = "0" ] && set -e
# Return true if ls command succeeded (no files found), otherwise return false
[ $ls_exit_status -ne 0 ]
}
# Function to find exceeding backups
find_exceeding_backups() {
local backup_dir="$1"
local backup_count="$2"
# Check if we have any backup
if is_backup_not_exist "${backup_dir}"; then
_log "ERROR" "[run] backups not found in ${backup_dir}"
return
fi
find "${backup_dir}"/*.tar.zstd -maxdepth 0 -exec basename {} \; | sort -gr | tail -n +$((backup_count +1))
}
check_env_var "BACKUP_DIR"
check_env_var "JENKINS_HOME"
if [[ -z "${BACKUP_COUNT}" ]]; then
_log "WARNING" "[run] no BACKUP_COUNT set, it means you MUST delete old backups manually or by custom script"
else
_log "INFO" "[run] retaining only the ${BACKUP_COUNT} most recent backups, cleanup occurs every ${BACKUP_CLEANUP_INTERVAL} seconds"
fi
while true;
do
sleep 10
if [[ ! -z "${BACKUP_COUNT}" ]]; then
echo "Trimming to only ${BACKUP_COUNT} recent backups in preparation for new backup"
find ${BACKUP_DIR} -name '*.tar.gz' -exec basename {} \; | sort -gr | tail -n +$((BACKUP_COUNT +1)) | xargs -I '{}' rm ${BACKUP_DIR}/'{}'
sleep "$BACKUP_CLEANUP_INTERVAL"
if [[ -n "${BACKUP_COUNT}" ]]; then
exceeding_backups=$(find_exceeding_backups "${BACKUP_DIR}" "${BACKUP_COUNT}")
if [[ -n "$exceeding_backups" ]]; then
_log "INFO" "[run] removing backups: $(echo "$exceeding_backups" | tr '\n' ', ' | sed 's/,$//')"
echo "$exceeding_backups" | while read -r file; do
rm "${BACKUP_DIR}/${file}"
done
fi
fi
done

14
backup/pvc/bin/utils.sh Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Common utils
_log() {
local level="$1"
local message="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
if [[ "$level" =~ ^(ERROR|ERR|error|err)$ ]]; then
echo "${timestamp} - ${level} - ${message}" > /proc/1/fd/2
else
echo "${timestamp} - ${level} - ${message}" > /proc/1/fd/1
echo "${timestamp} - ${level} - ${message}" >&2
fi
}

View File

@ -1,6 +1,7 @@
# Setup variables for the Makefile
NAME=pvc
DOCKER_ORGANIZATION=virtuslab
DOCKER_REGISTRY=jenkins-operator-backup
QUAY_ORGANIZATION=jenkins-kubernetes-operator
QUAY_REGISTRY=backup
UID=1000
GID=1000
KIND_CLUSTER_NAME=jenkins

View File

@ -30,7 +30,7 @@ trap "docker rm -vf $cid > /dev/null;rm -rf ${BACKUP_DIR};rm -rf ${RESTORE_FOLDE
backup_number=1
docker exec ${cid} /home/user/bin/backup.sh ${backup_number}
backup_file="${BACKUP_DIR}/${backup_number}.tar.gz"
backup_file="${BACKUP_DIR}/${backup_number}.tar.zstd"
[[ ! -f ${backup_file} ]] && echo "Backup file ${backup_file} not found" && exit 1;
docker exec ${cid} /bin/bash -c "JENKINS_HOME=${RESTORE_FOLDER};/home/user/bin/restore.sh ${backup_number}"

View File

@ -19,17 +19,20 @@ mkdir -p ${BACKUP_DIR}
mkdir -p ${JENKINS_HOME}
mkdir -p ${BACKUP_DIR}/lost+found
touch ${BACKUP_DIR}/1.tar.gz
touch ${BACKUP_DIR}/2.tar.gz
touch ${BACKUP_DIR}/3.tar.gz
touch ${BACKUP_DIR}/4.tar.gz
touch ${BACKUP_DIR}/5.tar.gz
touch ${BACKUP_DIR}/6.tar.gz
touch ${BACKUP_DIR}/7.tar.gz
touch ${BACKUP_DIR}/8.tar.gz
touch ${BACKUP_DIR}/9.tar.gz
touch ${BACKUP_DIR}/10.tar.gz
touch ${BACKUP_DIR}/11.tar.gz
touch ${BACKUP_DIR}/1.tar.zstd
touch ${BACKUP_DIR}/2.tar.zstd
touch ${BACKUP_DIR}/3.tar.zstd
touch ${BACKUP_DIR}/4.tar.zstd
touch ${BACKUP_DIR}/5.tar.zstd
touch ${BACKUP_DIR}/6.tar.zstd
touch ${BACKUP_DIR}/7.tar.zstd
touch ${BACKUP_DIR}/8.tar.zstd
touch ${BACKUP_DIR}/9.tar.zstd
touch ${BACKUP_DIR}/10.tar.zstd
touch ${BACKUP_DIR}/11.tar.zstd
# Emulate backup creation
BACKUP_TMP_DIR=$(mktemp -d --tmpdir="${BACKUP_DIR}")
touch ${BACKUP_TMP_DIR}/12.tar.zstd
# Create an instance of the container under testing
cid="$(docker run -e JENKINS_HOME=${JENKINS_HOME} -v ${JENKINS_HOME}:${JENKINS_HOME}:ro -e BACKUP_DIR=${BACKUP_DIR} -v ${BACKUP_DIR}:${BACKUP_DIR}:rw -d ${docker_image})"
@ -38,10 +41,20 @@ echo "Docker container ID '${cid}'"
# Remove test directory and container afterwards
trap "docker rm -vf $cid > /dev/null;rm -rf ${BACKUP_DIR};rm -rf ${JENKINS_HOME}" EXIT
echo "Try to get latest against 11 backups and one in progress"
latest=$(docker exec ${cid} /bin/bash -c "JENKINS_HOME=${RESTORE_FOLDER};/home/user/bin/get-latest.sh")
rm ${BACKUP_DIR}/*.tar.gz
rm ${BACKUP_DIR}/*.tar.zstd
echo "Try to get latest against one in progress"
empty_latest=$(docker exec ${cid} /bin/bash -c "JENKINS_HOME=${RESTORE_FOLDER};/home/user/bin/get-latest.sh")
rmdir ${BACKUP_DIR}/lost+found
rm ${BACKUP_TMP_DIR}/*.tar.zstd
rmdir ${BACKUP_TMP_DIR}
echo "Try to get latest against empty dir"
empty_dir_latest=$(docker exec ${cid} /bin/bash -c "JENKINS_HOME=${RESTORE_FOLDER};/home/user/bin/get-latest.sh")
if [[ "${DEBUG}" ]]; then
docker logs ${cid}
ls -la ${BACKUP_DIR}
@ -55,5 +68,9 @@ if [[ ! "${empty_latest}" == "-1" ]]; then
echo "Latest backup number should be '-1' but is '${empty_latest}'"
exit 1
fi
if [[ ! "${empty_dir_latest}" == "-1" ]]; then
echo "Latest backup number should be '-1' but is '${empty_dir_latest}'"
exit 1
fi
echo PASS

View File

@ -1,6 +1,8 @@
#!/bin/bash
set -eo pipefail
echo "Running limit_backup_count e2e test..."
[[ "${DEBUG}" ]] && set -x
# set current working directory to the directory of the script
@ -19,28 +21,31 @@ mkdir -p ${BACKUP_DIR}
mkdir -p ${JENKINS_HOME}
mkdir -p ${BACKUP_DIR}/lost+found
touch ${BACKUP_DIR}/1.tar.gz
touch ${BACKUP_DIR}/2.tar.gz
touch ${BACKUP_DIR}/3.tar.gz
touch ${BACKUP_DIR}/4.tar.gz
touch ${BACKUP_DIR}/5.tar.gz
touch ${BACKUP_DIR}/6.tar.gz
touch ${BACKUP_DIR}/7.tar.gz
touch ${BACKUP_DIR}/8.tar.gz
touch ${BACKUP_DIR}/9.tar.gz
touch ${BACKUP_DIR}/10.tar.gz
touch ${BACKUP_DIR}/11.tar.gz
touch ${BACKUP_DIR}/1.tar.zstd
touch ${BACKUP_DIR}/2.tar.zstd
touch ${BACKUP_DIR}/3.tar.zstd
touch ${BACKUP_DIR}/4.tar.zstd
touch ${BACKUP_DIR}/5.tar.zstd
touch ${BACKUP_DIR}/6.tar.zstd
touch ${BACKUP_DIR}/7.tar.zstd
touch ${BACKUP_DIR}/8.tar.zstd
touch ${BACKUP_DIR}/9.tar.zstd
touch ${BACKUP_DIR}/10.tar.zstd
touch ${BACKUP_DIR}/11.tar.zstd
# Emulate backup creation
BACKUP_TMP_DIR=$(mktemp -d --tmpdir="${BACKUP_DIR}")
touch ${BACKUP_TMP_DIR}/12.tar.zstd
# Create an instance of the container under testing
cid="$(docker run -e BACKUP_COUNT=2 -e JENKINS_HOME=${JENKINS_HOME} -v ${JENKINS_HOME}:${JENKINS_HOME}:ro -e BACKUP_DIR=${BACKUP_DIR} -v ${BACKUP_DIR}:${BACKUP_DIR}:rw -d ${docker_image})"
cid="$(docker run -e BACKUP_CLEANUP_INTERVAL=1 -e BACKUP_COUNT=2 -e JENKINS_HOME=${JENKINS_HOME} -v ${JENKINS_HOME}:${JENKINS_HOME}:ro -e BACKUP_DIR=${BACKUP_DIR} -v ${BACKUP_DIR}:${BACKUP_DIR}:rw -d ${docker_image})"
echo "Docker container ID '${cid}'"
# Remove test directory and container afterwards
trap "docker rm -vf $cid > /dev/null;rm -rf ${BACKUP_DIR};rm -rf ${JENKINS_HOME}" EXIT
sleep 11
touch ${BACKUP_DIR}/12.tar.gz
sleep 11
sleep 2
mv ${BACKUP_TMP_DIR}/12.tar.zstd ${BACKUP_DIR}/
sleep 2
if [[ "${DEBUG}" ]]; then
docker logs ${cid}
@ -48,7 +53,7 @@ if [[ "${DEBUG}" ]]; then
fi
# only two latest backup should exists
[[ $(ls -1 ${BACKUP_DIR} | grep 'tar.gz' | wc -l) -eq 2 ]] || exit 1
[[ -f ${BACKUP_DIR}/11.tar.gz ]] || exit 2
[[ -f ${BACKUP_DIR}/12.tar.gz ]] || exit 3
[[ $(ls -1 ${BACKUP_DIR} | grep 'tar.zstd' | wc -l) -eq 2 ]] || exit 1
[[ -f ${BACKUP_DIR}/11.tar.zstd ]] || exit 2
[[ -f ${BACKUP_DIR}/12.tar.zstd ]] || exit 3
echo PASS

View File

@ -1,6 +1,8 @@
#!/bin/bash
set -eo pipefail
echo "Running limit_backup_count_no_backups e2e test..."
[[ "${DEBUG}" ]] && set -x
# set current working directory to the directory of the script
@ -19,7 +21,7 @@ mkdir -p ${BACKUP_DIR}
mkdir -p ${JENKINS_HOME}
# Create an instance of the container under testing
cid="$(docker run -e BACKUP_COUNT=2 -e JENKINS_HOME=${JENKINS_HOME} -v ${JENKINS_HOME}:${JENKINS_HOME}:ro -e BACKUP_DIR=${BACKUP_DIR} -v ${BACKUP_DIR}:${BACKUP_DIR}:rw -d ${docker_image})"
cid="$(docker run -e BACKUP_CLEANUP_INTERVAL=1 -e BACKUP_COUNT=2 -e JENKINS_HOME=${JENKINS_HOME} -v ${JENKINS_HOME}:${JENKINS_HOME}:ro -e BACKUP_DIR=${BACKUP_DIR} -v ${BACKUP_DIR}:${BACKUP_DIR}:rw -d ${docker_image})"
echo "Docker container ID '${cid}'"
# Remove test directory and container afterwards
@ -27,8 +29,16 @@ trap "docker rm -vf $cid > /dev/null;rm -rf ${BACKUP_DIR};rm -rf ${JENKINS_HOME}
# container should be running
echo 'Checking if container is running'
sleep 11
sleep 3
set +e
docker exec ${cid} echo
exit_code=$?
set -e
if [ $exit_code -ne 0 ]; then
echo "container terminated with following logs:"
docker logs "${cid}"
exit 1
fi
echo 'Container is running'
echo PASS

View File

@ -1,6 +1,8 @@
#!/bin/bash
set -eo pipefail
echo "Running tmp_dir_clean_after_backup_creation e2e test..."
[[ "${DEBUG}" ]] && set -x
# set current working directory to the directory of the script
@ -18,7 +20,7 @@ BACKUP_DIR="$(pwd)/backup"
mkdir -p ${BACKUP_DIR}
# Create an instance of the container under testing
cid="$(docker run -e JENKINS_HOME=${JENKINS_HOME} -v ${JENKINS_HOME}:${JENKINS_HOME}:ro -e BACKUP_DIR=${BACKUP_DIR} -v ${BACKUP_DIR}:${BACKUP_DIR}:rw -d ${docker_image})"
cid="$(docker run -e BACKUP_CLEANUP_INTERVAL=1 -e JENKINS_HOME=${JENKINS_HOME} -v ${JENKINS_HOME}:${JENKINS_HOME}:ro -e BACKUP_DIR=${BACKUP_DIR} -v ${BACKUP_DIR}:${BACKUP_DIR}:rw -d ${docker_image})"
echo "Docker container ID '${cid}'"
# Remove test directory and container afterwards
@ -28,8 +30,10 @@ backup_number=1
docker exec ${cid} /home/user/bin/backup.sh ${backup_number}
[ "$(docker exec ${cid} ls /tmp | grep 'tmp')" ] && echo "tmp directory not empty" && exit 1;
# We should also check backup directory, since after #1000 we create temp directory at backup filesystem
[ "$(docker exec ${cid} ls ${BACKUP_DIR} | grep 'tmp')" ] && echo "backup dir consists temp directory" && exit 1;
backup_file="${BACKUP_DIR}/${backup_number}.tar.gz"
backup_file="${BACKUP_DIR}/${backup_number}.tar.zstd"
[[ ! -f ${backup_file} ]] && echo "Backup file ${backup_file} not found" && exit 1;
echo "tmp directory empty, backup in backup directory present"

View File

@ -1,6 +1,134 @@
apiVersion: v1
entries:
jenkins-operator:
- apiVersion: v2
appVersion: 0.9.0-beta1
created: "2025-04-06T21:25:18.36969916Z"
dependencies:
- condition: cert-manager.enabled
name: cert-manager
repository: https://charts.jetstack.io
version: 1.14.2
- condition: cert-manager.enabled
name: cert-manager-crds
repository: ""
version: 1.14.2
description: Kubernetes native operator which fully manages Jenkins on Kubernetes
digest: 78b0756202efbf6a05d5016a4358053a07c89c0f4a3f3f1fb447eaf7323df078
icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png
name: jenkins-operator
urls:
- https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.9.0-beta1.tgz
version: 0.9.0-beta1
- apiVersion: v2
appVersion: 0.8.1
created: "2024-07-05T15:26:01.708923805Z"
dependencies:
- condition: cert-manager.enabled
name: cert-manager
repository: https://charts.jetstack.io
version: 1.14.2
- condition: cert-manager.enabled
name: cert-manager-crds
repository: ""
version: 1.14.2
description: Kubernetes native operator which fully manages Jenkins on Kubernetes
digest: 82c061ff42bbf2dbcf942939ffbd5b63508c9d8490fc06672a474af1cad14a5d
icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png
name: jenkins-operator
urls:
- https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.8.1.tgz
version: 0.8.1
- apiVersion: v2
appVersion: 0.8.0
created: "2023-09-13T06:54:41.369295961Z"
dependencies:
- condition: webhook.enabled
name: cert-manager
repository: https://charts.jetstack.io
version: 1.5.1
description: Kubernetes native operator which fully manages Jenkins on Kubernetes
digest: da8ae04166cb1b64a9dd3d741c6a50d63846ebe8e2e92f09313ad3c6a0dd9ca4
icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png
name: jenkins-operator
urls:
- https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.8.0.tgz
version: 0.8.0
- apiVersion: v2
appVersion: 0.8.0-beta.2
created: "2023-06-30T21:22:53.308590035Z"
dependencies:
- condition: webhook.enabled
name: cert-manager
repository: https://charts.jetstack.io
version: 1.5.1
description: Kubernetes native operator which fully manages Jenkins on Kubernetes
digest: b2502f91dffa1136190a8a98d73ac997c70387e100d79200b7403039ca98411e
icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png
name: jenkins-operator
urls:
- https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.8.0-beta.2.tgz
version: 0.8.0-beta.2
- apiVersion: v2
appVersion: v0.8.0-beta
created: "2023-04-17T22:11:04.706959723Z"
dependencies:
- condition: webhook.enabled
name: cert-manager
repository: https://charts.jetstack.io
version: 1.5.1
description: Kubernetes native operator which fully manages Jenkins on Kubernetes
digest: 4855dc0c673a1b3b4cd7ee502029c3d995f243a9a7051ad03d29def7c48a7c11
icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png
name: jenkins-operator
urls:
- https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-v0.8.0-beta.tgz
version: v0.8.0-beta
- apiVersion: v2
appVersion: 0.7.1
created: "2022-06-22T15:47:45.014723169Z"
dependencies:
- condition: webhook.enabled
name: cert-manager
repository: https://charts.jetstack.io
version: 1.5.1
description: Kubernetes native operator which fully manages Jenkins on Kubernetes
digest: e4f72051328b0feae90f5445c58a8776941ffb900a5849de14780ec0e2ce6081
icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png
name: jenkins-operator
urls:
- https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.6.2.tgz
version: 0.6.2
- apiVersion: v2
appVersion: 0.7.1
created: "2022-06-22T11:26:06.518430865Z"
dependencies:
- condition: webhook.enabled
name: cert-manager
repository: https://charts.jetstack.io
version: 1.5.1
description: Kubernetes native operator which fully manages Jenkins on Kubernetes
digest: a52262394e66a1274cc9508f5013c4da13182317f12bf949a7c28e8916be3fb8
icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png
name: jenkins-operator
urls:
- https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.6.1.tgz
version: 0.6.1
- apiVersion: v2
appVersion: 0.7.0
created: "2021-12-08T14:21:18.243261+01:00"
dependencies:
- condition: webhook.enabled
name: cert-manager
repository: https://charts.jetstack.io
version: 1.5.1
description: Kubernetes native operator which fully manages Jenkins on Kubernetes
digest: 6b36f47d6647231bd21581bea6b23c3660acb11073ebde2cb47f9a700101c462
icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png
name: jenkins-operator
urls:
- https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.6.0.tgz
version: 0.6.0
- apiVersion: v2
appVersion: 0.6.0
created: "2021-08-11T15:40:10.659538+02:00"
@ -288,4 +416,4 @@ entries:
urls:
- https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.0.1.tgz
version: 0.0.1
generated: "2021-08-11T15:40:10.654972+02:00"
generated: "2025-04-06T21:25:18.363088324Z"

View File

@ -20,3 +20,7 @@
.idea/
*.tmproj
.vscode/
# Ignore packaged charts
jenkins-operator-*.tgz

View File

@ -1,6 +1,6 @@
dependencies:
- name: cert-manager
repository: https://charts.jetstack.io
version: v1.5.1
digest: sha256:3220f5584bd04a8c8d4b2a076d49cc046211a463bb9a12ebbbae752be9b70bb1
generated: "2021-08-18T01:07:49.505353718+05:30"
version: v1.14.2
digest: sha256:5f6f7c115d7b96e8c8e85515e087a9379473fd3d5262198a9e25c1a84d4ff9bd
generated: "2024-02-15T23:08:28.352007672+01:00"

View File

@ -1,11 +1,14 @@
apiVersion: v2
appVersion: "0.6.0"
appVersion: "0.9.0-beta1"
description: Kubernetes native operator which fully manages Jenkins on Kubernetes
name: jenkins-operator
version: 0.5.3
version: 0.9.0-beta1
icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png
dependencies:
- name: cert-manager
version: "1.5.1"
condition: webhook.enabled
version: "1.14.2"
condition: cert-manager.enabled
repository: https://charts.jetstack.io
- name: cert-manager-crds
version: "1.14.2"
condition: cert-manager.enabled

View File

@ -0,0 +1,117 @@
# jenkins-operator
![Version: 0.8.1](https://img.shields.io/badge/Version-0.8.1-informational?style=flat-square) ![AppVersion: 0.8.1](https://img.shields.io/badge/AppVersion-0.8.1-informational?style=flat-square)
Kubernetes native operator which fully manages Jenkins on Kubernetes
## Requirements
| Repository | Name | Version |
|------------|------|---------|
| | cert-manager-crds | 1.14.2 |
| https://charts.jetstack.io | cert-manager | 1.14.2 |
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| cert-manager.enabled | bool | `false` | |
| cert-manager.startupapicheck.enabled | bool | `false` | |
| jenkins.annotations | object | `{}` | |
| jenkins.apiVersion | string | `"jenkins.io/v1alpha2"` | |
| jenkins.authorizationStrategy | string | `"createUser"` | |
| jenkins.backup.backupCommand[0] | string | `"/home/user/bin/backup.sh"` | |
| jenkins.backup.containerName | string | `"backup"` | |
| jenkins.backup.enabled | bool | `true` | |
| jenkins.backup.env[0].name | string | `"BACKUP_DIR"` | |
| jenkins.backup.env[0].value | string | `"/backup"` | |
| jenkins.backup.env[1].name | string | `"JENKINS_HOME"` | |
| jenkins.backup.env[1].value | string | `"/jenkins-home"` | |
| jenkins.backup.env[2].name | string | `"BACKUP_COUNT"` | |
| jenkins.backup.env[2].value | string | `"3"` | |
| jenkins.backup.getLatestAction[0] | string | `"/home/user/bin/get-latest.sh"` | |
| jenkins.backup.image | string | `"quay.io/jenkins-kubernetes-operator/backup-pvc:v0.4.3"` | |
| jenkins.backup.interval | int | `30` | |
| jenkins.backup.makeBackupBeforePodDeletion | bool | `true` | |
| jenkins.backup.pvc.className | string | `""` | |
| jenkins.backup.pvc.enabled | bool | `true` | |
| jenkins.backup.pvc.size | string | `"5Gi"` | |
| jenkins.backup.resources.limits.cpu | string | `"1000m"` | |
| jenkins.backup.resources.limits.memory | string | `"2Gi"` | |
| jenkins.backup.resources.requests.cpu | string | `"100m"` | |
| jenkins.backup.resources.requests.memory | string | `"500Mi"` | |
| jenkins.backup.restoreCommand[0] | string | `"/home/user/bin/restore.sh"` | |
| jenkins.backup.volumeMounts[0].mountPath | string | `"/jenkins-home"` | |
| jenkins.backup.volumeMounts[0].name | string | `"jenkins-home"` | |
| jenkins.backup.volumeMounts[1].mountPath | string | `"/backup"` | |
| jenkins.backup.volumeMounts[1].name | string | `"backup"` | |
| jenkins.basePlugins | list | `[]` | |
| jenkins.configuration.configurationAsCode | list | `[]` | |
| jenkins.configuration.groovyScripts | list | `[]` | |
| jenkins.configuration.secretData | object | `{}` | |
| jenkins.configuration.secretRefName | string | `""` | |
| jenkins.disableCSRFProtection | bool | `false` | |
| jenkins.enabled | bool | `true` | |
| jenkins.env | list | `[]` | |
| jenkins.hostAliases | object | `{}` | |
| jenkins.image | string | `"jenkins/jenkins:2.492.3-lts"` | |
| jenkins.imagePullPolicy | string | `"Always"` | |
| jenkins.imagePullSecrets | list | `[]` | |
| jenkins.labels | object | `{}` | |
| jenkins.latestPlugins | bool | `true` | |
| jenkins.lifecycle | object | `{}` | |
| jenkins.livenessProbe.failureThreshold | int | `20` | |
| jenkins.livenessProbe.httpGet.path | string | `"/login"` | |
| jenkins.livenessProbe.httpGet.port | string | `"http"` | |
| jenkins.livenessProbe.httpGet.scheme | string | `"HTTP"` | |
| jenkins.livenessProbe.initialDelaySeconds | int | `100` | |
| jenkins.livenessProbe.periodSeconds | int | `10` | |
| jenkins.livenessProbe.successThreshold | int | `1` | |
| jenkins.livenessProbe.timeoutSeconds | int | `8` | |
| jenkins.name | string | `"jenkins"` | |
| jenkins.namespace | string | `"default"` | |
| jenkins.nodeSelector | object | `{}` | |
| jenkins.notifications | list | `[]` | |
| jenkins.plugins | list | `[]` | |
| jenkins.priorityClassName | string | `""` | |
| jenkins.readinessProbe.failureThreshold | int | `60` | |
| jenkins.readinessProbe.httpGet.path | string | `"/login"` | |
| jenkins.readinessProbe.httpGet.port | string | `"http"` | |
| jenkins.readinessProbe.httpGet.scheme | string | `"HTTP"` | |
| jenkins.readinessProbe.initialDelaySeconds | int | `120` | |
| jenkins.readinessProbe.periodSeconds | int | `10` | |
| jenkins.readinessProbe.successThreshold | int | `1` | |
| jenkins.readinessProbe.timeoutSeconds | int | `8` | |
| jenkins.resources.limits.cpu | string | `"1000m"` | |
| jenkins.resources.limits.memory | string | `"3Gi"` | |
| jenkins.resources.requests.cpu | string | `"250m"` | |
| jenkins.resources.requests.memory | string | `"500Mi"` | |
| jenkins.securityContext.fsGroup | int | `1000` | |
| jenkins.securityContext.runAsUser | int | `1000` | |
| jenkins.seedJobAgentImage | string | `""` | |
| jenkins.seedJobs | list | `[]` | |
| jenkins.serviceAccount.annotations | object | `{}` | |
| jenkins.skipPlugins | bool | `false` | |
| jenkins.terminationGracePeriodSeconds | int | `30` | |
| jenkins.tolerations | list | `[]` | |
| jenkins.validateSecurityWarnings | bool | `false` | |
| jenkins.volumeMounts | list | `[]` | |
| jenkins.volumes[0].name | string | `"backup"` | |
| jenkins.volumes[0].persistentVolumeClaim.claimName | string | `"jenkins-backup"` | |
| operator.affinity | object | `{}` | |
| operator.fullnameOverride | string | `""` | |
| operator.image | string | `"quay.io/jenkins-kubernetes-operator/operator:v0.9.0-beta1"` | |
| operator.imagePullPolicy | string | `"IfNotPresent"` | |
| operator.imagePullSecrets | list | `[]` | |
| operator.nameOverride | string | `""` | |
| operator.nodeSelector | object | `{}` | |
| operator.replicaCount | int | `1` | |
| operator.resources | object | `{}` | |
| operator.tolerations | list | `[]` | |
| webhook.certificate.duration | string | `"2160h"` | |
| webhook.certificate.name | string | `"webhook-certificate"` | |
| webhook.certificate.renewbefore | string | `"360h"` | |
| webhook.enabled | bool | `false` | |
----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)

View File

@ -0,0 +1,3 @@
apiVersion: v2
name: cert-manager-crds
version: "1.14.2"

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -157,11 +157,11 @@ spec:
type: object
basePlugins:
description: 'BasePlugins contains plugins required by operator
Defaults to : - name: kubernetes version: "1.29.6" - name: workflow-job
version: "2.41" - name: workflow-aggregator version: "2.6" -
name: git version: "4.7.2" - name: job-dsl version: "1.77" -
name: configuration-as-code version: "1.51" - name: kubernetes-credentials-provider
version: "0.18-1"'
Defaults to : - name: configuration-as-code version: "1625.v27444588cc3d"
- name: git version: "5.0.0" - name: job-dsl version: "1.83"
- name: kubernetes version: "3909.v1f2c633e8590" - name: kubernetes-credentials-provider
version: "1.211.vc236a_f5a_2f3c" - name: workflow-aggregator
version: "596.v8c21c963d92d" - name: workflow-job version: "1289.vd1c337fd5354"'
items:
description: Plugin defines Jenkins plugin.
properties:
@ -1145,6 +1145,10 @@ spec:
selectors of replication controllers and services. More info:
http://kubernetes.io/docs/user-guide/labels'
type: object
latestPlugins:
description: 'Allow to override jenkins-plugin-cli default behavior
while downloading the plugin and dependencies see: https://github.com/jenkinsci/plugin-installation-manager-tool#cli-options'
type: boolean
nodeSelector:
additionalProperties:
type: string
@ -1326,6 +1330,15 @@ spec:
type: string
type: object
type: object
skipPlugins:
description: 'Allow to skip installation of both BasePlugins and
Plugins. Requires using a custom image which includes the
BasePlugins. Defaults to false.'
type: boolean
terminationGracePeriodSeconds:
description: 'Optional duration in seconds the pod needs to terminate gracefully.'
type: integer
default: 30
tolerations:
description: If specified, the pod's tolerations.
items:
@ -3118,6 +3131,11 @@ spec:
- name
type: object
type: array
seedJobAgentImage:
description: SeedJobAgentImage defines the image that will be used
by the seed job agent. If not defined jenkins/inbound-agent:4.9-1
will be used.
type: string
seedJobs:
description: 'SeedJobs defines list of Jenkins Seed Job configurations
More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines'

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -85,10 +85,19 @@ spec:
{{- with .Values.jenkins.notifications }}
notifications: {{ toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.jenkins.serviceAccount }}
serviceAccount: {{ toYaml . | nindent 4 }}
{{- end }}
master:
{{- with .Values.jenkins.labels }}
labels: {{ toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.jenkins.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.jenkins.tolerations }}
tolerations: {{ toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.jenkins.annotations }}
annotations: {{ toYaml . | nindent 6 }}
{{- end }}
@ -98,10 +107,18 @@ spec:
{{- with .Values.jenkins.plugins }}
plugins: {{ toYaml . | nindent 4 }}
{{- end }}
latestPlugins: {{ .Values.jenkins.latestPlugins }}
{{- if .Values.jenkins.priorityClassName }}
priorityClassName: {{- .Values.jenkins.priorityClassName }}
priorityClassName: {{ .Values.jenkins.priorityClassName }}
{{- end }}
disableCSRFProtection: {{ .Values.jenkins.disableCSRFProtection }}
{{- with .Values.jenkins.hostAliases }}
hostAliases: {{ toYaml . | nindent 4 }}
{{- end }}
skipPlugins: {{ .Values.jenkins.skipPlugins }}
{{- if .Values.jenkins.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.jenkins.terminationGracePeriodSeconds }}
{{- end }}
containers:
- name: jenkins-master
image: {{ .Values.jenkins.image }}
@ -118,13 +135,16 @@ spec:
{{- with .Values.jenkins.env }}
env: {{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.jenkins.lifecycle}}
lifecycle: {{ toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.jenkins.volumeMounts }}
volumeMounts: {{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.jenkins.backup.enabled }}
- name: {{ .Values.jenkins.backup.containerName }}
image: {{ .Values.jenkins.backup.image }}
imagePullPolicy: IfNotPresent
imagePullPolicy: {{ .Values.jenkins.imagePullPolicy }}
{{- with .Values.jenkins.backup.resources }}
resources: {{ toYaml . | nindent 10 }}
{{- end }}
@ -149,4 +169,7 @@ spec:
{{- with .Values.jenkins.seedJobs }}
seedJobs: {{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.jenkins.seedJobAgentImage }}
seedJobAgentImage: {{ .Values.jenkins.seedJobAgentImage }}
{{- end }}
{{- end }}

View File

@ -41,9 +41,29 @@ spec:
name: webhook-certs
readOnly: true
{{- end }}
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
env:
- name: WATCH_NAMESPACE
{{- if .Values.jenkins.enabled }}
value: {{ .Values.jenkins.namespace }}
{{- else if .Values.operator.watchNamespace }}
value: {{ .Values.operator.watchNamespace }}
{{- else }}
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- end }}
- name: POD_NAME
valueFrom:
fieldRef:

View File

@ -24,13 +24,19 @@ jenkins:
# labels are injected into metadata labels field
labels: {}
# nodeSelector are injected into metadata nodeSelector field
nodeSelector: {}
# tolerations are injected into metadata tolerations field
tolerations: []
# annotations are injected into metadata annotations field
annotations: {}
# image is the name (and tag) of the Jenkins instance
# Default: jenkins/jenkins:lts
# It's recommended to use LTS (tag: "lts") version
image: jenkins/jenkins:2.303.2-lts-alpine
image: jenkins/jenkins:2.528.1-lts
# env contains jenkins container environment variables
env: []
@ -38,6 +44,9 @@ jenkins:
# imagePullPolicy defines policy for pulling images
imagePullPolicy: Always
# lifecycle is used if you want to specify lifecycle hooks for the master container
lifecycle: {}
# priorityClassName indicates the importance of a Pod relative to other Pods
# See: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
priorityClassName: ""
@ -47,6 +56,21 @@ jenkins:
# See https://github.com/jenkinsci/kubernetes-operator/pull/193 for more info
disableCSRFProtection: false
# adding entries to a pod's /etc/hosts file provides pod-level override of hostname
# resolution when DNS and other options are not applicable.
hostAliases: {}
# - ip: "127.0.0.1"
# hostnames:
# - "foo.local"
# - "bar.local"
# - ip: "10.1.2.3"
# hostnames:
# - "foo.remote"
# - "bar.remote"
# Optional duration in seconds the pod needs to terminate gracefully.
# Default 30sec
terminationGracePeriodSeconds: 30
# validateSecurityWarnings enables or disables validating potential security warnings in Jenkins plugins via admission webhooks.
validateSecurityWarnings: false
@ -55,10 +79,15 @@ jenkins:
# See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#pulling-docker-images-from-private-repositories for more info
imagePullSecrets: []
# notifications is feature that notify user about Jenkins reconcilation status
# notifications is feature that notify user about Jenkins reconciliation status
# See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/notifications/ for more info
notifications: []
# Enables customization of the Service Account attached to the master Jenkins instance via annotations
# https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.ServiceAccount
serviceAccount:
annotations: {}
# basePlugins are plugins installed and required by the operator
# Shouldn't contain plugins defined by user
# You can change their versions here
@ -68,19 +97,20 @@ jenkins:
#
# basePlugins:
# - name: kubernetes
# version: 1.29.6
# version: 4246.v5a_12b_1fe120e
# - name: workflow-job
# version: "2.41"
# version: 1400.v7fd111b_ec82f
# - name: workflow-aggregator
# version: "2.6"
# version: 596.v8c21c963d92d
# - name: git
# version: 4.7.2
# version: 5.2.2
# - name: job-dsl
# version: "1.77"
# version: "1.87"
# - name: configuration-as-code
# version: "1.51"
# version: 1810.v9b_c30a_249a_4c
# - name: kubernetes-credentials-provider
# version: 0.18-1
# version: 1.262.v2670ef7ea_0c5
basePlugins: []
# plugins are plugins required by the user
@ -94,6 +124,12 @@ jenkins:
# version: "0.6"
plugins: []
# latestPlugins: Allow to override jenkins-plugin-cli default behavior
# while downloading the plugin and dependencies
# see: https://github.com/jenkinsci/plugin-installation-manager-tool#cli-options
# default to true
latestPlugins: true
# seedJobs is placeholder for jenkins seed jobs
# For seed job creation tutorial, check https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/
# Example:
@ -106,6 +142,14 @@ jenkins:
# repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
seedJobs: []
# SeedJobAgentImage defines the image that will be used by the seed job agent. If not defined jenkins/inbound-agent:3248.v65ecb_254c298-6 will be used.
seedJobAgentImage: ""
# skipPlugins allows to skip installation of both BasePlugins and Plugins.
# Requires using a custom image which includes the BasePlugins.
# Defaults to false.
skipPlugins: false
# Resource limit/request for Jenkins
# See https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ for details
resources:
@ -113,7 +157,7 @@ jenkins:
cpu: 1000m
memory: 3Gi
requests:
cpu: 1
cpu: 250m
memory: 500Mi
# volumes used by Jenkins
@ -177,8 +221,8 @@ jenkins:
enabled: true
# image used by backup feature
# By default using prebuilt backup PVC image by VirtusLab
image: virtuslab/jenkins-operator-backup-pvc:v0.1.0
# By default using prebuilt backup PVC image
image: quay.io/jenkins-kubernetes-operator/backup-pvc:v0.4.3
# containerName is backup container name
containerName: backup
@ -226,6 +270,11 @@ jenkins:
# BACKUP_DIR - path for storing backup files (default: "/backup")
# JENKINS_HOME - path to jenkins home (default: "/jenkins-home")
# BACKUP_COUNT - define how much recent backups will be kept
# Optional in case you want to modify the backup and restore retry logic
# BACKUP_RETRY_COUNT
# BACKUP_RETRY_INTERVAL
# RESTORE_RETRY_COUNT
# RESTORE_RETRY_INTERVAL
env:
- name: BACKUP_DIR
value: /backup
@ -233,6 +282,15 @@ jenkins:
value: /jenkins-home
- name: BACKUP_COUNT
value: "3" # keep only the 3 most recent backups
#- name: BACKUP_RETRY_COUNT
# value: "3"
#- name: BACKUP_RETRY_INTERVAL
# value: "60"
#- name: RESTORE_RETRY_COUNT
# value: "10"
#- name: RESTORE_RETRY_INTERVAL
# value: "10"
# volumeMounts holds the mount points for volumes
volumeMounts:
@ -244,10 +302,10 @@ jenkins:
# configuration is section where we can configure Jenkins instance
# See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/ for details
configuration:
configurationAsCode: {}
configurationAsCode: []
# - configMapName: jenkins-casc
# content: {}
groovyScripts: {}
groovyScripts: []
# - configMapName: jenkins-gs
# content: {}
@ -262,7 +320,7 @@ operator:
replicaCount: 1
# image is the name (and tag) of the Jenkins Operator image
image: virtuslab/jenkins-operator:v0.6.0
image: quay.io/jenkins-kubernetes-operator/operator:v0.9.0-beta1
# imagePullPolicy defines policy for pulling images
imagePullPolicy: IfNotPresent
@ -276,6 +334,10 @@ operator:
# fullnameOverride overrides the deployment name
fullnameOverride: ""
# Select a different namespace to look for the Jenkins CR and deploy Jenkins in. Defaults to the same namespace as
# the operator.
# watchNamespace: "jenkins-namespace"
resources: {}
nodeSelector: {}
tolerations: []
@ -294,8 +356,11 @@ webhook:
# enable or disable the validation webhook
enabled: false
cert-manager:
# cert-manager is required to generate certificates for webhook. If you don't have cert-manager installed in your cluster,
# you can install it as a subordinate chart
enabled: false
# This startupapicheck is a Helm post-install hook that waits for the webhook
# endpoints to become available.
cert-manager:
startupapicheck:
enabled: false

View File

@ -23,7 +23,7 @@ import (
r "runtime"
"github.com/jenkinsci/kubernetes-operator/api/v1alpha2"
"github.com/jenkinsci/kubernetes-operator/controllers"
controllers "github.com/jenkinsci/kubernetes-operator/internal/controller"
"github.com/jenkinsci/kubernetes-operator/pkg/client"
"github.com/jenkinsci/kubernetes-operator/pkg/configuration/base/resources"
"github.com/jenkinsci/kubernetes-operator/pkg/constants"
@ -40,7 +40,10 @@ import (
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/kubernetes"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"
// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
// to ensure that exec-entrypoint and run can make use of them.
@ -126,14 +129,23 @@ func main() {
fatal(errors.Wrap(err, "failed to get config"), *debug)
}
cacheNamespace := map[string]cache.Config{}
cacheNamespace[namespace] = cache.Config{}
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
// MetricsBindAddress: fmt.Sprintf("%s:%d", metricsHost, metricsPort),
Metrics: server.Options{
BindAddress: fmt.Sprintf("%s:%d", metricsHost, metricsPort),
},
Scheme: scheme,
MetricsBindAddress: fmt.Sprintf("%s:%d", metricsHost, metricsPort),
// Port: 9443,
WebhookServer: webhook.NewServer(webhook.Options{
Port: 9443,
}),
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: "c674355f.jenkins.io",
Namespace: namespace,
// Namespace: namespace,
Cache: cache.Options{DefaultNamespaces: cacheNamespace},
})
if err != nil {
fatal(errors.Wrap(err, "unable to start manager"), *debug)

View File

@ -1,15 +1,16 @@
# Setup variables for the Makefile
NAME=kubernetes-operator
OPERATOR_SDK_VERSION=1.3.0
GO_VERSION=1.15.6
PKG=github.com/jenkinsci/kubernetes-operator
DOCKER_ORGANIZATION=virtuslab
DOCKER_REGISTRY=jenkins-operator
NAMESPACE=default
API_VERSION=v1alpha2
API_VERSION_NEXT=v1alpha3
ALL_IN_ONE_DEPLOY_FILE_PREFIX=all-in-one
GEN_CRD_API=gen-crd-api-reference-docs
IMAGE_PULL_MODE=local
HELM_VERSION=3.1.2
CLUSTER_DOMAIN=cluster.local
ALL_IN_ONE_DEPLOY_FILE_PREFIX="all-in-one"
API_VERSION_NEXT="v1alpha3"
API_VERSION="v1alpha2"
CLUSTER_DOMAIN="cluster.local"
GEN_CRD_API="gen-crd-api-reference-docs"
GO_VERSION="1.22"
HELM_VERSION="3.12.3"
IMAGE_PULL_MODE="local"
KIND_CLUSTER_NAME="jenkins"
LATEST_LTS_VERSION="2.528.1"
NAME="kubernetes-operator"
NAMESPACE="default"
OPERATOR_SDK_VERSION="1.35.0"
PKG="github.com/jenkinsci/kubernetes-operator"
QUAY_ORGANIZATION="jenkins-kubernetes-operator"
QUAY_REGISTRY="operator"

View File

@ -1,7 +0,0 @@
KUBERNETES_PROVIDER=crc
JENKINS_API_HOSTNAME_COMMAND=crc ip
JENKINS_API_PORT=0
JENKINS_API_USE_NODEPORT=true
CRC_OC_PROJECT=default

5
config.kind.env Normal file
View File

@ -0,0 +1,5 @@
JENKINS_API_HOSTNAME_COMMAND=echo localhost
JENKINS_API_PORT=0
JENKINS_API_USE_NODEPORT=true
KUBERNETES_PROVIDER=kind
KUBECTL_CONTEXT=kind-jenkins

View File

@ -1,10 +0,0 @@
KUBERNETES_PROVIDER=minikube
MINIKUBE_KUBERNETES_VERSION=v1.21.1
MINIKUBE_DRIVER=virtualbox
MINIKUBE_VERSION=1.21.0
KUBECTL_CONTEXT=minikube
JENKINS_API_HOSTNAME_COMMAND=bin/minikube ip
JENKINS_API_PORT=0
JENKINS_API_USE_NODEPORT=true

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,9 @@ patchesStrategicMerge:
# Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line.
- manager_auth_proxy_patch.yaml
# Mount the controller config file for loading manager configurations
# through a ComponentConfig type
- manager_config_patch.yaml
# Mount the controller config file for loading manager configurations
# through a ComponentConfig type

View File

@ -10,15 +10,23 @@ spec:
spec:
containers:
- name: kube-rbac-proxy
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1
args:
- "--secure-listen-address=0.0.0.0:8443"
- "--upstream=http://127.0.0.1:8080/"
- "--logtostderr=true"
- "--v=10"
- "--v=0"
ports:
- containerPort: 8443
protocol: TCP
name: https
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
- name: manager
args:
- "--health-probe-bind-address=:8081"

View File

@ -14,6 +14,8 @@ spec:
metadata:
labels:
control-plane: controller-manager
annotations:
kubectl.kubernetes.io/default-container: manager
spec:
serviceAccountName: jenkins-operator
securityContext:
@ -23,7 +25,7 @@ spec:
- /manager
args:
- --leader-elect
image: virtuslab/jenkins-operator:v0.7.0
image: quay.io/jenkins-kubernetes-operator/operator:v0.8.0
name: jenkins-operator
imagePullPolicy: IfNotPresent
securityContext:
@ -42,8 +44,8 @@ spec:
periodSeconds: 10
resources:
limits:
cpu: 100m
memory: 30Mi
cpu: 200m
memory: 100Mi
requests:
cpu: 100m
memory: 20Mi
@ -52,4 +54,5 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
serviceAccountName: controller-manager
terminationGracePeriodSeconds: 10

View File

@ -1,4 +1,3 @@
# Prometheus Monitor Service (Metrics)
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
@ -11,6 +10,10 @@ spec:
endpoints:
- path: /metrics
port: https
scheme: https
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
tlsConfig:
insecureSkipVerify: true
selector:
matchLabels:
control-plane: controller-manager

View File

@ -8,5 +8,5 @@ roleRef:
name: proxy-role
subjects:
- kind: ServiceAccount
name: default
name: controller-manager
namespace: default

View File

@ -9,6 +9,7 @@ spec:
ports:
- name: https
port: 8443
protocol: TCP
targetPort: https
selector:
control-plane: controller-manager

View File

@ -10,3 +10,4 @@ resources:
- auth_proxy_role.yaml
- auth_proxy_role_binding.yaml
- auth_proxy_client_clusterrole.yaml
- service_account.yaml

View File

@ -7,9 +7,19 @@ metadata:
rules:
- apiGroups:
- ""
- coordination.k8s.io
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get

View File

@ -1,9 +1,8 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
kind: ClusterRole
metadata:
name: jenkins-operator
name: manager-role
rules:
- apiGroups:
- apps

View File

@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: controller-manager
namespace: system

View File

@ -1,14 +1,11 @@
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
creationTimestamp: null
name: validating-webhook-configuration
webhooks:
- admissionReviewVersions:
- v1
- v1beta1
clientConfig:
service:
name: webhook-service

View File

@ -7,6 +7,7 @@ metadata:
spec:
ports:
- port: 443
protocol: TCP
targetPort: 9443
selector:
control-plane: controller-manager

View File

@ -32,21 +32,8 @@ rules:
- create
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: leader-election-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: leader-election-role
subjects:
- kind: ServiceAccount
name: jenkins-operator
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: jenkins-operator
rules:
@ -156,24 +143,6 @@ rules:
- get
- list
- watch
- apiGroups:
- jenkins.io
resources:
- '*'
verbs:
- '*'
- apiGroups:
- jenkins.io
resources:
- jenkins
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- jenkins.io
resources:
@ -188,6 +157,12 @@ rules:
- get
- patch
- update
- apiGroups:
- jenkins.io
resources:
- '*'
verbs:
- '*'
- apiGroups:
- rbac.authorization.k8s.io
resources:
@ -200,7 +175,7 @@ rules:
- update
- watch
- apiGroups:
- route.openshift.io
- "route.openshift.io"
resources:
- routes
verbs:
@ -209,48 +184,78 @@ rules:
- list
- update
- watch
- apiGroups:
- "image.openshift.io"
resources:
- imagestreams
verbs:
- get
- list
- watch
- apiGroups:
- "build.openshift.io"
resources:
- builds
- buildconfigs
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: manager-rolebinding
name: leader-election-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: leader-election-role
subjects:
- kind: ServiceAccount
name: jenkins-operator
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: jenkins-operator
subjects:
- kind: ServiceAccount
name: jenkins-operator
roleRef:
kind: Role
name: jenkins-operator
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: jenkins-operator
labels:
control-plane: controller-manager
app.kubernetes.io/name: jenkins-operator
helm.sh/chart: jenkins-operator-0.9.0-beta1
app.kubernetes.io/version: "0.9.0-beta1"
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
replicas: 1
app.kubernetes.io/name: jenkins-operator
template:
metadata:
labels:
control-plane: controller-manager
app.kubernetes.io/name: jenkins-operator
spec:
serviceAccountName: jenkins-operator
securityContext:
runAsUser: 65532
containers:
- command:
- name: jenkins-operator
image: quay.io/jenkins-kubernetes-operator/operator:v0.9.0-beta1
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
protocol: TCP
command:
- /manager
args:
- --leader-elect
image: virtuslab/jenkins-operator:v0.7.0
name: jenkins-operator
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
livenessProbe:
httpGet:
path: /healthz
@ -263,16 +268,21 @@ spec:
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: 100m
memory: 30Mi
requests:
cpu: 100m
memory: 20Mi
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
terminationGracePeriodSeconds: 10
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "jenkins-operator"
resources:
limits:
cpu: 100m
memory: 120Mi
requests:
cpu: 100m
memory: 120Mi

File diff suppressed because it is too large Load Diff

View File

@ -1,120 +0,0 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.62.2" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>404 Page not found | Jenkins Operator</title><meta property="og:title" content="404 Page not found" />
<meta property="og:description" content="A native operator for Kubernetes to manage Jenkins" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/404.html" />
<meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="404 Page not found">
<meta itemprop="description" content="A native operator for Kubernetes to manage Jenkins"><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="404 Page not found"/>
<meta name="twitter:description" content="A native operator for Kubernetes to manage Jenkins"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.6c58fba96b88d035ce071c346f084a9dc4dedee4e80eb3724fe530520541a4ec.css" as="style">
<link href="/kubernetes-operator/scss/main.min.6c58fba96b88d035ce071c346f084a9dc4dedee4e80eb3724fe530520541a4ec.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
</head>
<body class="td-404">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-default td-outer">
<main role="main" class="td-main">
<main id="main">
<div>
<h1 id="title">Not found</h1>
<p>Oops! This page doesn't exist. Try going back to our <a href="/kubernetes-operator/">home page</a>.</p>
<p>You can learn how to make a 404 page like this in <a href="https://gohugo.io/templates/404/">Custom 404 Pages</a>.</p>
</div>
</main>
</main>
<footer class="bg-dark py-5 row d-print-none">
<div class="bg-dark container-fluid trademark-bigger">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-12 text-center py-4 order-sm-2">
<small class="text-white">&copy; 2021 Jenkins Operator is created by VirtusLab. Source is available under Apache License Version 2 and website content under Creative Commons Attribution-ShareAlike 4.0.</small><br>
<small class="text-white">Jenkins® is a registered trademark of Software in the Public Interest, Inc.</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.b0e99aac17991fa76812dd47914049168ac469a1faa0939560f0b370565becab.js" integrity="sha256-sOmarBeZH6doEt1HkUBJForEaaH6oJOVYPCzcFZb7Ks="></script>
</body>
</html>

View File

@ -1,166 +0,0 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.62.2" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="alternate" type="application/rss&#43;xml" href="https://jenkinsci.github.io/kubernetes-operator/about/index.xml">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>What&#39;s the Jenkins Operator? | Jenkins Operator</title><meta property="og:title" content="What&#39;s the Jenkins Operator?" />
<meta property="og:description" content="A native operator for Kubernetes to manage Jenkins" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/about/" />
<meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="What&#39;s the Jenkins Operator?">
<meta itemprop="description" content="A native operator for Kubernetes to manage Jenkins"><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="What&#39;s the Jenkins Operator?"/>
<meta name="twitter:description" content="A native operator for Kubernetes to manage Jenkins"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.6c58fba96b88d035ce071c346f084a9dc4dedee4e80eb3724fe530520541a4ec.css" as="style">
<link href="/kubernetes-operator/scss/main.min.6c58fba96b88d035ce071c346f084a9dc4dedee4e80eb3724fe530520541a4ec.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
</head>
<body class="td-section">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-default td-outer">
<main role="main" class="td-main">
<a id="td-block-0" class="td-offset-anchor"></a>
<section class="row td-box td-box--primary position-relative td-box--gradient td-box--height-auto">
<div class="container text-center td-arrow-down">
<span class="h4 mb-0">
<div style="font-size: 110%;" class="col-12">
Jenkins Operator is a Kubernetes native operator which fully manages Jenkins on Kubernetes. <br />It was built with immutability and declarative configuration as code in mind.
</div>
</span>
</div>
</section>
<a id="td-block-1" class="td-offset-anchor"></a>
<section class="row td-box td-box--1 td-box--gradient td-box--height-auto">
<div class="col">
<div class="row ">
<div class="col-md-1 order-md-1 hidden-xs hidden-sm hidden-md"></div>
<div class="col-md-3 col-lg-1 order-xs-first order-sm-first order-md-last text-center ">
<img src="/kubernetes-operator/img/logo.svg" style="height: 75%; margin-left: -75%; margin-top: 50%;" alt="Logo"/>
</div>
<div class="col-md-4 col-lg-8 order-xs-2 order-sm-2 order-md-2">
<h1>The main reason why we decided to develop the <b>Jenkins Operator</b> is the fact that we faced a lot of problems with standard Jenkins deployment. We want to make Jenkins more robust, suitable for dynamic and multi-tenant environments.</h1>
<p class="lead mt-2">
<br />
Some of the problems we want to solve:
<ul>
<li>Installing plugins with incompatible versions or security vulnerabilities</li>
<li>Better configuration as code</li>
<li>Lack of end to end tests</li>
<li>Handling graceful shutdown properly</li>
<li>Security and hardening out of the box</li>
<li>Orphaned jobs with no jnlp connection</li>
<li>Making errors more visible for end users</li>
</ul>
</p>
</div>
</div>
</div>
</section>
</main>
<footer class="bg-dark py-5 row d-print-none">
<div class="bg-dark container-fluid trademark-bigger">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-12 text-center py-4 order-sm-2">
<small class="text-white">&copy; 2021 Jenkins Operator is created by VirtusLab. Source is available under Apache License Version 2 and website content under Creative Commons Attribution-ShareAlike 4.0.</small><br>
<small class="text-white">Jenkins® is a registered trademark of Software in the Public Interest, Inc.</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.b0e99aac17991fa76812dd47914049168ac469a1faa0939560f0b370565becab.js" integrity="sha256-sOmarBeZH6doEt1HkUBJForEaaH6oJOVYPCzcFZb7Ks="></script>
</body>
</html>

View File

@ -1,22 +0,0 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Jenkins Operator What&#39;s the Jenkins Operator?</title>
<link>https://jenkinsci.github.io/kubernetes-operator/about/</link>
<description>Recent Hugo news from gohugo.io</description>
<generator>Hugo -- gohugo.io</generator>
<image>
<url>https://jenkinsci.github.io/kubernetes-operator/img/hugo.png</url>
<title>GoHugo.io</title>
<link>https://jenkinsci.github.io/kubernetes-operator/about/</link>
</image>
<atom:link href="https://jenkinsci.github.io/kubernetes-operator/about/index.xml" rel="self" type="application/rss+xml" />
</channel>
</rss>

View File

@ -1,684 +0,0 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.62.2" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Another Great Release | Jenkins Operator</title><meta property="og:title" content="Another Great Release" />
<meta property="og:description" content="A short lead description about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/blog/2018/01/04/another-great-release/" />
<meta property="article:published_time" content="2018-01-04T00:00:00+00:00" />
<meta property="article:modified_time" content="2018-01-04T00:00:00+00:00" /><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Another Great Release">
<meta itemprop="description" content="A short lead description about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
">
<meta itemprop="datePublished" content="2018-01-04T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2018-01-04T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="1233">
<meta itemprop="keywords" content="" /><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Another Great Release"/>
<meta name="twitter:description" content="A short lead description about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.6c58fba96b88d035ce071c346f084a9dc4dedee4e80eb3724fe530520541a4ec.css" as="style">
<link href="/kubernetes-operator/scss/main.min.6c58fba96b88d035ce071c346f084a9dc4dedee4e80eb3724fe530520541a4ec.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Another Great Release | Jenkins Operator</title>
</head>
<body class="td-page td-blog">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/blog/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Blog</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-blog">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/blog/news/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">News</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-blog-news">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-blog-2018-10-06-easy-documentation-with-docsy" href="/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/">Announcing Docsy</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-blog-2018-10-06-the-second-blog-post" href="/kubernetes-operator/blog/2018/10/06/the-second-blog-post/">Second blog post</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/blog/releases/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">Releases</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-blog-releases">
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-blog-2018-01-04-another-great-release" href="/kubernetes-operator/blog/2018/01/04/another-great-release/">Release New Features</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/website/content/en/blog/releases/in-depth-monoliths-detailed-spec.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?labels=documentation&amp;template=documentation.md&amp;title=Another%20Great%20Release" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new/choose" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#first-header">First Header</a></li>
<li><a href="#header-2">Header 2</a>
<ul>
<li><a href="#header-3">Header 3</a>
<ul>
<li><a href="#header-4">Header 4</a>
<ul>
<li><a href="#header-5">Header 5</a>
<ul>
<li><a href="#header-6">Header 6</a></li>
</ul></li>
</ul></li>
</ul></li>
</ul></li>
<li><a href="#components">Components</a>
<ul>
<li><a href="#alerts">Alerts</a></li>
</ul></li>
<li><a href="#sizing">Sizing</a>
<ul>
<li><a href="#parameters-available">Parameters available</a></li>
<li><a href="#using-pixels">Using pixels</a></li>
<li><a href="#using-rem">Using rem</a></li>
</ul></li>
<li><a href="#memory">Memory</a>
<ul>
<li><a href="#ram-to-use">RAM to use</a></li>
<li><a href="#more-is-better">More is better</a></li>
<li><a href="#used-ram">Used RAM</a></li>
</ul></li>
</ul></li>
</ul>
</nav>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5 pr-md-4" role="main">
<a class="btn btn-lg -bg-orange td-rss-button d-none d-lg-block" href="https://jenkinsci.github.io/kubernetes-operator/blog/releases/index.xml" target="_blank">
RSS <i class="fa fa-rss ml-2 "></i>
</a>
<div class="td-content">
<h1>Another Great Release</h1>
<div class="lead">A short lead description about this content page. Text here can also be <strong>bold</strong> or <em>italic</em> and can even be split over multiple paragraphs.</div>
<div class="td-byline mb-4">
<time datetime="2018-01-04" class="text-muted">Thursday, January 04, 2018</time>
</div>
<p>Text can be <strong>bold</strong>, <em>italic</em>, or <del>strikethrough</del>. <a href="https://github.com">Links</a> should be blue with no underlines (unless hovered over).</p>
<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p>
<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p>
<blockquote>
<p>There should be no margin above this first sentence.</p>
<p>Blockquotes should be a lighter gray with a border along the left side in the secondary color.</p>
<p>There should be no margin below this final sentence.</p>
</blockquote>
<h2 id="first-header">First Header</h2>
<p>This is a normal paragraph following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
<p>On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width.</p>
<p>Lorem markdownum tuta hospes stabat; idem saxum facit quaterque repetito
occumbere, oves novem gestit haerebat frena; qui. Respicit recurvam erat:
pignora hinc reppulit nos <strong>aut</strong>, aptos, ipsa.</p>
<p>Meae optatos <em>passa est</em> Epiros utiliter <em>Talibus niveis</em>, hoc lata, edidit.
Dixi ad aestum.</p>
<h2 id="header-2">Header 2</h2>
<blockquote>
<p>This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
</blockquote>
<h3 id="header-3">Header 3</h3>
<pre><code>This is a code block following a header.</code></pre>
<h4 id="header-4">Header 4</h4>
<ul>
<li>This is an unordered list following a header.</li>
<li>This is an unordered list following a header.</li>
<li>This is an unordered list following a header.</li>
</ul>
<h5 id="header-5">Header 5</h5>
<ol>
<li>This is an ordered list following a header.</li>
<li>This is an ordered list following a header.</li>
<li>This is an ordered list following a header.</li>
</ol>
<h6 id="header-6">Header 6</h6>
<table>
<thead>
<tr>
<th>What</th>
<th>Follows</th>
</tr>
</thead>
<tbody>
<tr>
<td>A table</td>
<td>A header</td>
</tr>
<tr>
<td>A table</td>
<td>A header</td>
</tr>
<tr>
<td>A table</td>
<td>A header</td>
</tr>
</tbody>
</table>
<hr />
<p>There&rsquo;s a horizontal rule above and below this.</p>
<hr />
<p>Here is an unordered list:</p>
<ul>
<li>Salt-n-Pepa</li>
<li>Bel Biv DeVoe</li>
<li>Kid &lsquo;N Play</li>
</ul>
<p>And an ordered list:</p>
<ol>
<li>Michael Jackson</li>
<li>Michael Bolton</li>
<li>Michael Bublé</li>
</ol>
<p>And an unordered task list:</p>
<ul class="task-list">
<li><label><input type="checkbox" checked disabled class="task-list-item"> Create a sample markdown document</label></li>
<li><label><input type="checkbox" checked disabled class="task-list-item"> Add task lists to it</label></li>
<li><label><input type="checkbox" disabled class="task-list-item"> Take a vacation</label></li>
</ul>
<p>And a &ldquo;mixed&rdquo; task list:</p>
<ul class="task-list">
<li><label><input type="checkbox" disabled class="task-list-item"> Steal underpants</label></li>
<li>?</li>
<li><label><input type="checkbox" disabled class="task-list-item"> Profit!</label></li>
</ul>
<p>And a nested list:</p>
<ul>
<li>Jackson 5
<ul>
<li>Michael</li>
<li>Tito</li>
<li>Jackie</li>
<li>Marlon</li>
<li>Jermaine</li>
</ul></li>
<li>TMNT
<ul>
<li>Leonardo</li>
<li>Michelangelo</li>
<li>Donatello</li>
<li>Raphael</li>
</ul></li>
</ul>
<p>Definition lists can be used with Markdown syntax. Definition terms are bold.</p>
<dl>
<dt>Name</dt>
<dd>Godzilla</dd>
<dt>Born</dt>
<dd>1952</dd>
<dt>Birthplace</dt>
<dd>Japan</dd>
<dt>Color</dt>
<dd>Green</dd>
</dl>
<hr />
<p>Tables should have bold headings and alternating shaded rows.</p>
<table>
<thead>
<tr>
<th>Artist</th>
<th>Album</th>
<th>Year</th>
</tr>
</thead>
<tbody>
<tr>
<td>Michael Jackson</td>
<td>Thriller</td>
<td>1982</td>
</tr>
<tr>
<td>Prince</td>
<td>Purple Rain</td>
<td>1984</td>
</tr>
<tr>
<td>Beastie Boys</td>
<td>License to Ill</td>
<td>1986</td>
</tr>
</tbody>
</table>
<p>If a table is too wide, it should scroll horizontally.</p>
<table>
<thead>
<tr>
<th>Artist</th>
<th>Album</th>
<th>Year</th>
<th>Label</th>
<th>Awards</th>
<th>Songs</th>
</tr>
</thead>
<tbody>
<tr>
<td>Michael Jackson</td>
<td>Thriller</td>
<td>1982</td>
<td>Epic Records</td>
<td>Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical</td>
<td>Wanna Be Startin&rsquo; Somethin&rsquo;, Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life</td>
</tr>
<tr>
<td>Prince</td>
<td>Purple Rain</td>
<td>1984</td>
<td>Warner Brothers Records</td>
<td>Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal</td>
<td>Let&rsquo;s Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I&rsquo;m a Star, Purple Rain</td>
</tr>
<tr>
<td>Beastie Boys</td>
<td>License to Ill</td>
<td>1986</td>
<td>Mercury Records</td>
<td>noawardsbutthistablecelliswide</td>
<td>Rhymin &amp; Stealin, The New Style, She&rsquo;s Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill</td>
</tr>
</tbody>
</table>
<hr />
<p>Code snippets like <code>var foo = &quot;bar&quot;;</code> can be shown inline.</p>
<p>Also, <code>this should vertically align</code> <del><code>with this</code></del> <del>and this</del>.</p>
<p>Code can also be shown in a block element.</p>
<pre><code>foo := "bar";
bar := "foo";</code></pre>
<p>Code can also use syntax highlighting.</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#204a87;font-weight:bold">func</span> <span style="color:#000">main</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span> <span style="color:#000;font-weight:bold">{</span>
<span style="color:#000">input</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#4e9a06">`</span><span style="color:#4e9a06">var foo = &#34;bar&#34;;</span><span style="color:#4e9a06">`</span>
<span style="color:#000">lexer</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexers</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;javascript&#34;</span><span style="color:#000;font-weight:bold">)</span>
<span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">_</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexer</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Tokenise</span><span style="color:#000;font-weight:bold">(</span><span style="color:#204a87;font-weight:bold">nil</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">input</span><span style="color:#000;font-weight:bold">)</span>
<span style="color:#000">style</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">styles</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;github&#34;</span><span style="color:#000;font-weight:bold">)</span>
<span style="color:#000">formatter</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">New</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">WithLineNumbers</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span>
<span style="color:#204a87;font-weight:bold">var</span> <span style="color:#000">buff</span> <span style="color:#000">bytes</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Buffer</span>
<span style="color:#000">formatter</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Format</span><span style="color:#000;font-weight:bold">(</span><span style="color:#ce5c00;font-weight:bold">&amp;</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">style</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">)</span>
<span style="color:#000">fmt</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Println</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">String</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span>
<span style="color:#000;font-weight:bold">}</span></code></pre></div><pre><code>Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.</code></pre>
<p>Inline code inside table cells should still be distinguishable.</p>
<table>
<thead>
<tr>
<th>Language</th>
<th>Code</th>
</tr>
</thead>
<tbody>
<tr>
<td>Javascript</td>
<td><code>var foo = &quot;bar&quot;;</code></td>
</tr>
<tr>
<td>Ruby</td>
<td><code>foo = &quot;bar&quot;{</code></td>
</tr>
</tbody>
</table>
<hr />
<p>Small images should be shown at their actual size.</p>
<p><img src="http://placekitten.com/g/300/200/" alt="" /></p>
<p>Large images should always scale down and fit in the content container.</p>
<p><img src="http://placekitten.com/g/1200/800/" alt="" /></p>
<h2 id="components">Components</h2>
<h3 id="alerts">Alerts</h3>
<p>
<div class="alert alert-primary" role="alert">
This is an alert.
</div>
<div class="alert alert-primary" role="alert">
<h4 class="alert-heading">Note:</h4>
This is an alert with a title.
</div>
<div class="alert alert-primary" role="alert">
This is a successful alert.
</div>
<div class="alert alert-primary" role="alert">
This is a warning!
</div>
<div class="alert alert-primary" role="alert">
<h4 class="alert-heading">Warning!</h4>
This is a warning with a title!
</div>
</p>
<h2 id="sizing">Sizing</h2>
<p>Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
<h3 id="parameters-available">Parameters available</h3>
<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
<h3 id="using-pixels">Using pixels</h3>
<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
<h3 id="using-rem">Using rem</h3>
<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
<h2 id="memory">Memory</h2>
<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
<h3 id="ram-to-use">RAM to use</h3>
<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
<h3 id="more-is-better">More is better</h3>
<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
<h3 id="used-ram">Used RAM</h3>
<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p>
<pre><code>This is the final element on the page and there should be no margin below this.</code></pre>
<ul class="list-unstyled d-flex justify-content-between align-items-center mb-0 pt-5">
<li>
<a class="btn btn-primary disabled"><span class="mr-1"></span> Previous</a>
</li>
<a class="btn btn-primary disabled">Next <span class="ml-1"></span></a>
</li>
</ul>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="bg-dark container-fluid trademark-bigger">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-12 text-center py-4 order-sm-2">
<small class="text-white">&copy; 2021 Jenkins Operator is created by VirtusLab. Source is available under Apache License Version 2 and website content under Creative Commons Attribution-ShareAlike 4.0.</small><br>
<small class="text-white">Jenkins® is a registered trademark of Software in the Public Interest, Inc.</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.b0e99aac17991fa76812dd47914049168ac469a1faa0939560f0b370565becab.js" integrity="sha256-sOmarBeZH6doEt1HkUBJForEaaH6oJOVYPCzcFZb7Ks="></script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 KiB

View File

@ -1,338 +0,0 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.62.2" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Easy documentation with Docsy | Jenkins Operator</title><meta property="og:title" content="Easy documentation with Docsy" />
<meta property="og:description" content="The Docsy Hugo theme lets project maintainers and contributors focus on content, not on reinventing a website infrastructure from scratch" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/" />
<meta property="og:image" content="https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get.png"/>
<meta property="article:published_time" content="2018-10-06T00:00:00+00:00" />
<meta property="article:modified_time" content="2018-10-06T00:00:00+00:00" /><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Easy documentation with Docsy">
<meta itemprop="description" content="The Docsy Hugo theme lets project maintainers and contributors focus on content, not on reinventing a website infrastructure from scratch">
<meta itemprop="datePublished" content="2018-10-06T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2018-10-06T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="135">
<meta itemprop="image" content="https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get.png">
<meta itemprop="keywords" content="" /><meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get.png"/>
<meta name="twitter:title" content="Easy documentation with Docsy"/>
<meta name="twitter:description" content="The Docsy Hugo theme lets project maintainers and contributors focus on content, not on reinventing a website infrastructure from scratch"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.6c58fba96b88d035ce071c346f084a9dc4dedee4e80eb3724fe530520541a4ec.css" as="style">
<link href="/kubernetes-operator/scss/main.min.6c58fba96b88d035ce071c346f084a9dc4dedee4e80eb3724fe530520541a4ec.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Easy documentation with Docsy | Jenkins Operator</title>
</head>
<body class="td-page td-blog">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/blog/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Blog</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-blog">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/blog/news/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">News</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-blog-news">
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-blog-2018-10-06-easy-documentation-with-docsy" href="/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/">Announcing Docsy</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-blog-2018-10-06-the-second-blog-post" href="/kubernetes-operator/blog/2018/10/06/the-second-blog-post/">Second blog post</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/blog/releases/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Releases</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-blog-releases">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-blog-2018-01-04-another-great-release" href="/kubernetes-operator/blog/2018/01/04/another-great-release/">Release New Features</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/website/content/en/blog/news/first-post/index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?labels=documentation&amp;template=documentation.md&amp;title=Easy%20documentation%20with%20Docsy" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new/choose" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5 pr-md-4" role="main">
<a class="btn btn-lg -bg-orange td-rss-button d-none d-lg-block" href="https://jenkinsci.github.io/kubernetes-operator/blog/news/index.xml" target="_blank">
RSS <i class="fa fa-rss ml-2 "></i>
</a>
<div class="td-content">
<h1>Easy documentation with Docsy</h1>
<div class="lead">The Docsy Hugo theme lets project maintainers and contributors focus on content, not on reinventing a website infrastructure from scratch</div>
<div class="td-byline mb-4">
By <b>Riona MacNamara (<a href="https://twitter.com/bepsays">@rionam</a>)</b> |
<time datetime="2018-10-06" class="text-muted">Saturday, October 06, 2018</time>
</div>
<p><strong>This is a typical blog post that includes images.</strong></p>
<p>The front matter specifies the date of the blog post, its title, a short description that will be displayed on the blog landing page, and its author.</p>
<h2 id="including-images">Including images</h2>
<p>Here&rsquo;s an image (<code>featured-sunset-get.png</code>) that includes a byline and a caption.</p>
<div class="card rounded p-2 td-post-card mb-4 mt-4" style="max-width: 610px">
<img class="card-img-top" src="/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png" width="600" height="300">
<div class="card-body px-0 pt-2 pb-0">
<p class="card-text">
Fetch and scale an image in the upcoming Hugo 0.43.
<small class="text-muted"><br/>Photo: Riona MacNamara / CC-BY-CA</small></p>
</div>
</div>
<p>The front matter of this post specifies properties to be assigned to all image resources:</p>
<pre><code>resources:
- src: "**.{png,jpg}"
title: "Image #:counter"
params:
byline: "Photo: Riona MacNamara / CC-BY-CA"</code></pre>
<p>To include the image in a page, specify its details like this:</p>
<pre><code>
<div class="card rounded p-2 td-post-card mb-4 mt-4" style="max-width: 610px">
<img class="card-img-top" src="/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png" width="600" height="300">
<div class="card-body px-0 pt-2 pb-0">
<p class="card-text">
Fetch and scale an image in the upcoming Hugo 0.43.
<small class="text-muted"><br/>Photo: Riona MacNamara / CC-BY-CA</small></p>
</div>
</div></code></pre>
<p>The image will be rendered at the size and byline specified in the front matter.</p>
<ul class="list-unstyled d-flex justify-content-between align-items-center mb-0 pt-5">
<li>
<a href="/kubernetes-operator/blog/2018/10/06/the-second-blog-post/" class="btn btn-primary "><span class="mr-1"></span> Previous</a>
</li>
<a class="btn btn-primary disabled">Next <span class="ml-1"></span></a>
</li>
</ul>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="bg-dark container-fluid trademark-bigger">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-12 text-center py-4 order-sm-2">
<small class="text-white">&copy; 2021 Jenkins Operator is created by VirtusLab. Source is available under Apache License Version 2 and website content under Creative Commons Attribution-ShareAlike 4.0.</small><br>
<small class="text-white">Jenkins® is a registered trademark of Software in the Public Interest, Inc.</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.b0e99aac17991fa76812dd47914049168ac469a1faa0939560f0b370565becab.js" integrity="sha256-sOmarBeZH6doEt1HkUBJForEaaH6oJOVYPCzcFZb7Ks="></script>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More