Skip to content

Conversation

kayman-mk
Copy link
Collaborator

Description

Adds a new variable runners_docker_options which holds all values for the [runners.docker] section and makes the single variables

  • runners_image
  • runners_privileged
  • runners_disable_cache
  • runners_additional_volumes
  • runners_shm_size
  • runners_docker_runtime
  • runners_helper_image
  • runners_pull_policy

obsolete.

Migrations required

Yes, as the minimum Terraform version is 1.3.0 to support optional block variables with defaults.

A migration script is provided to restructure the variables. See /migrations/migrate-to-7-0-0.sh. Attention Mac users: The script will not work out of the box as the sed implementation is different. Use a Docker container with Alpine or Ubuntu to run the script.

module "gitlab_ci_runner" {
  ...
  runners_docker_options {
    # set whatever is necessary
  }

Verification

  • Use current configuration and ensure that the config.toml remains unchanged
  • Set all new block variables and ensure that the config.toml is valid (use `gitlab-runner verify)
  • Check that the default settings with Terraform 1.3 work as expected
  • Verify all docker settings against the documentation to ensure correct names

The runner starts in both cases and is available in Gitlab. No example tested but used our active configuration at Hapag-Lloyd.

kayman-mk and others added 12 commits March 2, 2023 09:37
## Description

Removes the earlier deprecated `runners_pull_policy` variable. Since were making a Major release I thought this one was nice to catch.

## Migrations required

YES. Replace the `runners_pull_policy` by `runners_pull_policies`.
@kayman-mk kayman-mk changed the base branch from main to refactor-variables March 16, 2023 19:11
@kayman-mk kayman-mk force-pushed the kayma/network-mode-1 branch from 761ffb6 to 704785e Compare March 16, 2023 19:17
@github-actions
Copy link
Contributor

🦙 MegaLinter status: ❌ ERROR

Descriptor Linter Files Fixed Errors Elapsed time
✅ BASH bash-exec 1 0 0.0s
✅ BASH shellcheck 1 0 0.04s
✅ BASH shfmt 1 1 0 0.02s
✅ COPYPASTE jscpd yes no 1.16s
⚠️ MARKDOWN markdownlint 1 0 1 0.95s
✅ MARKDOWN markdown-link-check 1 0 6.5s
✅ REPOSITORY checkov yes no 17.78s
✅ REPOSITORY devskim yes no 0.63s
✅ REPOSITORY dustilock yes no 0.03s
✅ REPOSITORY gitleaks yes no 0.62s
✅ REPOSITORY git_diff yes no 0.02s
✅ REPOSITORY secretlint yes no 0.95s
✅ REPOSITORY syft yes no 0.3s
❌ SPELL cspell 10 22 5.92s
✅ TERRAFORM checkov 7 0 22.8s
❌ TERRAFORM kics 7 3 308.18s
✅ TERRAFORM terraform-fmt 7 0 0 0.35s
❌ TERRAFORM terrascan yes 1 3.87s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@kayman-mk
Copy link
Collaborator Author

Just to check the branch after messed up with Hapag-Lloyd:kayma/network-mode. See #511

@kayman-mk kayman-mk closed this Mar 16, 2023
@kayman-mk kayman-mk deleted the kayma/network-mode-1 branch June 15, 2023 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants