Skip to content

Commit

Permalink
Commons bump (#55)
Browse files Browse the repository at this point in the history
* Commons bump

* Fix README

* Var typo
  • Loading branch information
LeoDiazL authored Nov 1, 2023
1 parent 5b7bbce commit c827f93
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ The following inputs can be used as `steps.with` keys:
| `st2_auth_password` | string | | Password used by StackStorm standalone authentication. Set as a secret in GH Actions. |
| `st2_packs` | string |`"st2"` | Comma separated list of packs to install. If you modify this option, be sure to also include `st2` in the list. |
| `st2_ansible_extra_vars_file` | string | | Relative path from project root to Ansible vars file. If you'd like to adjust more advanced configuration; st2 version, st2.conf, RBAC, chatops, auth, etc. See https://github.com/stackStorm/ansible-st2#variables for the full list of settings. The Ansible vars will take higher precedence over the GHA inputs. |
| `st2_version_tag` | | Stackstorm Ansible release tag to use. See https://github.com/StackStorm/ansible-st2/releases |
| **Stack Management** |
| `tf_stack_destroy` | bool | `false` | Set to `true` to Destroy the created AWS infrastructure for this instance |
| `tf_state_file_name` | string | `tf-state-aws` | Change this to be anything you want to. Carefull to be consistent here. A missing file could trigger recreation, or stepping over destruction of non-defined objects. |
Expand Down Expand Up @@ -189,7 +190,7 @@ jobs:
steps:
- id: deploy-st2-advanced
name: Deploy StackStorm with extra Ansible vars
uses: bitovi/[email protected].0
uses: bitovi/[email protected].1
with:
aws_default_region: us-east-1
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID}}
Expand All @@ -209,7 +210,7 @@ We encourage to keep your infrastructure codified!
You can pass additional `BITOPS_` ENV variables to adjust the deployment behavior.
```yaml
- name: Deploy StackStorm to AWS (dry-run)
uses: bitovi/[email protected].0
uses: bitovi/[email protected].1
env:
# Extra BitOps configuration:
BITOPS_LOGGING_LEVEL: INFO
Expand Down
10 changes: 7 additions & 3 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ inputs:
description: 'Comma separated list of packs to install. If you modify this option, be sure to also include `st2` in the list.'
default: "st2"
st2_ansible_extra_vars_file:
description: "Relative path from project root to Ansible vars file. If you'd like to adjust more advanced configuration; st2 version, st2.conf, RBAC, chatops, auth, etc. See https://github.com/stackStorm/ansible-st2#variables for the full list of settings. The Ansible vars will take higher precedence over the GHA inputs."
description: "Relative path from project root to Ansible vars file. If you'd like to adjust more advanced configuration; st2 version, st2.conf, RBAC, chatops, auth, etc. See https://github.com/stackStorm/ansible-st2#variables for the full list of settings. The Ansible vars will take higher precedence over the GHA inputs."
required: false
st2_version_tag:
description: "Stackstorm Ansible release tag to use. See https://github.com/StackStorm/ansible-st2/releases"
required: false

# Stack Management
tf_stack_destroy:
Expand Down Expand Up @@ -159,14 +163,14 @@ runs:
- name: Deploy with BitOps
id: deploy
uses: bitovi/[email protected].5
uses: bitovi/[email protected].7
with:
# Current repo vars
gh_action_repo: ${{ github.action_path }}
gh_action_input_ansible: operations/deployment/ansible
gh_deployment_action_input_ansible_extra_vars_file: ${{ inputs.st2_ansible_extra_vars_file }}
checkout: ${{ inputs.checkout }}
bitops_extra_env_vars: -e ST2_AUTH_USERNAME=${{ inputs.st2_auth_username }} -e ST2_AUTH_PASSWORD=${{ inputs.st2_auth_password }}
bitops_extra_env_vars: -e ST2_AUTH_USERNAME=${{ inputs.st2_auth_username }} -e ST2_AUTH_PASSWORD=${{ inputs.st2_auth_password }} -e ST2_VERSION_TAG=${{ inputs.st2_version_tag }}
bitops_extra_env_vars_file: extra_env
ansible_skip : ${{ inputs.infrastructure_only }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ echo " Cloning..."
git clone https://github.com/StackStorm/ansible-st2 $ANSIBLE_DIR/ansible-st2
echo " Cloning...Done"

if [[ -n $ST2_VERSION_TAG ]]; then
echo " Switching to specific tag..."
cd $ANSIBLE_DIR/ansible-st2
git fetch --tags
git checkout $ST2_VERSION_TAG
echo " Switching to specific tag...Done"
fi

echo " Copying files from ansible-st2"

echo " $ANSIBLE_DIR/ansible-st2/roles/ -> $ANSIBLE_DIR/roles"
Expand Down

0 comments on commit c827f93

Please sign in to comment.