Skip to content

Commit

Permalink
fix file modes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanking authored and czimergebot committed Aug 1, 2018
1 parent f9d1c56 commit 692ea2c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 15 deletions.
5 changes: 1 addition & 4 deletions apply/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,7 @@ func applyTree(source *packr.Box, dest afero.Fs, targetBasePath string, siccMode
return errors.Wrap(e, "unable to format HCL")
}
}
// Some output files need to be executable, but we lose all file mode info
// when the files get put in a Box. This is a blunt instrument to make
// sure those work
return dest.Chmod(target, 0744)
return nil
})
}

Expand Down
4 changes: 2 additions & 2 deletions templates/account/Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ docker_base = \
docker run -it --rm -e HOME=/home -v $$HOME/.aws:/home/.aws -v $(REPO_ROOT):/repo \
-e GIT_SSH_COMMAND='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
-e TF_PLUGIN_CACHE_DIR="/repo/.terraform.d/plugin-cache" -e TF="$(TF)" \
-w /repo/$(REPO_RELATIVE_PATH) $(TF_VARS) $$($(REPO_ROOT)/scripts/docker-ssh-mount.sh)
-w /repo/$(REPO_RELATIVE_PATH) $(TF_VARS) $$(sh $(REPO_ROOT)/scripts/docker-ssh-mount.sh)
docker_terraform = $(docker_base) chanzuckerberg/terraform:{{ .TerraformVersion }}
docker_sh = $(docker_base) --entrypoint='/bin/sh' chanzuckerberg/terraform:{{ .TerraformVersion }}

Expand Down Expand Up @@ -62,7 +62,7 @@ check-plan: init get ssh-forward
fi

ssh-forward:
$(REPO_ROOT)/scripts/docker-ssh-forward.sh
sh $(REPO_ROOT)/scripts/docker-ssh-forward.sh

run:
$(docker_terraform) $(CMD)
Expand Down
4 changes: 2 additions & 2 deletions templates/component/Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ docker_base = \
docker run -it --rm -e HOME=/home -v $$HOME/.aws:/home/.aws -v $(REPO_ROOT):/repo \
-e GIT_SSH_COMMAND='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
-e TF_PLUGIN_CACHE_DIR="/repo/.terraform.d/plugin-cache" -e TF="$(TF)" \
-w /repo/$(REPO_RELATIVE_PATH) $(TF_VARS) $$($(REPO_ROOT)/scripts/docker-ssh-mount.sh)
-w /repo/$(REPO_RELATIVE_PATH) $(TF_VARS) $$(sh $(REPO_ROOT)/scripts/docker-ssh-mount.sh)
docker_terraform = $(docker_base) chanzuckerberg/terraform:{{ .TerraformVersion }}
docker_sh = $(docker_base) --entrypoint='/bin/sh' chanzuckerberg/terraform:{{ .TerraformVersion }}

Expand Down Expand Up @@ -62,7 +62,7 @@ check-plan: init get ssh-forward
fi

ssh-forward:
$(REPO_ROOT)/scripts/docker-ssh-forward.sh
sh $(REPO_ROOT)/scripts/docker-ssh-forward.sh

run:
$(docker_terraform) $(CMD)
Expand Down
4 changes: 2 additions & 2 deletions templates/global/Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ docker_base = \
docker run -it --rm -e HOME=/home -v $$HOME/.aws:/home/.aws -v $(REPO_ROOT):/repo \
-e GIT_SSH_COMMAND='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
-e TF_PLUGIN_CACHE_DIR="/repo/.terraform.d/plugin-cache" -e TF="$(TF)" \
-w /repo/$(REPO_RELATIVE_PATH) $(TF_VARS) $$($(REPO_ROOT)/scripts/docker-ssh-mount.sh)
-w /repo/$(REPO_RELATIVE_PATH) $(TF_VARS) $$(sh $(REPO_ROOT)/scripts/docker-ssh-mount.sh)
docker_terraform = $(docker_base) chanzuckerberg/terraform:{{ .TerraformVersion }}
docker_sh = $(docker_base) --entrypoint='/bin/sh' chanzuckerberg/terraform:{{ .TerraformVersion }}

Expand Down Expand Up @@ -62,7 +62,7 @@ check-plan: init get ssh-forward
fi

ssh-forward:
$(REPO_ROOT)/scripts/docker-ssh-forward.sh
sh $(REPO_ROOT)/scripts/docker-ssh-forward.sh

run:
$(docker_terraform) $(CMD)
Expand Down
2 changes: 1 addition & 1 deletion templates/module/Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ docker_base = \
docker run -it --rm -e HOME=/home -v $$HOME/.aws:/home/.aws -v $(REPO_ROOT):/repo \
-e GIT_SSH_COMMAND='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
-e TF_PLUGIN_CACHE_DIR="/repo/.terraform.d/plugin-cache" -e TF="$(TF)" \
-w /repo/$(REPO_RELATIVE_PATH) $(TF_VARS) $$($(REPO_ROOT)/scripts/docker-ssh-mount.sh)
-w /repo/$(REPO_RELATIVE_PATH) $(TF_VARS) $$(sh $(REPO_ROOT)/scripts/docker-ssh-mount.sh)
docker_terraform = $(docker_base) chanzuckerberg/terraform:{{ .TerraformVersion }}
docker_sh = $(docker_base) --entrypoint='/bin/sh' chanzuckerberg/terraform:{{ .TerraformVersion }}

Expand Down
5 changes: 1 addition & 4 deletions templates/repo/Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ ACCOUNTS={{ .Accounts | dict | keys | sortAlpha | join " "}}

figlet_docker = docker run -it --rm mbentley/figlet

all: setup lint

setup:
./scripts/install_or_update.sh brew packer
all: check

lint: lint-terraform

Expand Down

0 comments on commit 692ea2c

Please sign in to comment.