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

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


The following commit(s) were added to refs/heads/main by this push:
     new 82bd926  Perform a docker login before starting the actions runner 
script (#27)
82bd926 is described below

commit 82bd9269d01705bed4044215d2be52b57b5227f8
Author: Ash Berlin-Taylor <[email protected]>
AuthorDate: Mon May 10 11:47:42 2021 +0100

    Perform a docker login before starting the actions runner script (#27)
    
    This was done in the cloud-init, but missed from the migration to packer
    build scripts.
---
 github-runner-ami/packer/files/runner-cleanup-workdir.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/github-runner-ami/packer/files/runner-cleanup-workdir.sh 
b/github-runner-ami/packer/files/runner-cleanup-workdir.sh
index 7a1e8e8..41ae1c7 100644
--- a/github-runner-ami/packer/files/runner-cleanup-workdir.sh
+++ b/github-runner-ami/packer/files/runner-cleanup-workdir.sh
@@ -16,10 +16,16 @@
 # specific language governing permissions and limitations
 # under the License.
 
+set -eu -o pipefail
 echo "Left-over containers:"
 docker ps -a
 docker ps -qa | xargs --verbose --no-run-if-empty docker rm -fv
 
+echo "Log in to a paid docker user to get unlimited docker pulls"
+aws ssm get-parameter --with-decryption --name 
/runners/apache/airflow/dockerPassword | \
+    jq .Parameter.Value -r | \
+    sudo -u runner docker login --username airflowcirunners --password-stdin
+
 if [[ -d ~runner/actions-runner/_work/airflow/airflow ]]; then
     cd ~runner/actions-runner/_work/airflow/airflow
 

Reply via email to