Remove the envify command

Instead of using `kamal envify` to generate the .env file, we now assume
that it will be in place for us.

Options in place of `kamal envify`:
1. Pre-generate the .env file
2. Create the env file in the `.pre-init` hook
3. Log into a secret store/check you are logged in in the pre-init hook
   Then use .dotenv command and variable substitution to interpolate the
   secrets.
This commit is contained in:
Donal McBreen
2024-07-30 17:26:45 +01:00
parent cbb4c87035
commit d2f57b1889
11 changed files with 8 additions and 93 deletions

View File

@@ -2,8 +2,6 @@ require_relative "integration_test"
class AccessoryTest < IntegrationTest
test "boot, stop, start, restart, logs, remove" do
kamal :envify
kamal :accessory, :boot, :busybox
assert_accessory_running :busybox

View File

@@ -2,8 +2,6 @@ require_relative "integration_test"
class AppTest < IntegrationTest
test "stop, start, boot, logs, images, containers, exec, remove" do
kamal :envify
kamal :deploy
assert_app_is_up

View File

@@ -4,8 +4,6 @@ class BrokenDeployTest < IntegrationTest
test "deploying a bad image" do
@app = "app_with_roles"
kamal :envify
first_version = latest_app_version
kamal :deploy

View File

@@ -1,2 +0,0 @@
SECRET_TOKEN='1234 with "中文"'
SECRET_TAG='TAGME'

View File

@@ -1 +0,0 @@
SECRET_TOKEN='1234 with "中文"'

View File

@@ -2,8 +2,6 @@ require_relative "integration_test"
class LockTest < IntegrationTest
test "acquire, release, status" do
kamal :envify
kamal :lock, :acquire, "-m 'Integration Tests'"
status = kamal :lock, :status, capture: true

View File

@@ -1,8 +1,8 @@
require_relative "integration_test"
class MainTest < IntegrationTest
test "envify, deploy, redeploy, rollback, details and audit" do
kamal :envify
test "env push, deploy, redeploy, rollback, details and audit" do
kamal :env, :push
assert_env_files
remove_local_env_file
@@ -45,7 +45,7 @@ class MainTest < IntegrationTest
test "app with roles" do
@app = "app_with_roles"
kamal :envify
kamal :env, :push
version = latest_app_version
@@ -65,7 +65,7 @@ class MainTest < IntegrationTest
end
test "config" do
config = YAML.load(kamal(:config, "-q", capture: true))
config = YAML.load(kamal(:config, capture: true))
version = latest_app_version
assert_equal [ "web" ], config[:roles]
@@ -87,7 +87,7 @@ class MainTest < IntegrationTest
kamal :remove, "-y"
assert_no_images_or_containers
kamal :envify
kamal :env, :push
kamal :setup
assert_images_and_containers

View File

@@ -2,8 +2,6 @@ require_relative "integration_test"
class TraefikTest < IntegrationTest
test "boot, reboot, stop, start, restart, logs, remove" do
kamal :envify
kamal :traefik, :boot
assert_traefik_running