Skip to content

Commit

Permalink
Merge pull request #13 from armory/feat/add_context_override
Browse files Browse the repository at this point in the history
feat(context_overrides): Add context override support
  • Loading branch information
th3morg authored May 6, 2022
2 parents 5d8d573 + abfdcaf commit 8930dd7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
clientId: "${{ secrets.CLIENTID }}" # Encrypted client ID that you created in the Armory Cloud Console that has been encrypted with GitHub's encrypted secrets.
clientSecret: "${{ secrets.CLIENTSECRET }}" #Client secret that you created in the Armory Cloud Console that has been encrypted with GitHub's encrypted secrets.
path-to-file: "/path/to/deployment.yaml" # Path to the deployment file. For more information, see the Create a deployment file section.
applicationName: "app1" # Application name for deployment
addContext: "image=nginx,version=1.0" # Add context parameters to be used in the deployment steps in a key=value comma delimited list

```

Expand Down
4 changes: 4 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
applicationName:
description: 'extra args to the deployment start command'
required: false
addContext:
description: 'extra context params to the deployment start command'
required: false
clientId:
description: 'ClientId for Armory Cloud'
required: true
Expand Down Expand Up @@ -44,3 +47,4 @@ runs:
args:
- ${{ inputs.path-to-file }}
- ${{ inputs.applicationName }}
- ${{ inputs.addContext }}
9 changes: 7 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

EXTRA_ARGS=""
if [ -n "${2}" ]; then
EXTRA_ARGS="--application=${2}"
EXTRA_ARGS=" --application=${2}"
fi

armory deploy start "${EXTRA_ARGS}" --file "${1}"
if [ -n "${3}" ]; then
EXTRA_ARGS="${EXTRA_ARGS} --add-context=${3}"
fi

armory version
armory deploy start ${EXTRA_ARGS} --file "${1}"

0 comments on commit 8930dd7

Please sign in to comment.