Automated builds of the following go-ipfs fork below using a Google Cloud Build trigger,
- GitHub: github.com/k3karthic/go-ipfs
- Codeberg: codeberg.org/k3karthic/go-ipfs
The build pipeline consists of the following steps,
- Build the ipfs binary using the Dockerfile from the fork
- Store the binary in a Google Cloud Storage bucket
- GitHub: github.com/k3karthic/terraform__ipfs-build-s3
- Codeberg: codeberg.org/k3karthic/terraform__ipfs-build-s3
- Enable the Cloud Build API from the Settings screen
- Connect to GitHub from the Manage Repositories screen and add k3karthic/go-ipfs repository
Update the Terraform input variables in ipfs.tfvars
,
- gcs_name — Name of the Google storage bucket which will store the built ipfs binary
- gcs_location — GCS location of the bucket
- gcs_storage_class — Storage class for the bucket
Google provider documentation is at registry.terraform.io/providers/hashicorp/google/latest/docs.
Google Cloud Shell can deploy this script without configuration.
Step 1: Use the following command to create a Terraform plan,
$ ./bin/plan.sh
To avoid fetching the latest state of resources, use the following command,
$ ./bin/plan.sh -refresh=false
Step 2: Review the plan using the following command,
$ ./bin/view.sh
Step 3: Apply the plan using the following command,
$ ./bin/apply.sh
Encrypt sensitive files (Terraform input variables and state) before saving them. .gitignore
must contain the unencrypted file paths.
Use the following command to decrypt the files after cloning the repository,
$ ./bin/decrypt.sh
Use the following command after running bin/apply.sh
to encrypt the updated state files,
$ ./bin/encrypt.sh <gpg key id>