-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport release changes to v3.22 (#5913)
- Loading branch information
1 parent
5f3e398
commit a309645
Showing
10 changed files
with
429 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.terraform/ | ||
terraform.tfvars | ||
.terraform.tfstate.lock.info | ||
ssh_key | ||
ssh_key.pub | ||
terraform.tfstate | ||
terraform.tfstate.backup | ||
.terraform.lock.hcl | ||
bin/ | ||
.terraform.init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
include ../../metadata.mk | ||
include ../../lib.Makefile | ||
|
||
# We only ever release from the tip of a release branch. | ||
GIT_BRANCH?=$(git rev-parse HEAD) | ||
|
||
# Build a release from the currently checked out commit. | ||
# Uses SSH to run commands on the remote builder. | ||
release: .vm.created | ||
./remote-execute.sh "cd calico && git fetch --tags && git checkout $(GIT_BRANCH)" | ||
./remote-execute.sh "cd calico && make release" | ||
|
||
# Expects that a release has already been created on the remote VM via the "release" target. | ||
release-publish: .vm.created | ||
./remote-execute.sh "cd calico && make release-publish" | ||
|
||
# Create a VM using the given vars. | ||
VAR_FILE ?= terraform.tfvars | ||
apply: .vm.created | ||
.vm.created: .terraform.init | ||
./bin/terraform apply --auto-approve -var-file=$(VAR_FILE) && touch $@ | ||
|
||
# Destroy the VM. | ||
destroy: | ||
./bin/terraform destroy --auto-approve -var-file=$(VAR_FILE) | ||
rm -f .vm.created | ||
|
||
# Tear down any existing VM, and create a new one. | ||
rebuild: | ||
$(MAKE) destroy apply | ||
|
||
# Initialize the terraform install. | ||
.terraform.init: bin/terraform | ||
./bin/terraform init && touch $@ | ||
|
||
# Install the terraform binary. | ||
bin/terraform: bin/terraform.zip | ||
unzip bin/terraform.zip -d bin && touch $@ | ||
bin/terraform.zip: | ||
mkdir -p bin | ||
wget https://releases.hashicorp.com/terraform/1.1.7/terraform_1.1.7_linux_amd64.zip -O $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.