diff --git a/hooks/post-command b/hooks/post-command index 336f5df..a425a8a 100755 --- a/hooks/post-command +++ b/hooks/post-command @@ -18,13 +18,13 @@ if [[ $ACTION == "push_image" ]];then if [[ "$BK_BRANCH" == "$BUILDKITE_PIPELINE_DEFAULT_BRANCH" ]]; then echo "$BUILDKITE_PIPELINE_DEFAULT_BRANCH test image " BK_BRANCH="test-$BK_BRANCH" - push_image --account_id $AWS_ACCOUNT_ID --app $APP --tag test + push_image --account_id $ACCOUNT_ID --app $APP --tag test fi - + if [[ "$HAS_DB_IMAGE" == "true" ]]; then echo "DB image" BK_BRANCH="database-$INITIAL_BK_BRANCH" - push_image --account_id $AWS_ACCOUNT_ID --app $APP --tag database + push_image --account_id $ACCOUNT_ID --app $APP --tag database fi fi elif [[ $ACTION == "push_param" ]];then diff --git a/hooks/pre-command b/hooks/pre-command index 8f51d89..e09372f 100755 --- a/hooks/pre-command +++ b/hooks/pre-command @@ -37,7 +37,7 @@ export TARGET_TAG="${BUILDKITE_PLUGIN_SBC_SHARED_TARGET_TAG:-}" set -u export DOCKER_TAG="${BUILDKITE_PLUGIN_SBC_SHARED_TAG:-application}" -export HAS_DB_IMAGE="${BUILDKITE_PLUGIN_SBC_SHARED_HAS_DB_IMAGE:-false}" +export HAS_DB_IMAGE="${BUILDKITE_PLUGIN_SBC_SHARED_DB_IMAGE:-false}" # copy scripts to be used by pipeline in order to be invoked within a docker container. ACTION="$BUILDKITE_PLUGIN_SBC_SHARED_ACTION" diff --git a/plugin.yml b/plugin.yml index ca7786d..2aa91d9 100644 --- a/plugin.yml +++ b/plugin.yml @@ -21,6 +21,8 @@ configuration: type: string gem_host: type: string + db_image: + type: boolean required: - action additionalProperties: false \ No newline at end of file