1
1
Describe " Jenkins Configuration" {
2
2
Context " Installation Integrity" {
3
3
BeforeAll {
4
- $jenkins = choco list - lo - r | ConvertFrom-Csv - Delimiter ' |' - Header Package, Version | Where-Object Package -eq ' jenkins'
4
+ $jenkins = choco list - r | ConvertFrom-Csv - Delimiter ' |' - Header Package, Version | Where-Object Package -eq ' jenkins'
5
5
$service = Get-Service jenkins
6
- $jenkinsVersion = ' 2.222.4'
7
6
}
8
7
9
8
It " Jenkins is installed" {
10
9
$jenkins | Should -Not - BeNullOrEmpty
11
10
}
12
11
13
- It " Jenkins is the correct version" {
14
- $jenkins.version | Should - Be $jenkinsVersion
15
- }
16
-
17
12
It " Service is installed" {
18
13
$service | Should -Not - BeNullOrEmpty
19
14
}
@@ -48,7 +43,7 @@ Describe "Jenkins Configuration" {
48
43
49
44
Context " Required Jobs" {
50
45
BeforeAll {
51
- $jobs = (Get-ChildItem ' C:\Program Files (x86) \Jenkins\jobs\' - Directory).Name
46
+ $jobs = (Get-ChildItem ' C:\ProgramData \Jenkins\.jenkins \jobs\' - Directory).Name
52
47
}
53
48
54
49
It " 'Internalize packages from the Community Repository' is present" {
@@ -72,93 +67,11 @@ Describe "Jenkins Configuration" {
72
67
73
68
Context " Required Plugins" {
74
69
BeforeAll {
75
- $plugins = (Get-ChildItem ' C:\Program Files (x86)\Jenkins\plugins' - Directory).Name
76
- }
77
- It " <name> is installed" - Foreach @ (
78
- @ {Name = ' ace-editor' }
79
- @ {Name = ' ant' }
80
- @ {Name = ' antisamy-markup-formatter' }
81
- @ {Name = ' apache-httpcomponents-client-4-api' }
82
- @ {Name = ' bootstrap4-api' }
83
- @ {Name = ' bouncycastle-api' }
84
- @ {Name = ' branch-api' }
85
- @ {Name = ' build-timeout' }
86
- @ {Name = ' caffeine-api' }
87
- @ {Name = ' checks-api' }
88
- @ {Name = ' cloudbees-folder' }
89
- @ {Name = ' command-launcher' }
90
- @ {Name = ' credentials' }
91
- @ {Name = ' credentials-binding' }
92
- @ {Name = ' display-url-api' }
93
- @ {Name = ' durable-task' }
94
- @ {Name = ' echarts-api' }
95
- @ {Name = ' email-ext' }
96
- @ {Name = ' font-awesome-api' }
97
- @ {Name = ' git' }
98
- @ {Name = ' git-client' }
99
- @ {Name = ' git-server' }
100
- @ {Name = ' github' }
101
- @ {Name = ' github-api' }
102
- @ {Name = ' github-branch-source' }
103
- @ {Name = ' gradle' }
104
- @ {Name = ' handlebars' }
105
- @ {Name = ' jackson2-api' }
106
- @ {Name = ' jdk-tool' }
107
- @ {Name = ' jjwt-api' }
108
- @ {Name = ' jquery3-api' }
109
- @ {Name = ' jsch' }
110
- @ {Name = ' junit' }
111
- @ {Name = ' ldap' }
112
- @ {Name = ' lockable-resources' }
113
- @ {Name = ' mailer' }
114
- @ {Name = ' mapdb-api' }
115
- @ {Name = ' matrix-auth' }
116
- @ {Name = ' matrix-project' }
117
- @ {Name = ' momentjs' }
118
- @ {Name = ' okhttp-api' }
119
- @ {Name = ' pam-auth' }
120
- @ {Name = ' pipeline-build-step' }
121
- @ {Name = ' pipeline-github-lib' }
122
- @ {Name = ' pipeline-graph-analysis' }
123
- @ {Name = ' pipeline-input-step' }
124
- @ {Name = ' pipeline-milestone-step' }
125
- @ {Name = ' pipeline-model-api' }
126
- @ {Name = ' pipeline-model-definition' }
127
- @ {Name = ' pipeline-model-extensions' }
128
- @ {Name = ' pipeline-rest-api' }
129
- @ {Name = ' pipeline-stage-step' }
130
- @ {Name = ' pipeline-stage-tags-metadata' }
131
- @ {Name = ' pipeline-stage-view' }
132
- @ {Name = ' plain-credentials' }
133
- @ {Name = ' plugin-util-api' }
134
- @ {Name = ' popper-api' }
135
- @ {Name = ' powershell' }
136
- @ {Name = ' resource-disposer' }
137
- @ {Name = ' scm-api' }
138
- @ {Name = ' script-security' }
139
- @ {Name = ' snakeyaml-api' }
140
- @ {Name = ' ssh-credentials' }
141
- @ {Name = ' ssh-slaves' }
142
- @ {Name = ' structs' }
143
- @ {Name = ' subversion' }
144
- @ {Name = ' timestamper' }
145
- @ {Name = ' token-macro' }
146
- @ {Name = ' trilead-api' }
147
- @ {Name = ' workflow-aggregator' }
148
- @ {Name = ' workflow-api' }
149
- @ {Name = ' workflow-basic-steps' }
150
- @ {Name = ' workflow-cps' }
151
- @ {Name = ' workflow-cps-global-lib' }
152
- @ {Name = ' workflow-durable-task-step' }
153
- @ {Name = ' workflow-job' }
154
- @ {Name = ' workflow-multibranch' }
155
- @ {Name = ' workflow-scm-step' }
156
- @ {Name = ' workflow-step-api' }
157
- @ {Name = ' workflow-support' }
158
- @ {Name = ' ws-cleanup' }
159
-
160
- ) {
161
- $_.Name -in $plugins | Should - be $true
70
+ $plugins = (Get-ChildItem ' C:\ProgramData\Jenkins\.jenkins\plugins\' - Directory).Name
71
+ }
72
+ It " powershell is installed" {
73
+
74
+ ' powershell' -in $plugins | Should - be $true
162
75
}
163
76
}
164
77
}
0 commit comments