Skip to content

Commit

Permalink
style: format hcl files
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanadelacuesta committed Dec 3, 2024
1 parent d2d6c94 commit eaed7a8
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 37 deletions.
16 changes: 8 additions & 8 deletions enos/enos-quality-upgrade.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,42 @@
# SPDX-License-Identifier: BUSL-1.1

quality "nomad_agent_info" {
description = "A GET call to /v1/agent/members returns the correct number of
description = "A GET call to /v1/agent/members returns the correct number of
running servers and they are all alive"
}

quality "nomad_agent_info_self" {
description = "A GET call to /v1/agent/self against every server returns the
description = "A GET call to /v1/agent/self against every server returns the
same last_log_index for all of them."
}

quality "nomad_nodes_status" {
description = "A GET call to /v1/nodes returns the correct number of clients
description = "A GET call to /v1/nodes returns the correct number of clients
and they are all `eligible` and `ready`".
}

quality "nomad_job_status" {
description = "A GET call to /v1/jobs returns the correct number of jobs and
description = "A GET call to /v1/jobs returns the correct number of jobs and
they are all `running`".
}

quality "nomad_register_job" {
description = "A POST call to /v1/jobs results in a new job running and
description = "A POST call to /v1/jobs results in a new job running and
allocations being started accordingly."
}

quality "nomad_reschedule_alloc" {
description = "A POST / PUT call to /v1/allocation/:alloc_id/stop results in
description = "A POST / PUT call to /v1/allocation/:alloc_id/stop results in
the stopped allocation being rescheduled"
}


quality "nomad_restore_snapshot" {
description = "A node can be restored from a snapshot built on a previous
description = "A node can be restored from a snapshot built on a previous
version"
}

quality "nomad_allocs_status" {
description = "A GET call to /v1/allocs returns the correct number of
description = "A GET call to /v1/allocs returns the correct number of
allocations and they are all `running`".
}
28 changes: 14 additions & 14 deletions enos/enos-scenario-upgrade.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
# SPDX-License-Identifier: BUSL-1.1

scenario "upgrade" {
description = <<-EOF
description = <<-EOF
The upgrade scenario verifies in-place upgrades between previously released versions of Nomad
against another candidate build.
EOF

matrix {
arch = ["amd64", "arm64"]
//service_discovery = ["consul", "nomad"]
distro = ["alpine", "fedora", "rhel","ubuntu"]
editions = ["ce", "ent"]
os = ["linux", "darwin", "windows"]
matrix {
arch = ["amd64", "arm64"]
//service_discovery = ["consul", "nomad"]
distro = ["alpine", "fedora", "rhel", "ubuntu"]
editions = ["ce", "ent"]
os = ["linux", "darwin", "windows"]
}

step "copy_binary" {
Expand All @@ -23,15 +23,15 @@ scenario "upgrade" {
module = module.build_artifactory

variables {
version = global.initial_version
artifactory_path = globals.artifact_path
artifact_token = globals.artifact_token
os = matrix.os
distro = matrix.os != "linux" ? var.distro : null
local_path = var.binary_local_path
version = global.initial_version
artifactory_path = globals.artifact_path
artifact_token = globals.artifact_token
os = matrix.os
distro = matrix.os != "linux" ? var.distro : null
local_path = var.binary_local_path
}
}
/*
/*
step "provision_cluster" {
description = <<-EOF
Using the binary from the previous step, provision a Nomad cluster using the e2e
Expand Down
4 changes: 2 additions & 2 deletions enos/modules/fetch_artifactory/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ locals {
}

arm64 = {
linux = "_linux_arm64.zip"
linux = "_linux_arm64.zip"
}
}
}

artifact_name = "nomad_${local.artifact_version}${local.package_extensions[var.arch][var.os]}"
}
18 changes: 9 additions & 9 deletions enos/modules/fetch_artifactory/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
terraform {
required_providers {
enos = {
source = "registry.terraform.io/hashicorp-forge/enos"
source = "registry.terraform.io/hashicorp-forge/enos"
}
}
}
Expand All @@ -17,17 +17,17 @@ data "enos_artifactory_item" "nomad" {
path = local.path
name = local.artifact_name
properties = tomap({
"commit" = var.revision
"product-name" = var.edition == "ce" ? "nomad" : "nomad-enterprise"
"commit" = var.revision
"product-name" = var.edition == "ce" ? "nomad" : "nomad-enterprise"
})
}

resource "enos_local_exec" "install_binary" {
environment = {
URL = data.enos_artifactory_item.nomad.results[0].url
BINARY_PATH = var.binary_path
TOKEN = var.artifactory_token
}
environment = {
URL = data.enos_artifactory_item.nomad.results[0].url
BINARY_PATH = var.binary_path
TOKEN = var.artifactory_token
}

scripts = [abspath("${path.module}/scripts/install.sh")]
scripts = [abspath("${path.module}/scripts/install.sh")]
}
4 changes: 2 additions & 2 deletions enos/modules/fetch_artifactory/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ output "local_binary" {
output "vault_artifactory_release" {
description = "Binary information returned from the artifactory"
value = {
url = data.enos_artifactory_item.nomad.results[0].url
sha256 = data.enos_artifactory_item.nomad.results[0].sha256
url = data.enos_artifactory_item.nomad.results[0].url
sha256 = data.enos_artifactory_item.nomad.results[0].sha256
}
}
4 changes: 2 additions & 2 deletions enos/modules/fetch_artifactory/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ variable "revision" {
variable "os" {
type = string
description = "The operative system the binary is needed for"
default = "linux"
default = "linux"
}

variable "product_version" {
Expand All @@ -56,5 +56,5 @@ variable "arch" {
variable "binary_path" {
description = "The path to donwload and unzip the binary"
type = string
default = "/home/ubuntu/nomad"
default = "/home/ubuntu/nomad"
}

0 comments on commit eaed7a8

Please sign in to comment.