28
28
# The job checkout structure is:
29
29
# .
30
30
# ├── metasploit-omnibus
31
- # └── metasploit-framework (Only if ARM builds)
31
+ # └── metasploit-framework (Only if ARM/Windows builds)
32
+ # For windows we additionally move metasploit-framework into the omnibus local cache
32
33
#
33
34
docker_arm :
34
35
runs-on : ${{ matrix.os }}
@@ -208,12 +209,10 @@ jobs:
208
209
# If required, change reported architecture in new program environment and set personality flags
209
210
if [ ! -z "${LINUX32}" ] ; then
210
211
echo 'setting linux32'
211
- architecturePrefix=' linux32'
212
+ /bin/bash -x -c "docker run --rm --volume $(pwd):$(pwd) --workdir $(pwd) --user jenkins ${DOCKER_IMAGE} linux32 /bin/bash -l -c 'cd metasploit-omnibus && ARCH=x86_64 make'"
212
213
else
213
- echo 'no arch prefix supplied'
214
- architecturePrefix=''
214
+ /bin/bash -x -c "docker run --rm --volume $(pwd):$(pwd) --workdir $(pwd) --user jenkins ${DOCKER_IMAGE} /bin/bash -l -c 'cd metasploit-omnibus && make'"
215
215
fi
216
- /bin/bash -x -c "docker run --rm --volume $(pwd):$(pwd) --workdir $(pwd) --user jenkins ${DOCKER_IMAGE} ${architecturePrefix} /bin/bash -l -c 'cd metasploit-omnibus && make'"
217
216
env :
218
217
LINUX32 : ${{ matrix.docker.linux32 }}
219
218
@@ -227,13 +226,14 @@ jobs:
227
226
os :
228
227
- macos-11
229
228
ruby :
230
- - 2 .6
229
+ - 3.0 .6
231
230
232
231
name : ${{ matrix.os }}
233
232
steps :
234
233
- name : Checkout omnibus
235
234
uses : actions/checkout@v4
236
235
with :
236
+ submodules : true
237
237
path : metasploit-omnibus
238
238
239
239
- name : Setup Ruby
@@ -244,6 +244,7 @@ jobs:
244
244
ruby-version : ${{ matrix.ruby }}
245
245
bundler-cache : true
246
246
cache-version : 4
247
+ working-directory : metasploit-omnibus
247
248
248
249
- name : Run omnibus
249
250
run : |
@@ -254,3 +255,57 @@ jobs:
254
255
255
256
cd metasploit-omnibus
256
257
make
258
+
259
+ windows :
260
+ runs-on : ${{ matrix.os }}
261
+ timeout-minutes : 180
262
+
263
+ strategy :
264
+ fail-fast : false
265
+ matrix :
266
+ os :
267
+ - windows-2019
268
+ ruby :
269
+ - 3.0.6
270
+
271
+ name : ${{ matrix.os }}
272
+ steps :
273
+ - name : Checkout omnibus
274
+ uses : actions/checkout@v4
275
+ with :
276
+ submodules : true
277
+ path : metasploit-omnibus
278
+
279
+ - name : Setup Ruby
280
+ env :
281
+ BUNDLE_FORCE_RUBY_PLATFORM : true
282
+ uses : ruby/setup-ruby@v1
283
+ with :
284
+ ruby-version : ${{ matrix.ruby }}
285
+ bundler-cache : false
286
+ cache-version : 4
287
+ working-directory : metasploit-omnibus
288
+ # Github actions with Ruby requires Bundler 2.2.18+
289
+ # https://github.com/ruby/setup-ruby/tree/d2b39ad0b52eca07d23f3aa14fdf2a3fcc1f411c#windows
290
+ bundler : 2.2.33
291
+
292
+ # Checkout framework
293
+ - name : Checkout metasploit-framework code
294
+ uses : actions/checkout@v4
295
+ with :
296
+ repository : rapid7/metasploit-framework
297
+ path : metasploit-framework
298
+
299
+ - name : Extract xz files
300
+ run : |
301
+ cd metasploit-omnibus
302
+ xz -d local/cache/*.xz
303
+
304
+ - name : Run omnibus
305
+ run : |
306
+ # mkdir -p metasploit-omnibus/local/cache/git_cache/c
307
+ # mv metasploit-framework/ metasploit-omnibus/local/cache/git_cache/c
308
+ # dir metasploit-omnibus/local/cache/git_cache/c
309
+ # dir metasploit-omnibus/local/cache/git_cache/c/metasploit-framework
310
+ cd metasploit-omnibus
311
+ make
0 commit comments