Commit Graph

396 Commits

Author SHA1 Message Date
Max Xandeco 63e442ac7a change plugin name regex to case-insensitive. 2019-09-19 11:27:57 +01:00
Tomasz Sęk cb1e49ea42
Merge pull request #100 from jakalkhalili/fix-kubernetes-url
Fix Kubernetes API URL
2019-09-13 17:07:26 +02:00
Jakub Al-Khalili 9763ea5899 #96 Small improvements in tests 2019-09-12 15:22:00 +02:00
Jakub Al-Khalili e8277cc8a0 #96 Small tests improvements 2019-09-12 14:58:47 +02:00
Jakub Al-Khalili 9698079a02 #90 Fix kubernetes server url 2019-09-12 14:51:09 +02:00
Jakub Al-Khalili 4b4cebadfa #96 Improve pod unit tests 2019-09-12 09:50:29 +02:00
Jakub Al-Khalili 8c70c0774f #96 Fix casc secret configuration bug 2019-09-11 16:17:46 +02:00
Jakub Al-Khalili d7f2d630ef Change metrics mechanism in cmd/manager/main.go 2019-09-09 14:52:21 +02:00
Tomasz Sęk 43be3501fd
Remove unused Jenkins view 2019-09-04 15:18:37 +02:00
Tomasz Sęk 0ae4d6ad90
#87 Update base plugins 2019-09-04 11:10:27 +02:00
Tomasz Sęk 1e03f639d0
#28 Fix e2e test 2019-09-03 20:19:24 +02:00
Tomasz Sęk 73c00a08ac
#69 Add e2e test 2019-09-03 18:34:13 +02:00
Tomasz Sęk 31536d0339
Remove Notifications from Jenkins API 2019-09-03 14:15:30 +02:00
Tomasz Sęk 204ea3f6b2
Remove unused job package
- cleanup Jenkins API
2019-09-03 14:13:45 +02:00
Tomasz Sęk eb0f8a8331
Remove unused job package and fix error handling in seedjobs package 2019-09-03 14:00:17 +02:00
Tomasz Sęk 30b83638e2
Remove unused Jenkins v1alpha2 API 2019-09-03 13:28:03 +02:00
Tomasz Sęk 36d936d1fa
Merge pull request #84 from jakalkhalili/master
#69 Add support for seed job configuration
2019-09-02 15:06:40 +02:00
Jakub Al-Khalili 833a95f2e8 #69 Add better documentation for Job DSL plugin and Git trigger settings 2019-09-02 14:56:28 +02:00
Jakub Al-Khalili b0f1ee88cd #69 Improve schedule tests 2019-09-02 14:11:05 +02:00
Jakub Al-Khalili 134c298358 #69 Add groovy script template rendering, fix pollSCM, improve pollSCM tests 2019-09-02 13:16:28 +02:00
Tomasz Sęk 183ff51eda
Merge pull request #78 from jakalkhalili/master
Add seedjob agent
2019-08-27 13:48:58 +02:00
Jakub Al-Khalili 90a6af52f6 Improve tests 2019-08-27 13:37:12 +02:00
Jakub Al-Khalili 393c3d690c Small improvements 2019-08-27 10:58:14 +02:00
Jakub Al-Khalili 44d751eee5 Fix tests 2019-08-27 09:56:23 +02:00
Jakub Al-Khalili f2eefb1fc9 Improve tests, small improvements 2019-08-27 09:34:42 +02:00
Jakub Al-Khalili ab42f8f432 Replace jobs creation mechanism, fix imports 2019-08-26 14:08:03 +02:00
Jakub Al-Khalili 9f2fe2492e Replace creating jobs mechanism, small code fixes 2019-08-26 14:04:53 +02:00
Tomasz Sęk 33524f88f1
Update base plugin versions 2019-08-23 14:10:49 +02:00
Tomasz Sęk 3a1f9e1ccc
#76 Allow configure JAVA_OPTS variable in Jenkins container 2019-08-23 13:43:18 +02:00
Jakub Al-Khalili ab1d3fb59b Fix tests 2019-08-23 11:27:24 +02:00
Jakub Al-Khalili f1815e10aa Sort imports 2019-08-23 10:46:41 +02:00
Jakub Al-Khalili ebd44b83fc Add seedjob agent 2019-08-23 10:43:27 +02:00
Tomasz Sęk 89c46a1720
Small code improvements 2019-08-19 16:56:17 +02:00
Jakub Al-Khalili 76e72702f2 #70 Fix SecurityContext propagation 2019-08-19 10:11:43 +02:00
Tomasz Sęk 8f80fa5bbd
Refactor notifications package 2019-08-18 15:40:28 +02:00
Jakub Al-Khalili 5c55db489f #72 Add support for plugin names with underscore 2019-08-14 09:51:55 +02:00
Jakub Al-Khalili 9bde4cb59f Improve notification mechanism 2019-08-02 14:07:37 +02:00
Jakub Al-Khalili 364ce8ad8a Fix deepcopy 2019-08-02 09:51:42 +02:00
Jakub Al-Khalili dc727f45d7 Deepcopy fix 2019-08-02 09:38:17 +02:00
Jakub Al-Khalili 16fd981703 Add notification to api 2019-08-01 16:36:26 +02:00
Jakub Al-Khalili 61d5311ac2 Disabled notification feature 2019-07-31 14:52:32 +02:00
Jakub Al-Khalili 5cbd21b03c Add notification library 2019-07-31 14:51:00 +02:00
Jakub Al-Khalili 3a7a4049f3 Improve groovy script checker 2019-07-31 11:11:15 +02:00
Jakub Al-Khalili 063f0c074b Improve unit tests 2019-07-31 10:51:36 +02:00
Jakub Al-Khalili 7a149c8257 Improve tests 2019-07-25 13:20:22 +02:00
Jakub Al-Khalili 168110f84d Fix groovy script versioning bug 2019-07-25 13:05:59 +02:00
Jakub Al-Khalili 2dabc773d4 #54 Improve tests 2019-07-23 09:16:38 +02:00
Jakub Al-Khalili 4d2cab5109 #54 Improve business logic 2019-07-22 16:41:00 +02:00
Jakub Al-Khalili 78b4a2d952 #54 Fix groovy script removal bug 2019-07-22 15:03:58 +02:00
Jakub Al-Khalili 0e4ae15506 #28 Enable groovy scripts secret loader 2019-07-17 16:01:34 +02:00
Jakub Al-Khalili 28dba98cd9 #45 Add test to check for imagePullSecrets propagation 2019-07-16 11:00:30 +02:00
Jakub Al-Khalili c9f39e9de4 Add support for namespaces in jenkins client 2019-07-15 16:47:12 +02:00
Jakub Al-Khalili 0fed26b733 Improve tests & docs 2019-07-15 09:56:47 +02:00
Jakub Al-Khalili 811e816b2f Fixed tests 2019-07-15 09:14:53 +02:00
Jakub Al-Khalili 74b8ec98ec Fix validation bug 2019-07-15 09:04:39 +02:00
Jakub Al-Khalili feae4e6e3d #45 Improve feature 2019-07-12 14:53:22 +02:00
Jakub Al-Khalili e049218b78 #45 Add support for imagePullSecrets parameter 2019-07-12 13:11:42 +02:00
Jakub Al-Khalili 164fe30aef #43 Fix tests 2019-07-10 16:08:09 +02:00
Jakub Al-Khalili 076b0aa453 #43 Add additional test scenarios 2019-07-10 15:49:53 +02:00
Jakub Al-Khalili 9e73be7a49 #43 Improve tests and fix GetJenkinsOpts 2019-07-10 15:19:26 +02:00
Jakub Al-Khalili 01655785b5 #43 Add support for JENKINS_OPTS, fix the --prefix bug 2019-07-10 13:58:18 +02:00
Jakub Al-Khalili b1696e5d9e Fixed sed command on macOS 2019-07-08 15:30:51 +02:00
Tomasz Sęk 7d716b972f
#28 Use new API for groovy and CasC user configuration 2019-06-30 23:18:20 +02:00
Tomasz Sęk 6a3a68bec0
#28 Use new API for groovy base configuration 2019-06-30 23:16:42 +02:00
Tomasz Sęk 87fcc5f8a5
#28 Change groovy client implementation 2019-06-30 23:16:03 +02:00
Tomasz Sęk d0b02de429
#28 Mount secrets for groovy and CasC customization 2019-06-30 23:11:45 +02:00
Tomasz Sęk 66236d5459
#28 Add validation 2019-06-30 22:59:30 +02:00
Tomasz Sęk 4e302c66a1
#28 Return GroovyScriptExecutionFailed error 2019-06-30 22:57:54 +02:00
Tomasz Sęk 1930c04b72
#28 Update Jenkins API 2019-06-30 22:54:46 +02:00
Tomasz Sęk f7b6443fc6
Fix e2e tests 2019-06-29 17:06:38 +02:00
Tomasz Sęk 5926cf6d66
#29 Restart Jenkins pod when any seed job has been deleted
- update deep copy
2019-06-29 16:00:52 +02:00
Tomasz Sęk dda0a0075e
#29 Restart Jenkins pod when any seed job has been deleted 2019-06-29 12:19:35 +02:00
Tomasz Sęk 3b26e1c5ba
Allow configure SecurityContext and Jenkins master container command 2019-06-29 12:19:17 +02:00
Tomasz Sęk 3573b9acd6
Merge pull request #39 from akram/externalize-hardcoded-image-uid
Externalize hardcoded image uid and pod Security Context and removes default Command
2019-06-28 07:37:15 +02:00
Tomasz Sęk 84eb4575e1
Fix backup before pod deletion 2019-06-27 23:33:15 +02:00
Tomasz Sęk 7c091fb69b
Fix lint issues 2019-06-27 22:54:50 +02:00
Tomasz Sęk d6a34b7b84
#31 Restart Jenkins pod when user or password have changed 2019-06-27 22:51:57 +02:00
Tomasz Sęk 42dc5569c5
#38 Omit KUBERNETES_* envs in containers 2019-06-27 22:49:52 +02:00
Akram Ben Aissi 4150b6c767 fixing staticcheck 2019-06-26 09:07:09 -04:00
Akram Ben Aissi f17a4c5dce Externalise podSecurityContext.runAsUser and 2019-06-26 07:28:30 -04:00
Akram Ben Aissi 9285e294dd Jenkins OpenShift image requirements 2019-06-26 03:15:52 -04:00
Tomasz Sęk 037c1fa025
Fix logging about watches resources 2019-06-23 10:39:50 +02:00
Tomasz Sęk be4d6b471d
Add Jenkins scheme doc 2019-06-19 18:00:30 +02:00
Tomasz Sęk 7b0778552a
#4 Update e2e tests 2019-06-18 22:20:41 +02:00
Tomasz Sęk 13efd245f9
Improve logging of Jenkins jobs
- fix unit test
2019-06-18 20:16:10 +02:00
Tomasz Sęk 98110fac91
#4 Make backup before pod deletion 2019-06-18 20:04:15 +02:00
Tomasz Sęk 6bc79dfb33
Improve logging of Jenkins jobs 2019-06-18 20:00:12 +02:00
Tomasz Sęk a408112875
Stop reconcile loop when error has been repeated more than 15 times 2019-06-17 22:46:48 +02:00
Tomasz Sęk 2264e11a6d
#4 [WIP] Backup and restore
- add backup trigger
- fix recoveryOnce logic
2019-06-16 22:40:41 +02:00
Tomasz Sęk 144d0245f2
Improve execute groovy script error logging 2019-06-16 22:38:39 +02:00
Tomasz Sęk 2d501b00d5
#4 [WIP] Backup and restore 2019-06-16 08:21:23 +02:00
Tomasz Sęk bfbe13fa80
#30 Change Jenkins master pod name 2019-06-16 01:44:30 +02:00
Tomasz Sęk 25469b1174
Move Jenkins container properties to spec.master.containers list 2019-06-11 19:53:02 +02:00
Tomasz Sęk e1aba3ed9f
Improve plugins management 2019-06-11 19:51:49 +02:00
Tomasz Sęk 8178e2315e
Use v1alpha2 Jenkins schema 2019-06-10 17:55:09 +02:00
Tomasz Sęk a835c64524
Disable Jenkins remote CLI 2019-06-10 17:23:32 +02:00
Tomasz Sęk 243f5ca3f9
Improve logging plugin version 2019-06-10 17:22:55 +02:00
Tomasz Sęk a183531683
Add v1alpha2 Jenkins schema 2019-06-10 17:12:41 +02:00
Tomasz Sęk 0ae462dbb5
Detect Jenkins Master Pod starting issues 2019-06-09 16:46:50 +02:00
Tomasz Sęk f9ad157c8b
#9 Allow mount pvc in Jenkins pod 2019-06-09 14:56:31 +02:00
Tomasz Sęk 79e150cbb7
Generate OpenAPI 2019-06-07 17:53:50 +02:00
Tomasz Sęk 7d257965b9
Bump operator-sdk to v0.8.1 2019-06-07 17:36:56 +02:00
Tomasz Sęk ede2d3fd20
Fix lint issues 2019-06-07 11:21:07 +02:00
Tomasz Sęk 94979d15d1
#26 Log info when CR, Secret or ConfigMap has changed 2019-06-07 10:03:21 +02:00
Tomasz Sęk 67550f962f
#27 Restart Jenkins when any user plugin version has changed 2019-06-06 18:57:47 +02:00
Tomasz Sęk 78f801b211
Improve logging 2019-06-06 18:48:21 +02:00
Tomasz Sęk ccc0307bc1
Fix trigger jenkins-operator-user-configuration-casc job when secret has changed 2019-06-06 18:45:40 +02:00
Tomasz Sęk d6e4ca7521
#23 Add info about synchronizing k8s ConfigMaps and secrets in jobs 2019-06-06 10:11:05 +02:00
Tomasz Sęk 8c6f71bd10
#24 Fix getting job's build when Jenkins URL is set 2019-06-05 21:45:49 +02:00
Tomasz Sęk 1e4efe0efc
Update Jenkins plugins 2019-05-29 18:43:12 +02:00
Tomasz Sęk c885f563a4
Merge pull request #18 from tveal/update-plugins
Update and Sort Base Plugins
2019-05-29 18:18:30 +02:00
Tomasz Sęk 55d6aecb93
#9 Allow mount secrets and configmaps in Jenkins pod 2019-05-27 23:35:09 +02:00
tveal 1f2f96e99a make all base plugin versions constants and sort for upgrade maintenance
update base plugins and add script for checking for latest
2019-05-24 19:02:41 -05:00
Tomasz Sęk af10a97299
Allow configure sidecars in Jenkins pod 2019-05-17 16:35:18 +02:00
Tomasz Sęk 70f35c47f0
Add Readiness and Liveness probes - code cleanup 2019-04-15 21:47:02 +02:00
Maciej Olesinski 2c9f630926 Add Readiness and Liveness probes 2019-04-15 13:34:36 +02:00
Tomasz Sęk 1a8fd8828b
#14 Add username/password authentication for seed jobs
- validate if seed job ids are unique
2019-03-16 20:19:22 +01:00
Tomasz Sęk ed3dc80ab8
Move ValidateSeedJobs function to seedjobs package 2019-03-16 20:02:21 +01:00
Tomasz Sęk 1d10d629ce
#14 Add username/password authentication for seed jobs 2019-03-15 18:30:07 +01:00
Tomasz Sęk 6285f22170
Remove depracated ServiceAccountCredential 2019-03-15 18:18:29 +01:00
Tomasz Sęk c170acac1d
#2 Add kubernetes-credentials-provider plugin to OperatorPlugins 2019-03-12 17:26:03 +01:00
Tomasz Sęk 9177fbe802
Update operator base plugins 2019-03-12 17:24:41 +01:00
Tomasz Sęk 826573eeb9
Add OperatorVersion in Jenkins CR status section 2019-03-12 17:23:39 +01:00
Tomasz Sęk d278847a46
Allow configure ImagePullPolicy for Jenkins master pod 2019-03-12 17:19:56 +01:00
Tomasz Sęk 2aa96789b4
#9 Allow set Jenkins master pod env variables 2019-03-11 16:52:28 +01:00
Tomasz Sęk 90c6f25610
#12 Allow configure Jenkins and Jenkins slave services 2019-03-08 17:06:53 +01:00
Tomasz Sęk 75c403b941
#13 Add node selector for Jenkins master pod 2019-03-08 07:30:04 +01:00
Tomasz Sęk f817d2ad09
#9 Add secret support in Configuration as Code plugin integration 2019-03-03 17:59:22 +01:00
Tomasz Sęk ebf1163b28
#8 Add Configuration as Code plugin integration 2019-03-01 17:48:35 +01:00
Tomasz Sęk b715f82557
#3 Fix custom auth override on Jenkins restart inside pod 2019-02-21 23:56:13 +01:00
Tomasz Sęk 3b8f0f7d10
Remove deprecated Jenkins CLI from base configuration scripts 2019-02-21 23:31:28 +01:00
Tomasz Sęk 28f09e9a84
Add ExecuteScript function to Jenkins API client 2019-02-21 16:46:41 +01:00
Tomasz Sęk 5996e63db9
Add information how much time take base and user phase 2019-02-18 22:00:54 +01:00
Tomasz Sęk 1ad5992160
Improve logging 2019-02-17 00:45:34 +01:00
Tomasz Sęk 08b6dfb691
#1 Split plugins in two groups:required by operator and required by user 2019-02-16 20:29:59 +01:00
Tomasz Sęk dd04c0cf5b
Remove backup mechanism 2019-02-14 19:36:55 +01:00
Tomasz Sęk da17e1a011
Rename virtuslab.com to jenkins.io 2019-02-12 19:50:22 +01:00
Tomasz Sęk ee79b2fadc
Rename VirtusLab/jenkins-operator to jenkinsci/kubernetes-operator in *.go 2019-02-11 21:10:52 +01:00
Tomasz Sęk a275ed62d5
Code improvements 2019-01-27 23:21:12 +01:00
Maciej Olesinski ec248f2d42 Add events 2019-01-22 00:45:02 +01:00
Tomasz Sęk a9dcd61a07
Add AWS S3 backup e2e test 2019-01-20 22:29:39 +01:00
Tomasz Sęk dee93c02e2
Fix build in travis 2019-01-19 13:37:14 +01:00
Tomasz Sęk ebe750aa8e
Move validation to AWS S3 backup provider 2019-01-19 13:14:19 +01:00
Tomasz Sęk b78bff897e
Add AWS S3 backup provider 2019-01-19 13:13:50 +01:00
Tomasz Sęk 9e6c44484c
Trigger backup before Jenkins master pod deletion 2019-01-19 13:03:56 +01:00
Tomasz Sęk d7fdac5e9a
Add backup API 2019-01-19 12:58:36 +01:00
Tomasz Sęk 7281032be2
Small refactoring 2019-01-19 12:38:58 +01:00
Tomasz Sęk d318bea4a1
Change signature of CreateOrUpdateJob function 2019-01-17 21:45:23 +01:00
Tomasz Sęk cdbf79e98f
Small refactoring 2019-01-16 23:02:41 +01:00
Tomasz Sęk 1f1947a80b
Rename plugin package 2019-01-16 22:45:09 +01:00
Tomasz Sęk cb2dfdd28a
[WIP] AWS S3 backup
- mount backup credentials secret into Jenkins pod
2019-01-16 22:33:00 +01:00
Tomasz Sęk e609611c4d
[WIP] AWS S3 backup
- ensure backup credentials secret
2019-01-16 22:32:29 +01:00
Tomasz Sęk dcafa71d67
Small refactoring 2019-01-16 11:17:45 +01:00
Tomasz Sęk 3aacf99536
Small refactoring 2019-01-16 10:05:09 +01:00
Tomasz Sęk 79112b50dc
[WIP] AWS S3 backup
- add backup validation in base configuration phase
- add backup validation in user configuration phase
- add tests
2019-01-16 00:29:38 +01:00
Tomasz Sęk e507d23b0e
[WIP] AWS S3 backup
- add backup type to API
- add AWS S3 backup configuration to API
2019-01-16 00:22:40 +01:00
Tomasz Sęk 8c4fa92ec5
Set default Jenkins master pod resources requirements, this closes #4 2019-01-15 12:04:50 +01:00
Tomasz Sęk e18764078c
Fix generating Jenkins API token 2019-01-14 18:24:11 +01:00
Tomasz Sęk c9370cda00
Improve logging 2019-01-14 18:19:49 +01:00
Tomasz Sęk ec0287c3b2
Small fixes 2019-01-11 13:51:16 +01:00
Tomasz Sęk ffca2b2080
Add Jenkins views 2019-01-11 13:38:17 +01:00
Tomasz Sęk aff974b466
Refactoring 2019-01-11 11:02:54 +01:00
Tomasz Sęk 1104df0b88
Update base plugin versions 2019-01-11 10:58:45 +01:00
Tomasz Sęk 15f312cef4
Improve jobs logging 2019-01-11 10:31:08 +01:00
Tomasz Sęk 2912212142
Add files synchronization for user/base configuration 2019-01-11 10:22:29 +01:00
antoniaklja b0fd8f2dfa Improve logging and update developer-guide.md 2019-01-11 10:14:15 +01:00
Tomasz Sęk 516418f97f
Fix calculating hash for user/base configuration 2019-01-11 07:59:48 +01:00
antoniaklja 80c5730763 Code clean up 2019-01-10 22:47:21 +01:00
Tomasz Sęk e313cc2991
Add RBAC for Jenkins master pod 2019-01-10 16:50:44 +01:00
Tomasz Sęk 515e0edb5a
Add user configuration groovy scripts job 2019-01-10 15:36:25 +01:00
Tomasz Sęk ca27bf4df8
Add base configuration groovy scripts job 2019-01-10 14:44:30 +01:00
Tomasz Sęk c26090dce8
Add base configuration groovy scripts job 2019-01-10 14:44:07 +01:00
Tomasz Sęk d07ebcd507
Code refactoring 2019-01-09 06:20:08 +01:00
antoniaklja 732342a56c Update README.md and theme 2019-01-03 20:01:26 +01:00
antoniaklja 0461e7983b Added jenkins theme and updated user reconciliation loop 2019-01-03 16:08:38 +01:00
antoniaklja 874ff8e0e5 Added job for executing groovy scripts 2019-01-03 16:07:51 +01:00
antoniaklja c404221154 Updated jobs and added more tests 2019-01-03 16:07:14 +01:00
antoniaklja b5fca5950a Minor refactoring 2019-01-02 18:59:09 +01:00
antoniaklja 54ee4ab6c7 Organized imports and updated README.md 2019-01-02 18:33:35 +01:00
antoniaklja 39eeefd990 Add tests for user reconciliation loop 2019-01-02 16:42:07 +01:00
antoniaklja d08d54588b Add tests for seedjobs 2019-01-02 16:41:48 +01:00
antoniaklja 64b9571c93 Add tests for jobs + mockgen for jenkins client 2019-01-02 16:41:33 +01:00
antoniaklja fef930791b Initial version of jobs API 2018-12-31 16:21:47 +01:00
antoniaklja 70aef4838b Refactoring, additional tests and update README.md 2018-12-27 20:22:53 +01:00
antoniaklja e7c55512a8 Refactoring, additional tests and update README.md 2018-12-27 18:17:54 +01:00
Tomasz Sęk 50656ceb5b
Small refactoring 2018-12-26 17:39:58 +01:00
Tomasz Sęk af9f7f4e76
Install base plugins 2018-12-25 17:10:56 +01:00
Tomasz Sęk f3093cdbbc
Fix CreateOrUpdateJob function 2018-12-25 17:09:20 +01:00
antoniaklja 25d63a881f Seed Jobs refactoring
- add new CreateOrUpdateJob function for Jenkins client
- better naming
2018-12-21 16:13:28 +01:00
antoniaklja 87739f71f1 Update seedjob and jenkins client 2018-12-20 16:36:11 +01:00
antoniaklja 4c8e61624e Initial version of user reconciliation loop and seed jobs 2018-12-19 22:40:08 +01:00
Tomasz Sęk ae39bdcfce
Bump operator-sdk to v0.2.0 2018-12-12 09:43:29 +01:00
Tomasz Sęk 54aa39c502
Add reconcile loop of Jenkins base configuration 2018-12-06 09:29:38 +01:00
Tomasz Sęk 14950293c5
Improve logging 2018-11-05 16:07:57 +01:00
Tomasz Sęk e6a0a56b06
Add packages info 2018-10-27 21:39:49 +02:00
Tomasz Sęk aa38f4c0bc
Generate operator-framework assets 2018-10-24 18:15:16 +02:00