Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin refactor for v4 #101

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

plugin refactor for v4 #101

wants to merge 3 commits into from

Conversation

FalcoSuessgott
Copy link
Collaborator

@FalcoSuessgott FalcoSuessgott commented Jul 7, 2024

build {
  sources = [""]

  provisioner "goss" {

    # block specifying any goss download parameters. Goss is downloaded using curl and wget as a fallback installation method
    installation {
      # wether to use sudo for the curl/wget download; # optional; default:  false
      use_sudo = false

      # the goss version to download; optional; default: "latest"
      version = "latest"

      # the architecture to download; optional; default: "amd64"
      arch = "amd64"

      # the operating system to download; optional; default: "Linux", options: "Windows", "Linux"
      os = "Linux"

      # the url to download goss from; optional; default: "ttps://github.com/goss-org/goss/releases/download/{{ Version }}/goss-{{ Version }}-{{ Os }}-{{ Arch }}"
      url = ""

      # the checksum to verify the downloaded goss binary; optional; default: false
      skip_ssl = false

      # the path to download goss to; optional; default: "/tmp/goss-{{ Version }}-{{ Os }}-{{ Arch }}"
      download_path = ""

      # username for basic auth; optional; default: ""
      username = ""

      # password for basic auth; optional; default: ""
      password = ""

      # a map of any extra env vars to pass to the download request; optional; default: {}
      env_vars = {}

      # wether to skip the installation
      skip_installation = false
    }

    # block specifying any goss validate parameters
    validate {
      # wether to use sudo for the goss validate command; # optional; default:  false
      use_sudo = false

      # a goss vars file; optional; default: ""
      vars_file = ""

      # a gossfile; optional; default: "./goss.yaml"
      goss_file = ""

      # a map of any goss inline vars for rendering a gossfile; optional; default: {}
      vars_inline = {}

      # a map of any extra env vars to pass to the download request; optional; default: {}
      env_vars = {}

      # loglevel; optional; values: "TRACE", "DEBUG", "INFO", "WARN", "ERROR"
      log_level = ""

      # package type; optional; values: "apk", "dpkg", "pacman", "rpm"
      package = ""

      # a retry timeout for goss validate; optional; default: "0s"
      retry_timeut = ""

      # a sllep timeout for goss validate; optonal; default: "1s"
      sleep = ""

      # the goss test results format; optional; values: "documentation", "json", "json_oneline", "junit", "nagios", "nagios_verbose", "rspecish", "silent", "tap"
      format = ""

      # the goss test results format options; values; default: "perfdata", "verbose", "pretty"
      format_options = ""

      # where to write the goss test results to; optional; default: ""
      output_file = ""
    }
  }
}

@FalcoSuessgott FalcoSuessgott force-pushed the refactor branch 8 times, most recently from 080a90b to 1112d7e Compare July 7, 2024 04:16
@FalcoSuessgott
Copy link
Collaborator Author

FalcoSuessgott commented Jul 7, 2024

looking for volunteers to test if anyone has some time ...
@F21 do you have time to test this with me?

@FalcoSuessgott FalcoSuessgott marked this pull request as draft July 7, 2024 04:53
@FalcoSuessgott FalcoSuessgott force-pushed the refactor branch 11 times, most recently from 89c6c32 to b6b999a Compare July 8, 2024 03:58
@FalcoSuessgott FalcoSuessgott marked this pull request as ready for review July 8, 2024 03:59
@FalcoSuessgott FalcoSuessgott force-pushed the refactor branch 3 times, most recently from 5893fee to ad34599 Compare July 8, 2024 04:05
@FalcoSuessgott FalcoSuessgott changed the title Refactor plugin refactor for v4 Jul 8, 2024
@FalcoSuessgott FalcoSuessgott force-pushed the refactor branch 2 times, most recently from 5ac4893 to 98f2e91 Compare July 8, 2024 04:08
@FalcoSuessgott FalcoSuessgott force-pushed the refactor branch 9 times, most recently from 9e24fb0 to 83feed7 Compare July 9, 2024 12:27
@btassone
Copy link
Contributor

Wow. Massive change.

@FalcoSuessgott
Copy link
Collaborator Author

Wow. Massive change.

Somehwat yeah, the logic stays the sams (curl/wget download and goss validate invokation). Also added a lot of testing (acceptance and e2e. See github action test)

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.

Passing ENV variable to goss plugin
2 participants