You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by as...@apache.org on 2021/03/11 12:01:15 UTC

[airflow-ci-infra] branch add-env-var-on-self-hosted-runners created (now 1bba69f)

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

ash pushed a change to branch add-env-var-on-self-hosted-runners
in repository https://gitbox.apache.org/repos/asf/airflow-ci-infra.git.


      at 1bba69f  Add an environment variable to let runners know where they are running

This branch includes the following new commits:

     new 1bba69f  Add an environment variable to let runners know where they are running

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[airflow-ci-infra] 01/01: Add an environment variable to let runners know where they are running

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ash pushed a commit to branch add-env-var-on-self-hosted-runners
in repository https://gitbox.apache.org/repos/asf/airflow-ci-infra.git

commit 1bba69f7c3c6939e4042f51a2a517549738ed23f
Author: Ash Berlin-Taylor <as...@firemirror.com>
AuthorDate: Thu Mar 11 12:00:23 2021 +0000

    Add an environment variable to let runners know where they are running
    
    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