@@ -320,22 +320,11 @@ jobs:
320320 pipenv run python --version
321321 - run-black_linter
322322
323- packer-linting_vbox :
324- docker :
325- - image : ' hashicorp/packer:light'
326- steps :
327- - attach_workspace :
328- at : /tmp/packer_workspace
329- - checkout
330- - submodule-sync
331- - run : cp -v /tmp/packer_workspace/* .
332- - run : packer version
333- - packer-lint :
334- template-file : kali-template.json
335- vars-file : variables.json
336- only-builder : virtualbox-iso
337-
338- packer-linting_vmware :
323+ packer-linting :
324+ parameters :
325+ hypervisor :
326+ description : hypervisor to validate
327+ type : string
339328 docker :
340329 - image : ' hashicorp/packer:light'
341330 steps :
@@ -348,22 +337,8 @@ jobs:
348337 - packer-lint :
349338 template-file : kali-template.json
350339 vars-file : variables.json
351- only-builder : vmware-iso
340+ only-builder : ' << parameters.hypervisor >> '
352341
353- packer-linting_aws :
354- docker :
355- - image : ' hashicorp/packer:light'
356- steps :
357- - attach_workspace :
358- at : /tmp/packer_workspace
359- - checkout
360- - submodule-sync
361- - run : cp -v /tmp/packer_workspace/* .
362- - run : packer version
363- - packer-lint :
364- template-file : templates/template.json
365- vars-file : templates/example-variables.json
366- only-builder : amazon-ebs
367342
368343 terraform-linting :
369344 # executor: terraform/default
@@ -373,7 +348,7 @@ jobs:
373348 - run : terraform --version
374349 # linting the packet terraform files
375350 - terraform-lint :
376- code-path : ci/packet_terraform-cloud
351+ code-path : ci/packet_terraform-cloud-build_all
377352 # linting the aws terraform files
378353 # - terraform-lint:
379354 # code-path: ci/kali_aws_info
@@ -493,7 +468,7 @@ jobs:
493468 steps :
494469 - run : terraform --version
495470 - terraform-deploy :
496- code-path : ci/packet_terraform-cloud
471+ code-path : ci/packet_terraform-cloud-build_all
497472
498473
499474 terraform-packet_destroy :
@@ -502,7 +477,7 @@ jobs:
502477 steps :
503478 - run : terraform --version
504479 - terraform-destroy :
505- code-path : ci/packet_terraform-cloud
480+ code-path : ci/packet_terraform-cloud-build_all
506481
507482 ansible-bootstrap :
508483 docker :
@@ -520,6 +495,10 @@ jobs:
520495 ansible-packer_build :
521496 docker :
522497 - image : ' elrey741/ansible-playbook_packet:alpine'
498+ parameters :
499+ build :
500+ description : build target for packer to hit
501+ type : string
523502 steps :
524503 - ansible-prep
525504 - add_ssh_keys :
@@ -538,7 +517,7 @@ jobs:
538517 command : |
539518 ansible-playbook -i ci/scripts/packet_net.py -u root \
540519 -e "api_key_from_env=${TEXTBELT_KEY:-} phone_from_env=${PERSONAL_NUM:-}" \
541- -e CIRCLECI="${CIRCLECI:-}" ci/packer_build.yml
520+ -e CIRCLECI="${CIRCLECI:-}" ci/packer_build.yml --limit="packer-build-box-<< parameters.build >>"
542521 - run : |
543522 mkdir -p /tmp/artifacts
544523 pwd && ls
@@ -567,18 +546,10 @@ workflows:
567546 - ansible-linting
568547 - generate-packer-file
569548 - generate-packer-vars
570- - packer-linting_vbox :
571- requires :
572- - generate-packer-vars
573- - generate-packer-file
574- - shellcheck-warning
575- - shfmt-linting
576- - terraform-linting
577- - markdown-linting
578- - gh_issues-linting
579- - python-linting
580- - ansible-linting
581- - packer-linting_vmware :
549+ - packer-linting :
550+ matrix :
551+ parameters :
552+ hypervisor : [ "virtualbox-iso", "vmware-iso", "qemu" ]
582553 requires :
583554 - generate-packer-vars
584555 - generate-packer-file
@@ -591,12 +562,14 @@ workflows:
591562 - ansible-linting
592563 - terraform-packet_deploy :
593564 requires :
594- - packer-linting_vbox
595- - packer-linting_vmware
565+ - packer-linting
596566 - ansible-bootstrap :
597567 requires :
598568 - terraform-packet_deploy
599569 - ansible-packer_build :
570+ matrix :
571+ parameters :
572+ build : [ "v", "qemu" ]
600573 requires :
601574 - ansible-bootstrap
602575 - terraform-packet_destroy :
@@ -659,11 +632,10 @@ workflows:
659632 ignore :
660633 - master
661634 - dev-stage
662- - packer-linting_vbox :
663- requires :
664- - generate-packer-vars
665- - generate-packer-file
666- - packer-linting_vmware :
635+ - packer-linting :
636+ matrix :
637+ parameters :
638+ hypervisor : [ "virtualbox-iso", "vmware-iso", "qemu" ]
667639 requires :
668640 - generate-packer-vars
669641 - generate-packer-file
@@ -715,18 +687,10 @@ workflows:
715687 branches :
716688 only :
717689 - master
718- - packer-linting_vbox :
719- requires :
720- - generate-packer-vars
721- - generate-packer-file
722- - shellcheck-warning
723- - shfmt-linting
724- - terraform-linting
725- - markdown-linting
726- - gh_issues-linting
727- - python-linting
728- - ansible-linting
729- - packer-linting_vmware :
690+ - packer-linting :
691+ matrix :
692+ parameters :
693+ hypervisor : [ "virtualbox-iso", "vmware-iso", "qemu" ]
730694 requires :
731695 - generate-packer-vars
732696 - generate-packer-file
@@ -739,12 +703,14 @@ workflows:
739703 - ansible-linting
740704 - terraform-packet_deploy :
741705 requires :
742- - packer-linting_vbox
743- - packer-linting_vmware
706+ - packer-linting
744707 - ansible-bootstrap :
745708 requires :
746709 - terraform-packet_deploy
747710 - ansible-packer_build :
711+ matrix :
712+ parameters :
713+ build : [ "v", "qemu" ]
748714 requires :
749715 - ansible-bootstrap
750716 - terraform-packet_destroy :
@@ -801,18 +767,10 @@ workflows:
801767 branches :
802768 only :
803769 - dev-stage
804- - packer-linting_vbox :
805- requires :
806- - generate-packer-vars
807- - generate-packer-file
808- - shellcheck-warning
809- - shfmt-linting
810- - terraform-linting
811- - markdown-linting
812- - gh_issues-linting
813- - python-linting
814- - ansible-linting
815- - packer-linting_vmware :
770+ - packer-linting :
771+ matrix :
772+ parameters :
773+ hypervisor : [ "virtualbox-iso", "vmware-iso", "qemu" ]
816774 requires :
817775 - generate-packer-vars
818776 - generate-packer-file
@@ -825,12 +783,14 @@ workflows:
825783 - ansible-linting
826784 - terraform-packet_deploy :
827785 requires :
828- - packer-linting_vbox
829- - packer-linting_vmware
786+ - packer-linting
830787 - ansible-bootstrap :
831788 requires :
832789 - terraform-packet_deploy
833790 - ansible-packer_build :
791+ matrix :
792+ parameters :
793+ build : [ "v", "qemu" ]
834794 requires :
835795 - ansible-bootstrap
836796 - terraform-packet_destroy :
0 commit comments