3
3
version : 2.1
4
4
5
5
orbs :
6
+ aws-cli :
circleci/[email protected]
6
7
# Using inline orb for now
7
8
getting-started-smoke-test :
8
9
orbs :
@@ -325,6 +326,46 @@ jobs:
325
326
command : bundle exec fastlane << parameters.lane >>
326
327
no_output_timeout : 60m
327
328
329
+ fortify_scan :
330
+ << : *defaults
331
+ steps :
332
+ - *restore_repo
333
+ - run :
334
+ name : Make source directory
335
+ command : |
336
+ mkdir source
337
+ cp -r Amplify source
338
+ cp -r AmplifyPlugins source
339
+ - aws-cli/setup :
340
+ role-arn : ' arn:aws:iam::971028514469:role/CircleCiOIDC'
341
+ role-session-name : ' aws-s3-session'
342
+ - run :
343
+ name : Download License
344
+ command : |
345
+ aws s3 cp s3://amplify-swift-fortify-prod/fortify.license fortify.license
346
+ - run :
347
+ name : Download Installer
348
+ command : |
349
+ aws s3 cp s3://amplify-swift-fortify-prod/Fortify_SCA_and_Apps_22.1.1_Mac.tar.gz Fortify_SCA_and_Apps_22.1.1_Mac.tar.gz
350
+ tar -xvf Fortify_SCA_and_Apps_22.1.1_Mac.tar.gz
351
+ unzip Fortify_SCA_and_Apps_22.1.1_osx_x64.app.zip
352
+ - run :
353
+ name : Download Scripts
354
+ command : |
355
+ aws s3 cp s3://amplify-swift-fortify-prod/amplify_swift_fortify_scan.sh fortify_scan.sh
356
+ - run :
357
+ name : Run Installer
358
+ command : |
359
+ Fortify_SCA_and_Apps_22.1.1_osx_x64.app/Contents/MacOS/installbuilder.sh --mode unattended --installdir Fortify --InstallSamples 0 --fortify_license_path fortify.license --MigrateSCA 0
360
+ export PATH=~/amplify-swift/Fortify/bin:$PATH
361
+ echo "export PATH=~/amplify-swift/Fortify/bin:\$PATH" >> "$BASH_ENV"
362
+ fortifyupdate -acceptKey
363
+ sourceanalyzer -version
364
+ - run :
365
+ name : Run Scan
366
+ command : |
367
+ sh ./fortify_scan.sh source
368
+
328
369
deploy_requires : &deploy_requires
329
370
requires :
330
371
- build_test_amplify
@@ -338,6 +379,7 @@ deploy_requires: &deploy_requires
338
379
- unit_test_geo
339
380
- unit_test_predictions
340
381
- unit_test_storage
382
+ - fortify_scan
341
383
342
384
workflows :
343
385
build_test_deploy :
@@ -349,71 +391,76 @@ workflows:
349
391
- install_gems :
350
392
requires :
351
393
- checkout_code
352
- - build_test_amplify :
394
+ - fortify_scan :
395
+ context :
396
+ - amplify-swift-aws-s3-download
353
397
requires :
354
398
- install_gems
399
+ - build_test_amplify :
400
+ requires :
401
+ - fortify_scan
355
402
- build_test_aws_plugins_core :
356
403
requires :
357
- - install_gems
404
+ - fortify_scan
358
405
- build_amplify_spm :
359
406
requires :
360
- - install_gems
407
+ - fortify_scan
361
408
- plugin_unit_test :
362
409
name : unit_test_analytics
363
410
path : Analytics
364
411
workspace : AnalyticsCategoryPlugin
365
412
scheme : AWSPinpointAnalyticsPlugin
366
413
requires :
367
- - install_gems
414
+ - fortify_scan
368
415
- plugin_unit_test :
369
416
name : unit_test_api
370
417
path : API
371
418
workspace : APICategoryPlugin
372
419
scheme : AWSAPICategoryPlugin
373
420
requires :
374
- - install_gems
421
+ - fortify_scan
375
422
- plugin_unit_test :
376
423
name : unit_test_auth
377
424
path : Auth
378
425
workspace : AWSCognitoAuthPlugin
379
426
scheme : AWSCognitoAuthPlugin
380
427
requires :
381
- - install_gems
428
+ - fortify_scan
382
429
- plugin_unit_test :
383
430
name : unit_test_datastore
384
431
path : DataStore
385
432
workspace : DataStoreCategoryPlugin
386
433
scheme : AWSDataStoreCategoryPlugin
387
434
requires :
388
- - install_gems
435
+ - fortify_scan
389
436
- plugin_unit_test :
390
437
name : unit_test_geo
391
438
path : Geo
392
439
workspace : GeoCategoryPlugin
393
440
scheme : AWSLocationGeoPlugin
394
441
requires :
395
- - install_gems
442
+ - fortify_scan
396
443
- plugin_unit_test :
397
444
name : unit_test_core_ml
398
445
path : Predictions
399
446
workspace : PredictionsCategoryPlugin
400
447
scheme : CoreMLPredictionsPlugin
401
448
requires :
402
- - install_gems
449
+ - fortify_scan
403
450
- plugin_unit_test :
404
451
name : unit_test_predictions
405
452
path : Predictions
406
453
workspace : PredictionsCategoryPlugin
407
454
scheme : AWSPredictionsPlugin
408
455
requires :
409
- - install_gems
456
+ - fortify_scan
410
457
- plugin_unit_test :
411
458
name : unit_test_storage
412
459
path : Storage
413
460
workspace : StoragePlugin
414
461
scheme : AWSS3StoragePlugin
415
462
requires :
416
- - install_gems
463
+ - fortify_scan
417
464
- deploy :
418
465
name : deploy unstable
419
466
<< : *deploy_requires
0 commit comments