generated from cloudposse-github-actions/composite-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new tests for custom fields * update test * update test * update test * update tests * update tests and docs
- Loading branch information
Showing
3 changed files
with
51 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,10 @@ jobs: | |
- env: dev | ||
expected-namespace: dev | ||
expected-cluster-role: arn:aws:iam::123456789012:role/my-gha-cluster-role | ||
- env: custom | ||
expected-foo: bar | ||
expected-namespace: dev | ||
expected-service-config-ssm-path: service/app/config/custom/app-ns | ||
env: [preview, preview-prs, production, dev] | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
|
@@ -61,6 +65,13 @@ jobs: | |
namespace: dev | ||
cluster-role: arn:aws:iam::123456789012:role/my-gha-cluster-role | ||
custom: | ||
cluster: dev | ||
namespace: dev | ||
cluster-role: foo | ||
service-config-ssm-path: service/app/config/custom/app-ns | ||
foo: bar | ||
- uses: nick-fields/assert-action@v1 | ||
with: | ||
actual: "${{ steps.current.outputs.namespace }}" | ||
|
@@ -72,6 +83,25 @@ jobs: | |
actual: "${{ steps.current.outputs.role }}" | ||
expected: '${{ matrix.expected-cluster-role }}' | ||
|
||
- name: Environment info | ||
uses: cloudposse/[email protected] | ||
id: result | ||
with: | ||
query: . | ||
config: ${{ steps.current.outputs.environment-config }} | ||
|
||
- uses: nick-fields/assert-action@v1 | ||
if: ${{ matrix.expected-foo }} | ||
with: | ||
actual: "${{ steps.result.outputs.foo }}" | ||
expected: '${{ matrix.expected-foo }}' | ||
|
||
- uses: nick-fields/assert-action@v1 | ||
if: ${{ matrix.expected-service-config-ssm-path }} | ||
with: | ||
actual: "${{ steps.result.outputs.service-config-ssm-path }}" | ||
expected: '${{ matrix.expected-service-config-ssm-path }}' | ||
|
||
teardown: | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
|
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 |
---|---|---|
|
@@ -110,10 +110,18 @@ With this action your `config` input can have several helper functions. | |
ssm-path: platform/staging-cluster | ||
``` | ||
* To get custom key value pairs you can query the selected environment with a follow up step: | ||
```yaml | ||
- name: Environment info | ||
uses: cloudposse/[email protected] | ||
id: environment-info | ||
with: | ||
query: . | ||
config: ${{ steps.result.outputs.environment-config }} | ||
``` | ||
Full Workflow example: | ||
<details><summary>Full Example:</summary> | ||
<details><summary> Full Workflow example:</summary> | ||
```yaml | ||
name: 'Environments - ArgoCD' | ||
|
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 |
---|---|---|
|
@@ -87,6 +87,16 @@ usage: |- | |
ssm-path: platform/staging-cluster | ||
``` | ||
* To get custom key value pairs you can query the selected environment with a follow up step: | ||
```yaml | ||
- name: Environment info | ||
uses: cloudposse/[email protected] | ||
id: environment-info | ||
with: | ||
query: . | ||
config: ${{ steps.result.outputs.environment-config }} | ||
``` | ||
<details><summary> Full Workflow example:</summary> | ||
|