You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/10/11 23:35:36 UTC

[airflow] 07/14: Add pypirc initialization (#11386)

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

potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 932b565a4e3e6305307b63498f747fc1546778eb
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Fri Oct 9 22:55:03 2020 +0200

    Add pypirc initialization (#11386)
    
    This PR needs to be merged first in order to handle the #11385
    which requires .pypirc to be created before dockerfile gets build.
    
    This means that the script change needs to be merged to master
    first in this PR.
    
    (cherry picked from commit e198077f3e54db1d0846c9583c009f7c0ae75209)
---
 .dockerignore                           |  1 +
 .gitignore                              | 19 ++++++++++++++++++-
 scripts/ci/libraries/_initialization.sh |  6 ++++++
 3 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/.dockerignore b/.dockerignore
index 7d29561..fb9c80e 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -54,6 +54,7 @@
 !NOTICE
 !.github
 !empty
+!.pypirc
 
 # Avoid triggering context change on README change (new companies using Airflow)
 # So please do not uncomment this line ;)
diff --git a/.gitignore b/.gitignore
index 4f6b451..27b6f0c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,7 +10,6 @@ secrets.py
 airflow.db
 unittests.db
 
-
 # Airflow temporary artifacts
 airflow/git_version
 airflow/www/static/coverage/
@@ -149,6 +148,8 @@ tramp
 # Spark
 rat-results.txt
 
+# Git stuff
+.gitattributes
 # Kubernetes generated templated files
 *.generated
 *.tar.gz
@@ -185,8 +186,24 @@ dmypy.json
 /.kube
 /.inputrc
 log.txt*
+/backport_packages/CHANGELOG.txt
+
+# Local .terraform directories
+**/.terraform/*
+
+# .tfstate files
+*.tfstate
+*.tfstate.*
+
+# Terraform variables
+*.tfvars
 
 Chart.lock
 
 # Chart dependencies
 **/charts/*.tgz
+
+# Might be generated when you build wheels
+pip-wheel-metadata
+
+.pypirc
diff --git a/scripts/ci/libraries/_initialization.sh b/scripts/ci/libraries/_initialization.sh
index 4aa72e1..2139aa6 100644
--- a/scripts/ci/libraries/_initialization.sh
+++ b/scripts/ci/libraries/_initialization.sh
@@ -34,6 +34,12 @@ function initialization::create_directories() {
     export FILES_DIR="${AIRFLOW_SOURCES}/files"
     readonly FILES_DIR
 
+    # Create an empty .pypirc file that you can customise. It is .gitignored so it will never
+    # land in the repository - it is only added to the "build image" of production image
+    # So you can keep your credentials safe as long as you do not push the build image.
+    # The final image does not contain it.
+    touch "${AIRFLOW_SOURCES}/.pypirc"
+
     # Directory where all the build cache is stored - we keep there status of all the docker images
     # As well as hashes of the important files, but also we generate build scripts there that are
     # Used to execute the commands for breeze