From 1da3e2c71151a94c2d516aaf6fb385cbbcf14564 Mon Sep 17 00:00:00 2001 From: Cory Schwartz Date: Wed, 30 Mar 2022 22:27:18 -0700 Subject: [PATCH] copy packer_build source --- .circleci/config.yml | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1e1979480..e441227bc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,6 @@ version: 2.1 orbs: go: gotest/tools@0.0.13 aws-cli: circleci/aws-cli@1.3.2 - packer: salaxander/packer@0.0.3 executors: golang: @@ -75,6 +74,26 @@ commands: command: | git fetch --all + packer_build: + description: "Run a packer build" + parameters: + template: + description: | + The name of the packer template file + type: string + default: packer.json + args: + description: | + Arguments to pass to the packer build command + type: string + default: "" + + steps: + - run: + name: "Run a packer build" + command: packer build << parameters.args >> << parameters.template >> + no_output_timeout: 30m + jobs: mod-tidy-check: executor: golang @@ -694,9 +713,9 @@ jobs: - checkout - attach_workspace: at: "." - - packer/build: + - packer_build: template: tools/packer/lotus.pkr.hcl - args: "-debug -var ci_workspace_bins=./linux -var lotus_network=mainnet -var git_tag=$CIRCLE_TAG" + args: "-var ci_workspace_bins=./linux -var lotus_network=mainnet -var git_tag=$CIRCLE_TAG" publish-packer-calibrationnet: description: build and push AWS IAM and DigitalOcean droplet. executor: @@ -706,9 +725,9 @@ jobs: - checkout - attach_workspace: at: "." - - packer/build: + - packer_build: template: tools/packer/lotus.pkr.hcl - args: "-debug -var ci_workspace_bins=./linux-calibrationnet -var lotus_network=calibrationnet -var git_tag=$CIRCLE_TAG" + args: "-var ci_workspace_bins=./linux-calibrationnet -var lotus_network=calibrationnet -var git_tag=$CIRCLE_TAG" publish-packer-butterflynet: description: build and push AWS IAM and DigitalOcean droplet. executor: @@ -718,9 +737,9 @@ jobs: - checkout - attach_workspace: at: "." - - packer/build: + - packer_build: template: tools/packer/lotus.pkr.hcl - args: "-debug -var ci_workspace_bins=./linux-butterflynet -var lotus_network=butterflynet -var git_tag=$CIRCLE_TAG" + args: "-var ci_workspace_bins=./linux-butterflynet -var lotus_network=butterflynet -var git_tag=$CIRCLE_TAG" publish-packer-snap: description: build packer image with snap. mainnet only. executor: @@ -730,9 +749,8 @@ jobs: - checkout - attach_workspace: at: "." - - packer/build: + - packer_build: template: tools/packer/lotus-snap.pkr.hcl - args: "-debug" publish-dockerhub: description: publish to dockerhub machine: