mirror of
https://github.com/typeable/octopod.git
synced 2024-08-17 02:30:35 +03:00
Merge branch 'develop' into new-control-scripts
This commit is contained in:
commit
1c46244647
@ -97,9 +97,9 @@ in
|
|||||||
failScript = pkgs.writeScript "fail.sh" ''
|
failScript = pkgs.writeScript "fail.sh" ''
|
||||||
#!${pkgs.bash}/bin/bash
|
#!${pkgs.bash}/bin/bash
|
||||||
|
|
||||||
1>&2 echo "You did something wrong :("
|
echo "You did something wrong :("
|
||||||
|
|
||||||
echo "You did something wrong, but you shouldn't see this."
|
1>&2 echo "You did something wrong, but you shouldn't see this."
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
'';
|
'';
|
||||||
@ -144,9 +144,9 @@ in
|
|||||||
export CONFIG_CHECKING_COMMAND=${echoScript}
|
export CONFIG_CHECKING_COMMAND=${echoScript}
|
||||||
export INFO_COMMAND=${infoScript}
|
export INFO_COMMAND=${infoScript}
|
||||||
export NOTIFICATION_COMMAND=${writeScript}
|
export NOTIFICATION_COMMAND=${writeScript}
|
||||||
export DEPLOYMENT_OVERRIDES_COMMAND=${infoScript}
|
export DEPLOYMENT_CONFIG_COMMAND=${infoScript}
|
||||||
export DEPLOYMENT_KEYS_COMMAND=${infoScript}
|
export DEPLOYMENT_KEYS_COMMAND=${infoScript}
|
||||||
export APPLICATION_OVERRIDES_COMMAND=${infoScript}
|
export APPLICATION_CONFIG_COMMAND=${infoScript}
|
||||||
export APPLICATION_KEYS_COMMAND=${infoScript}
|
export APPLICATION_KEYS_COMMAND=${infoScript}
|
||||||
export UNARCHIVE_COMMAND=${writeScript}
|
export UNARCHIVE_COMMAND=${writeScript}
|
||||||
export POWER_AUTHORIZATION_HEADER="123"
|
export POWER_AUTHORIZATION_HEADER="123"
|
||||||
|
@ -187,9 +187,9 @@ runOctopodServer sha = do
|
|||||||
archiveCheckingCmd <- Command . pack <$> getEnvOrDie "ARCHIVE_CHECKING_COMMAND"
|
archiveCheckingCmd <- Command . pack <$> getEnvOrDie "ARCHIVE_CHECKING_COMMAND"
|
||||||
tagCheckingCmd <- Command . pack <$> getEnvOrDie "CONFIG_CHECKING_COMMAND"
|
tagCheckingCmd <- Command . pack <$> getEnvOrDie "CONFIG_CHECKING_COMMAND"
|
||||||
infoCmd <- Command . pack <$> getEnvOrDie "INFO_COMMAND"
|
infoCmd <- Command . pack <$> getEnvOrDie "INFO_COMMAND"
|
||||||
dOverridesCmd <- Command . pack <$> getEnvOrDie "DEPLOYMENT_OVERRIDES_COMMAND"
|
dOverridesCmd <- Command . pack <$> getEnvOrDie "DEPLOYMENT_CONFIG_COMMAND"
|
||||||
dKeysCmd <- Command . pack <$> getEnvOrDie "DEPLOYMENT_KEYS_COMMAND"
|
dKeysCmd <- Command . pack <$> getEnvOrDie "DEPLOYMENT_KEYS_COMMAND"
|
||||||
aOverridesCmd <- Command . pack <$> getEnvOrDie "APPLICATION_OVERRIDES_COMMAND"
|
aOverridesCmd <- Command . pack <$> getEnvOrDie "APPLICATION_CONFIG_COMMAND"
|
||||||
aKeysCmd <- Command . pack <$> getEnvOrDie "APPLICATION_KEYS_COMMAND"
|
aKeysCmd <- Command . pack <$> getEnvOrDie "APPLICATION_KEYS_COMMAND"
|
||||||
unarchiveCmd <- Command . pack <$> getEnvOrDie "UNARCHIVE_COMMAND"
|
unarchiveCmd <- Command . pack <$> getEnvOrDie "UNARCHIVE_COMMAND"
|
||||||
powerAuthorizationHeader <- AuthHeader . BSC.pack <$> getEnvOrDie "POWER_AUTHORIZATION_HEADER"
|
powerAuthorizationHeader <- AuthHeader . BSC.pack <$> getEnvOrDie "POWER_AUTHORIZATION_HEADER"
|
||||||
@ -1109,11 +1109,11 @@ upsertDeploymentMetadatum dName dMetadata =
|
|||||||
failIfImageNotFound :: Deployment -> AppM ()
|
failIfImageNotFound :: Deployment -> AppM ()
|
||||||
failIfImageNotFound dep = do
|
failIfImageNotFound dep = do
|
||||||
cfg <- getDeploymentConfig dep
|
cfg <- getDeploymentConfig dep
|
||||||
(ec, _, Stderr err, _) <- runCommandArgs configCheckingCommand =<< configCheckCommandArgs cfg dep
|
(ec, Stdout out, _, _) <- runCommandArgs configCheckingCommand =<< configCheckCommandArgs cfg dep
|
||||||
case ec of
|
case ec of
|
||||||
ExitSuccess -> pure ()
|
ExitSuccess -> pure ()
|
||||||
ExitFailure _ ->
|
ExitFailure _ ->
|
||||||
throwError err400 {errBody = BSL.fromStrict $ T.encodeUtf8 err}
|
throwError err400 {errBody = BSL.fromStrict $ T.encodeUtf8 out}
|
||||||
|
|
||||||
-- | Helper to create an application-level error.
|
-- | Helper to create an application-level error.
|
||||||
appError :: Text -> BSL.ByteString
|
appError :: Text -> BSL.ByteString
|
||||||
|
@ -255,5 +255,5 @@ overridesArgs (Config cc) =
|
|||||||
$ cc
|
$ cc
|
||||||
where
|
where
|
||||||
argumentName = case knownOverrideLevel @l of
|
argumentName = case knownOverrideLevel @l of
|
||||||
ApplicationLevel -> "--app-env-override"
|
ApplicationLevel -> "--application-config"
|
||||||
DeploymentLevel -> "--deployment-override"
|
DeploymentLevel -> "--deployment-config"
|
||||||
|
Loading…
Reference in New Issue
Block a user