Skip to content

Commit

Permalink
CI: reinstate expect-deployment until it has been removed
Browse files Browse the repository at this point in the history
  • Loading branch information
JonJagger committed Feb 10, 2024
1 parent 136e214 commit 4f2ed8c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build_test_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

source "${ROOT_DIR}/sh/on_ci_publish_images.sh"
source "${ROOT_DIR}/sh/kosli_trails.sh"
source "${ROOT_DIR}/sh/kosli.sh"
source "${ROOT_DIR}/sh/echo_versioner_env_vars.sh"
export $(echo_versioner_env_vars)

Expand Down
20 changes: 20 additions & 0 deletions sh/kosli_trails.sh → sh/kosli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,26 @@ on_ci_kosli_assert_artifact()
fi
}

# - - - - - - - - - - - - - - - - - - -
# Until cyber-dojo/reusable-actions-workflows/.github/workflows/kosli_deploy.yml@v0.0.5 is updated
# this is still needed, even though [expect deployment] is no longer needed for snapshot compliance.
kosli_expect_deployment()
{
local -r environment="${1}"
local -r hostname="${2}"
local -r api_token="${3}"

# In .github/workflows/main.yml deployment is its own job
# and the image must be present to get its sha256 fingerprint.
docker pull "$(artifact_name)"

kosli expect deployment "$(artifact_name)" \
--artifact-type=docker \
--description="Deployed to ${environment} in Github Actions pipeline" \
--environment="${environment}" \
--host="${hostname}" \
--api-token="${api_token}"
}

# - - - - - - - - - - - - - - - - - - -
artifact_name()
Expand Down

0 comments on commit 4f2ed8c

Please sign in to comment.