This is an automated email from the ASF dual-hosted git repository.

ash pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow-ci-infra.git


The following commit(s) were added to refs/heads/master by this push:
     new 6ff5ba5  Add an environment variable to let runners know where they 
are running (#7)
6ff5ba5 is described below

commit 6ff5ba5fe5c25e5d51f4a38f84156f91e3865a0d
Author: Ash Berlin-Taylor <[email protected]>
AuthorDate: Thu Mar 11 12:18:07 2021 +0000

    Add an environment variable to let runners know where they are running (#7)
    
    This makes it easier to set runs-on in our ci.yml workflow
---
 cloud-init.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cloud-init.yml b/cloud-init.yml
index a2c1e63..b52aedd 100644
--- a/cloud-init.yml
+++ b/cloud-init.yml
@@ -39,6 +39,8 @@ runcmd:
     - |
       set -exu -o pipefail
       echo "AWS_DEFAULT_REGION=$(cloud-init query region)" >> /etc/environment
+      # Set an env var (that is visible in runners) that will let us know we 
are on a self-hosted runner
+      echo 'AIRFLOW_SELF_HOSTED_RUNNER="[\"self-hosted\"]"' >> /etc/environment
       set -a
       . /etc/environment
       set +a

Reply via email to