Merge branch 'main' into feature/circleci-labs
This commit is contained in:
@@ -18,7 +18,7 @@ In this lab you will build upon the `dry-run` command to override Valet's defaul
|
||||
You will be performing a `dry-run` command to inspect the workflow that is converted by default. Run the following command within the codespace terminal:
|
||||
|
||||
```bash
|
||||
gh valet dry-run gitlab --output-dir tmp --namespace valet --project terraform-example
|
||||
gh valet dry-run gitlab --output-dir tmp/dry-run --namespace valet --project terraform-example
|
||||
```
|
||||
|
||||
The converted workflow that is generated by the above command can be seen below:
|
||||
@@ -95,7 +95,7 @@ This method can use any valid ruby syntax and should return a `Hash` that repres
|
||||
Now you can perform another `dry-run` command and use the `--custom-transformers` CLI option to provide this custom transformer. Run the following command within your codespace terminal:
|
||||
|
||||
```bash
|
||||
gh valet dry-run gitlab --output-dir tmp --namespace valet --project terraform-example --custom-transformers transformers.rb
|
||||
gh valet dry-run gitlab --output-dir tmp/dry-run --namespace valet --project terraform-example --custom-transformers transformers.rb
|
||||
```
|
||||
|
||||
The converted workflow that is generated by the above command will now use the custom logic for the `artifacts.terraform` step.
|
||||
@@ -119,7 +119,7 @@ end
|
||||
|
||||
You can also use custom transformers to edit the values of environment variables in converted workflows. In this example, you will update the `PLAN_JSON` environment variable to be `custom_plan.json` instead of `plan.json`.
|
||||
|
||||
To do this, add the following code to the `transformers.rb` file.
|
||||
To do this, add the following code at the top of the `transformers.rb` file.
|
||||
|
||||
```ruby
|
||||
env "PLAN_JSON", "custom_plan.json"
|
||||
|
||||
@@ -33,10 +33,6 @@ else
|
||||
docker exec -it gitlab update-permissions &> /dev/null
|
||||
fi
|
||||
|
||||
# allow valet to talk to GitLab by removing network isolation between containers
|
||||
export DOCKER_ARGS="--network=host"
|
||||
`grep -q "export DOCKER_ARGS=" ~/.bashrc || echo 'export DOCKER_ARGS="--network=host"' >> ~/.bashrc`
|
||||
|
||||
echo -e "Waiting for GitLab to be ready. This might take a while \U23F0"
|
||||
until $(curl --output /dev/null --silent --head --fail http://localhost); do
|
||||
printf '.'
|
||||
|
||||
Reference in New Issue
Block a user