-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: reusable actions still point to .circleci dir so update .circleci…
…/merkely_log_deployment.sh
- Loading branch information
Showing
3 changed files
with
51 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash -Eeu | ||
|
||
pushd "${ROOT_DIR}/scripts" | ||
source "./config.sh" | ||
source "./echo_versioner_env_vars.sh" | ||
source "./merkely_echo_env_vars.sh" | ||
source "./merkely_fingerprint.sh" | ||
popd | ||
|
||
export $(echo_versioner_env_vars) | ||
export $(merkely_echo_env_vars) | ||
|
||
# - - - - - - - - - - - - - - - - - - - | ||
merkely_log_deployment() | ||
{ | ||
local -r environment="${1}" | ||
local -r hostname="${2}" | ||
|
||
docker run \ | ||
--env MERKELY_COMMAND=log_deployment \ | ||
--env MERKELY_OWNER=${MERKELY_OWNER} \ | ||
--env MERKELY_PIPELINE=${MERKELY_PIPELINE} \ | ||
--env MERKELY_FINGERPRINT=$(merkely_fingerprint) \ | ||
--env MERKELY_DESCRIPTION="Deployed to ${environment} in CircleCI pipeline" \ | ||
--env MERKELY_ENVIRONMENT="${environment}" \ | ||
--env MERKELY_CI_BUILD_URL=${CIRCLE_BUILD_URL} \ | ||
--env MERKELY_HOST="${hostname}" \ | ||
--env MERKELY_API_TOKEN=${MERKELY_API_TOKEN} \ | ||
--rm \ | ||
--volume /var/run/docker.sock:/var/run/docker.sock \ | ||
${MERKELY_CHANGE} | ||
} | ||
|
||
# - - - - - - - - - - - - - - - - - - - | ||
docker pull $(server_image):$(image_tag) | ||
|
||
kosli_log_deployment "${1}" https://staging.app.kosli.com | ||
kosli_log_deployment "${1}" https://app.kosli.com |