Skip to content

Commit f6e1f36

Browse files
sd109MoteHue
authored andcommitted
Force colourful Ansible output in github example workflow (azimuth-cloud#183)
1 parent cc9b1eb commit f6e1f36

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.github-deploy-prod.yml.sample

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# This example workflow can be used to perform manually-triggered Azimuth deployments targeting production environments.
22
# The workflow requires a GitHub environment (https://docs.github.com/en/actions/using-jobs/using-environments-for-jobs) to
3-
# be created in the site-specific config repo with a name which exactly matches the azimuth-config environment to be used
4-
# for production deployments. For security, this GitHub environment should also have a deployment protection rule which
5-
# restricts the environment workflows to only run on the main/default branch. This ensures that production deployments
3+
# be created in the site-specific config repo with a name which exactly matches the azimuth-config environment to be used
4+
# for production deployments. For security, this GitHub environment should also have a deployment protection rule which
5+
# restricts the environment workflows to only run on the main/default branch. This ensures that production deployments
66
# cannot be executed from arbitrary branches which could contain incorrect or unreviewed configuration.
77
#
8-
# A manually-triggered workflow is used here since GitHub does not allow deployment approval rules for environments in
8+
# A manually-triggered workflow is used here since GitHub does not allow deployment approval rules for environments in
99
# private GitHub repos without a GitHub Enterprise subscription. If the site-specific config repo is public, or if an enterprise
10-
# subscription is available, then triggering the workflow on push to main with additional approval rules in the environment is
10+
# subscription is available, then triggering the workflow on push to main with additional approval rules in the environment is
1111
# the recommended approach.
12-
#
12+
#
1313
# The site-specific config repo must also define a repository secret named GIT_CRYPT_KEY_B64 which contains the base64 encoded
1414
# git-crypt key which was used to encrypt the repository's secrets. This can be obtained by running `git-crypt export-key - | base64`
1515
# from within an unlocked checkout of the repository. For information on defining GitHub repo secrets, see:
@@ -18,7 +18,7 @@
1818
name: Azimuth deployment
1919
on:
2020
workflow_dispatch:
21-
inputs:
21+
inputs:
2222
environment:
2323
description: "The Azimuth config environment to deploy"
2424
type: environment
@@ -40,6 +40,8 @@ jobs:
4040

4141
- name: Deploy Azimuth
4242
shell: bash
43+
env:
44+
ANSIBLE_FORCE_COLOR: True
4345
# Here we just decrypt the repo checkout then follow the steps from the Azimuth deployment docs.
4446
# The GitHub repo should have an environment configured with a name which matches the Azimuth config environment.
4547
# This GitHub environment should also have a branch protection rule which only allows deployments on chosen production branch (e.g. main).

.github-deploy-staging.yml.sample

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This example workflow can be adapted to perform automated Azimuth deployments targeting staging or test environments.
22
# The `azimuth-config-env-name` variable in the `env` section below should be set to name of the Azimuth config environment
33
# to be deployed.
4-
#
4+
#
55
# The site-specific config repo must also define a repository secret named GIT_CRYPT_KEY_B64 which contains the base64 encoded
66
# git-crypt key which was used to encrypt the repository's secrets. This can be obtained by running `git-crypt export-key - | base64`
77
# from within an unlocked checkout of the repository. For information on defining GitHub repo secrets, see:
@@ -30,6 +30,8 @@ jobs:
3030

3131
- name: Deploy Azimuth
3232
shell: bash
33+
env:
34+
ANSIBLE_FORCE_COLOR: True
3335
# Here we just decrypt the repo checkout then follow the steps from the Azimuth deployment docs.
3436
run: |
3537
set -e

0 commit comments

Comments
 (0)