Skip to content

Commit

Permalink
Update short hash and add init release version; add healthcheck and e…
Browse files Browse the repository at this point in the history
…xpose required ports
  • Loading branch information
fierlion committed Aug 16, 2022
1 parent 2b080e8 commit 01c4372
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion agent-container/agent-config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"author":"Amazon Web Services, Inc.","config":{"Cmd":["/agent"],"ArgsEscaped":true},"created":"~~timestamp~~","history":[{"created":"~~timestamp~~","author":"Amazon Web Services, Inc.","created_by":"°o°","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:~~digest~~"]}}
{"author":"Amazon Web Services, Inc.","config":{"Cmd":["/agent"],"ArgsEscaped":true},"created":"~~timestamp~~","config":{"ExposedPorts":{"51678/tcp":{},"51679/tcp":{}},"Healthcheck":{"Test":["CMD","/agent","--healthcheck"]}},"history":[{"created":"~~timestamp~~","author":"Amazon Web Services, Inc.","created_by":"°o°","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:~~digest~~"]}}
2 changes: 1 addition & 1 deletion buildspecs/merge-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ phases:

# Git short sha - used to name artifacts and make release json
# This variable is exported
- GIT_COMMIT_SHORT_SHA=$(git rev-parse --short HEAD)
- GIT_COMMIT_SHORT_SHA=$(git rev-parse --short=8 HEAD)

# Different names of under which tar is released
- ECS_AGENT_TAR="ecs-agent-v${AGENT_VERSION}.tar"
Expand Down
4 changes: 4 additions & 0 deletions buildspecs/release-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ phases:
- RELEASE_DATE=$(date +'%Y%m%d')

# Prepare agent.json config file
# TODO initStagingConfig.release version configurable
- |
cat << EOF > agent.json
{
"agentReleaseVersion" : "$AGENT_VERSION",
"releaseDate" : "$RELEASE_DATE",
"initStagingConfig" {
"release": "1"
},
"agentStagingConfig": {
"releaseGitSha": "$GIT_COMMIT_SHA",
"releaseGitShortSha": "$GIT_COMMIT_SHORT_SHA",
Expand Down
2 changes: 1 addition & 1 deletion scripts/verify-agent-artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

AGENT_VERSION="${1:-}"
BUCKET_NAME="${2:-}"
SHA=$(git rev-parse --short HEAD)
SHA=$(git rev-parse --short=8 HEAD)

usage() {
echo "Usage: ${0} AGENT_VERSION BUCKET_NAME"
Expand Down

0 comments on commit 01c4372

Please sign in to comment.