Move env_tags under env key

Instead of:

```
env:
  CLEAR_TAG: untagged
env_tags:
  tag1:
    CLEAR_TAG: tagged
```

We'll have:

```
env:
  clear:
    CLEAR_TAG: untagged
  tags:
    tag1:
      CLEAR_TAG: tagged
```
This commit is contained in:
Donal McBreen
2024-05-15 10:19:22 +01:00
parent f98380ef0c
commit f48c227768
7 changed files with 44 additions and 34 deletions

View File

@@ -5,11 +5,13 @@ class ConfigurationEnvTagsTest < ActiveSupport::TestCase
@deploy = {
service: "app", image: "dhh/app", registry: { "username" => "dhh", "password" => "secret" },
servers: [ { "1.1.1.1" => "odd" }, { "1.1.1.2" => "even" }, { "1.1.1.3" => [ "odd", "three" ] } ],
env: { "REDIS_URL" => "redis://x/y", "THREE" => "false" },
env_tags: {
"odd" => { "TYPE" => "odd" },
"even" => { "TYPE" => "even" },
"three" => { "THREE" => "true" }
env: {
"clear" => { "REDIS_URL" => "redis://x/y", "THREE" => "false" },
"tags" => {
"odd" => { "TYPE" => "odd" },
"even" => { "TYPE" => "even" },
"three" => { "THREE" => "true" }
}
}
}
@@ -27,9 +29,11 @@ class ConfigurationEnvTagsTest < ActiveSupport::TestCase
}
}
},
env_tags: {
"odd" => { "TYPE" => "odd" },
"oddjob" => { "TYPE" => "oddjob" }
env: {
"tags" => {
"odd" => { "TYPE" => "odd" },
"oddjob" => { "TYPE" => "oddjob" }
}
}
})
@@ -60,9 +64,11 @@ class ConfigurationEnvTagsTest < ActiveSupport::TestCase
deploy = {
service: "app", image: "dhh/app", registry: { "username" => "dhh", "password" => "secret" },
servers: [ { "1.1.1.1" => [ "first", "second" ] } ],
env_tags: {
"first" => { "TYPE" => "first" },
"second" => { "TYPE" => "second" }
env: {
"tags" => {
"first" => { "TYPE" => "first" },
"second" => { "TYPE" => "second" }
}
}
}
@@ -76,8 +82,10 @@ class ConfigurationEnvTagsTest < ActiveSupport::TestCase
deploy = {
service: "app", image: "dhh/app", registry: { "username" => "dhh", "password" => "secret" },
servers: [ { "1.1.1.1" => "secrets" } ],
env_tags: {
"secrets" => { "secret" => [ "PASSWORD" ] }
env: {
"tags" => {
"secrets" => { "secret" => [ "PASSWORD" ] }
}
}
}
@@ -91,8 +99,10 @@ class ConfigurationEnvTagsTest < ActiveSupport::TestCase
deploy = {
service: "app", image: "dhh/app", registry: { "username" => "dhh", "password" => "secret" },
servers: [ { "1.1.1.1" => "clearly" } ],
env_tags: {
"clearly" => { "clear" => { "FOO" => "bar" } }
env: {
"tags" => {
"clearly" => { "clear" => { "FOO" => "bar" } }
}
}
}