git.iko.soy/typeable/octopod
on master help sign in
use the 'update' script from a container with utils for 'edit' and 'update' commands
commit005d8a2a3fb543dc8daa4c659ba0521418766eb2 authorAndrei Orlov <aaorlov1@gmail.com> dateMon 8 Jun 2020, 12:29 (6 years ago) parent7e0e82f
4 files changed+2−7
src/DMC.hs+1−1 src/DMS.hs+1−4 utils/b2b-utils/docker/Dockerfile−1 utils/b2b-utils/docker/build_docker.sh−1
src/DMC.hs+1−1
@@ -104,7 +104,7 @@ handleEdit dName = do
104104 envPairs <- editEnvs editor dEnvs
105105 response <- runClientM (editH dName envPairs) clientEnv
106106 handleResponse (const $ pure ()) response
107− Left err ->
107+ Left err ->
108108 P.print $ "request failed, reason: " <> show err
109109 Nothing -> error "environment variable $EDITOR not found"
110110
src/DMS.hs+1−4
@@ -43,7 +43,6 @@ data AppState = AppState
4343 , namespace :: Namespace
4444 , creation_command :: Command
4545 , update_command :: Command
46− , update_envs_command :: Command
4746 , deletion_command :: Command
4847 , checking_command :: Command }
4948
@@ -68,7 +67,6 @@ runDMS = do
6867 ns <- coerce . pack <$> getEnvOrDie "NAMESPACE"
6968 creation_cmd <- coerce . pack <$> getEnvOrDie "CREATION_COMMAND"
7069 update_cmd <- coerce . pack <$> getEnvOrDie "UPDATE_COMMAND"
71− update_envs_cmd <- coerce . pack <$> getEnvOrDie "UPDATE_ENVS_COMMAND"
7270 deletion_cmd <- coerce . pack <$> getEnvOrDie "DELETION_COMMAND"
7371 checking_cmd <- coerce . pack <$> getEnvOrDie "CHECKING_COMMAND"
7472 pgPool <- initConnectionPool (unDBConnectionString $ dmsDB opts) (unDBPoolSize $ dmsDBPoolSize opts)
@@ -79,7 +77,6 @@ runDMS = do
7977 ns
8078 creation_cmd
8179 update_cmd
82− update_envs_cmd
8380 deletion_cmd
8481 checking_cmd
8582 serverPort = dmsPort opts
@@ -285,7 +282,7 @@ updateH dName DeploymentUpdate { newTag = dTag, newEnvs = nEnvs } = do
285282 , "--name", coerce $ dName
286283 , "--tag", coerce $ dTag
287284 ] ++ concat [["--env", concatPair e] | e <- envPairs]
288− cmd = coerce $ update_envs_command st
285+ cmd = coerce $ update_command st
289286 liftIO $ do
290287 void $ updateDeploymentNameAndTag pgPool dName dTag
291288 log $ "call " <> unwords (cmd : args)
utils/b2b-utils/docker/Dockerfile−1
@@ -2,6 +2,5 @@ FROM busybox
22
33ADD tmp/create /utils/
44ADD tmp/update /utils/
5−ADD tmp/update_envs /utils/
65ADD tmp/delete /utils/
76ADD tmp/check /utils/
utils/b2b-utils/docker/build_docker.sh−1
@@ -4,7 +4,6 @@
44mkdir tmp
55cp ../target/x86_64-unknown-linux-musl/release/create ./tmp
66cp ../target/x86_64-unknown-linux-musl/release/update ./tmp
7−cp ../target/x86_64-unknown-linux-musl/release/update ./tmp/update_envs
87cp ../target/x86_64-unknown-linux-musl/release/delete ./tmp
98cp ../target/x86_64-unknown-linux-musl/release/check ./tmp
109