Skip to content

Commit d993add

Browse files
authored
Merge pull request #1862 from gruntwork-io/james/oss-3982-control-release-of-docs-updates-prior-to-v2
docs: point examples and links at v1.0.1 instead of main
2 parents d067225 + c5cda51 commit d993add

9 files changed

Lines changed: 26 additions & 22 deletions

File tree

docs/_config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ description: >- # this means to ignore newlines until "baseurl:"
2929
baseurl: "" # the subpath of your site, e.g. /blog
3030
full_company_name: "Gruntwork, Inc"
3131
thumbnail_path: "/assets/img/terratest-thumbnail.png"
32+
# The Git ref (tag) that documentation examples and "View on GitHub" links point at.
33+
# Keep this on the latest GA release so users copy stable, released code rather than
34+
# whatever is currently on `main`. Update this and github_api_url below on each GA release.
35+
stable_ref: v1.0.1
3236
repository: "github.com/gruntwork-io/terratest"
3337
twitter_username: https://twitter.com/gruntwork_io
3438
github_username: https://github.com/gruntwork-io
3539

36-
github_api_url: https://raw.githubusercontent.com/gruntwork-io/terratest/main
40+
github_api_url: https://raw.githubusercontent.com/gruntwork-io/terratest/v1.0.1
3741

3842
# Build settings
3943
# theme: minima

docs/_data/examples.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
default: true
1010
learn_more:
1111
- name: Terraform Hello, World
12-
url: https://github.com/gruntwork-io/terratest/tree/main/examples/terraform-hello-world-example
12+
url: https://github.com/gruntwork-io/terratest/tree/v1.0.1/examples/terraform-hello-world-example
1313

1414
- id: packer-hello-world
1515
name: Packer Hello, World Example
@@ -22,7 +22,7 @@
2222
default: true
2323
learn_more:
2424
- name: Packer Hello, World
25-
url: https://github.com/gruntwork-io/terratest/tree/main/examples/packer-hello-world-example
25+
url: https://github.com/gruntwork-io/terratest/tree/v1.0.1/examples/packer-hello-world-example
2626

2727
- id: docker-hello-world
2828
name: Docker Hello, World Example
@@ -36,7 +36,7 @@
3636
default: true
3737
learn_more:
3838
- name: Docker Hello, World
39-
url: https://github.com/gruntwork-io/terratest/tree/main/examples/docker-hello-world-example
39+
url: https://github.com/gruntwork-io/terratest/tree/v1.0.1/examples/docker-hello-world-example
4040

4141
- id: kubernetes-hello-world
4242
name: Kubernetes Hello, World Example
@@ -49,7 +49,7 @@
4949
default: true
5050
learn_more:
5151
- name: Kubernetes Hello, World
52-
url: https://github.com/gruntwork-io/terratest/tree/main/examples/kubernetes-hello-world-example
52+
url: https://github.com/gruntwork-io/terratest/tree/v1.0.1/examples/kubernetes-hello-world-example
5353

5454
- id: terragrunt-hello-world
5555
name: Terragrunt Example
@@ -64,9 +64,9 @@
6464
default: true
6565
learn_more:
6666
- name: Terragrunt Unit
67-
url: https://github.com/gruntwork-io/terratest/tree/main/examples/terragrunt-example
67+
url: https://github.com/gruntwork-io/terratest/tree/v1.0.1/examples/terragrunt-example
6868
- name: Terragrunt Stack
69-
url: https://github.com/gruntwork-io/terratest/tree/main/examples/terragrunt-multi-module-example
69+
url: https://github.com/gruntwork-io/terratest/tree/v1.0.1/examples/terragrunt-multi-module-example
7070

7171
- id: aws-hello-world
7272
name: AWS Hello, World Example
@@ -79,7 +79,7 @@
7979
default: true
8080
learn_more:
8181
- name: AWS Hello, World
82-
url: https://github.com/gruntwork-io/terratest/tree/main/examples/terraform-aws-hello-world-example
82+
url: https://github.com/gruntwork-io/terratest/tree/v1.0.1/examples/terraform-aws-hello-world-example
8383

8484
- id: gcp-hello-world
8585
name: GCP Hello, World Example
@@ -92,7 +92,7 @@
9292
default: true
9393
learn_more:
9494
- name: GCP Hello, World
95-
url: https://github.com/gruntwork-io/terratest/tree/main/examples/terraform-gcp-hello-world-example
95+
url: https://github.com/gruntwork-io/terratest/tree/v1.0.1/examples/terraform-gcp-hello-world-example
9696

9797
- id: azure-basic
9898
name: Azure Hello, World Example
@@ -109,7 +109,7 @@
109109
default: true
110110
learn_more:
111111
- name: Terraform Azure Example
112-
url: https://github.com/gruntwork-io/terratest/tree/main/examples/azure/terraform-azure-example
112+
url: https://github.com/gruntwork-io/terratest/tree/v1.0.1/examples/azure/terraform-azure-example
113113

114114
- id: opa-terraform
115115
name: OPA Terraform Example
@@ -126,7 +126,7 @@
126126
default: true
127127
learn_more:
128128
- name: Terraform OPA Example
129-
url: https://github.com/gruntwork-io/terratest/tree/main/examples/terraform-opa-example
129+
url: https://github.com/gruntwork-io/terratest/tree/v1.0.1/examples/terraform-opa-example
130130

131131
- id: client-factory
132132
name: Azure Client Factory

docs/_docs/01_getting-started/packages-overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ nav_title_link: /docs/
1111
---
1212

1313
Now that you've had a chance to browse the examples and their tests, here's an overview of the packages you'll find in
14-
Terratest's [modules folder](https://github.com/gruntwork-io/terratest/tree/main/modules) and how they can help you test different types infrastructure:
14+
Terratest's [modules folder](https://github.com/gruntwork-io/terratest/tree/{{ site.stable_ref }}/modules) and how they can help you test different types infrastructure:
1515

1616
{:.doc-styled-table}
1717
| Package | Description |
@@ -25,7 +25,7 @@ Terratest's [modules folder](https://github.com/gruntwork-io/terratest/tree/main
2525
| **httphelper** | Functions for making HTTP requests. Examples: make an HTTP request to a URL and check the status code and body contain the expected values, run a simple HTTP server locally. |
2626
| **k8s** | Functions that make it easier to work with Kubernetes. Examples: Getting the list of nodes in a cluster, waiting until all nodes in a cluster is ready. |
2727
| **logger** | A replacement for Go's `t.Log` and `t.Logf` that writes the logs to `stdout` immediately, rather than buffering them until the very end of the test. This makes debugging and iterating easier. |
28-
| **logger/parser** | Includes functions for parsing out interleaved go test output and piecing out the individual test logs. Used by the [terratest_log_parser](https://github.com/gruntwork-io/terratest/tree/main/cmd/terratest_log_parser) command. |
28+
| **logger/parser** | Includes functions for parsing out interleaved go test output and piecing out the individual test logs. Used by the [terratest_log_parser](https://github.com/gruntwork-io/terratest/tree/{{ site.stable_ref }}/cmd/terratest_log_parser) command. |
2929
| **packer** | Functions for working with Packer. Examples: run a Packer build and return the ID of the artifact that was created. |
3030
| **random** | Functions for generating random data. Examples: generate a unique ID that can be used to namespace resources so multiple tests running in parallel don't clash. |
3131
| **retry** | Functions for retrying actions. Examples: retry a function up to a maximum number of retries, retry a function until a stop function is called, wait up to a certain timeout for a function to complete. These are especially useful when working with distributed systems and eventual consistency. |

docs/_docs/01_getting-started/quick-start.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ types of infrastructure code you can test (e.g., Packer, Kubernetes, etc).
2626

2727
1. Create an `examples` and `test` folder.
2828

29-
1. Copy the folder including all the files from the [basic terraform example](https://github.com/gruntwork-io/terratest/tree/main/examples/terraform-basic-example/) into the `examples` folder.
29+
1. Copy the folder including all the files from the [basic terraform example](https://github.com/gruntwork-io/terratest/tree/{{ site.stable_ref }}/examples/terraform-basic-example/) into the `examples` folder.
3030

31-
1. Copy the [basic terraform example test](https://github.com/gruntwork-io/terratest/blob/main/test/terraform_basic_example_test.go) into the `test` folder.
31+
1. Copy the [basic terraform example test](https://github.com/gruntwork-io/terratest/blob/{{ site.stable_ref }}/test/terraform_basic_example_test.go) into the `test` folder.
3232

3333
1. To configure dependencies, run:
3434

docs/_docs/01_getting-started/testing-terragrunt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,5 @@ For Terragrunt [stacks](https://terragrunt.gruntwork.io/docs/features/stacks/):
9494
## Further Reading
9595

9696
- [Terragrunt Documentation](https://terragrunt.gruntwork.io/)
97-
- [Stack example](https://github.com/gruntwork-io/terratest/tree/main/examples/terragrunt-multi-module-example)
97+
- [Stack example](https://github.com/gruntwork-io/terratest/tree/{{ site.stable_ref }}/examples/terragrunt-multi-module-example)
9898
- [terragrunt package reference](https://pkg.go.dev/github.com/gruntwork-io/terratest/modules/terragrunt)

docs/_docs/02_testing-best-practices/iterating-locally-using-docker.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ Here are some techniques we use with Docker:
1919

2020
- If your script is used in a Packer template, add a [Docker
2121
builder](https://www.packer.io/docs/builders/docker.html) to the template so you can create a Docker image from the
22-
same code. See the [Packer Docker Example](https://github.com/gruntwork-io/terratest/tree/main/examples/packer-docker-example) for working sample code.
22+
same code. See the [Packer Docker Example](https://github.com/gruntwork-io/terratest/tree/{{ site.stable_ref }}/examples/packer-docker-example) for working sample code.
2323

2424
- We have prebuilt Docker images for major Linux distros that have many important dependencies (e.g., curl, vim,
25-
tar, sudo) already installed. See the [test-docker-images folder](https://github.com/gruntwork-io/terratest/tree/main/test-docker-images) for more details.
25+
tar, sudo) already installed. See the [test-docker-images folder](https://github.com/gruntwork-io/terratest/tree/{{ site.stable_ref }}/test-docker-images) for more details.
2626

2727
- Create a `docker-compose.yml` to make it easier to run your Docker image with all the ports, environment variables,
28-
and other settings it needs. See the [Packer Docker Example](https://github.com/gruntwork-io/terratest/tree/main/examples/packer-docker-example) for working sample code.
28+
and other settings it needs. See the [Packer Docker Example](https://github.com/gruntwork-io/terratest/tree/{{ site.stable_ref }}/examples/packer-docker-example) for working sample code.
2929

3030
- With scripts in Docker, you can replace _some_ real-world dependencies with mocks! One way to do this is to create
3131
some "mock scripts" and to bind-mount them in `docker-compose.yml` in a way that replaces the real dependency. For

docs/_docs/02_testing-best-practices/iterating-locally-using-test-stages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ each time you change a single line of code can be very slow.
2323

2424
This is where Terratest's `teststructure` package comes in handy: it allows you to explicitly break up your tests into
2525
stages and to be able to disable any one of those stages by setting an environment variable. Check out the
26-
[terraform_packer_example_test.go](https://github.com/gruntwork-io/terratest/blob/main/test/terraform_packer_example_test.go)
26+
[terraform_packer_example_test.go](https://github.com/gruntwork-io/terratest/blob/{{ site.stable_ref }}/test/terraform_packer_example_test.go)
2727
for working sample code.
2828

2929
## How to skip stages

docs/_includes/examples/example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
{% unless include.skip_view_on_github %}
5959
<div class="example__file-link">
6060
<p>View on GitHub:</p>
61-
<a href="https://{{ site.repository }}/tree/main{{ file.url }}">{{ site.repository }}{{ file.url }}</a>
61+
<a href="https://{{ site.repository }}/tree/{{ site.stable_ref }}{{ file.url }}">{{ site.repository }}{{ file.url }}</a>
6262
</div>
6363
{% endunless %}
6464
</div>

docs/_includes/examples/explorer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{% if include.example_id == nil %}
2727
<div class="hidden-navs__static-links">
2828
<a
29-
href="https://github.com/gruntwork-io/terratest/tree/main/examples"
29+
href="https://github.com/gruntwork-io/terratest/tree/{{ site.stable_ref }}/examples"
3030
class="examples__nav-item static-link nav-{{ example.id }}"
3131
target="_blank"
3232
>

0 commit comments

Comments
 (0)