From fb8fc36495dc7caee8acf367ee65c753efcfd8b0 Mon Sep 17 00:00:00 2001 From: cmharlow Date: Fri, 24 May 2019 11:18:12 -0400 Subject: [PATCH 1/4] adding DAG-related git clone action for code not in DAGs dir --- defaults/main.yml | 4 ++++ tasks/manage_dags.yml | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 3bacf18..6b66eaa 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -276,6 +276,10 @@ dags_git_repositories: branch_or_release: "master" pipfile: true pip_requirements: false +dags_git_repositories: + - repo: "https://github.com/tulibraries/tul_cob.git" + dest_folder: "$HOME/tul_cob" + branch_or_release: "master" airflow_dag_system_dependencies: - name: "@Development tools" diff --git a/tasks/manage_dags.yml b/tasks/manage_dags.yml index 878c53e..76d71c7 100644 --- a/tasks/manage_dags.yml +++ b/tasks/manage_dags.yml @@ -13,6 +13,19 @@ with_items: - "{{ dags_git_repositories }}" +# For DAG-Related Git Repos, clone designated branch or release to $HOME +- name: 'CONFIG | DAGS | Clone listed DAG-related git repositories' + become_user: "{{ airflow_user_name }}" + become: true + git: + repo: "{{ item.repo }}" + dest: "{{ item.dest_folder }}" + clone: true + force: true + version: "{{ item.branch_or_release }}" + with_items: + - "{{ dags_git_related_repositories }}" + # Convert Pipfile to Requirements File - name: 'CONFIG | DAGS | Convert Pipfile to requirements.txt' From 2afae6dbabb22a04a215704becb0711fb596f085 Mon Sep 17 00:00:00 2001 From: cmharlow Date: Fri, 24 May 2019 11:25:36 -0400 Subject: [PATCH 2/4] changing variable to what makes more sense semantically --- defaults/main.yml | 2 +- tasks/manage_dags.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 6b66eaa..3d9e31b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -276,7 +276,7 @@ dags_git_repositories: branch_or_release: "master" pipfile: true pip_requirements: false -dags_git_repositories: +dags_related_git_repositories: - repo: "https://github.com/tulibraries/tul_cob.git" dest_folder: "$HOME/tul_cob" branch_or_release: "master" diff --git a/tasks/manage_dags.yml b/tasks/manage_dags.yml index 76d71c7..0879343 100644 --- a/tasks/manage_dags.yml +++ b/tasks/manage_dags.yml @@ -24,7 +24,7 @@ force: true version: "{{ item.branch_or_release }}" with_items: - - "{{ dags_git_related_repositories }}" + - "{{ dags_related_git_repositories }}" # Convert Pipfile to Requirements File From 72086bd915df51902de0debba4383d94f5ee77f4 Mon Sep 17 00:00:00 2001 From: cmharlow Date: Fri, 24 May 2019 12:23:14 -0400 Subject: [PATCH 3/4] updating GH releases deploy key --- .gitignore | 3 +++ .travis.yml | 35 ++++++++++++++--------------------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 0dd8cee..fcc0768 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ tests/roles/ # Molecule .molecule + +# Travis / CI related +.ruby-version diff --git a/.travis.yml b/.travis.yml index 71638c0..f9f7455 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,40 +1,33 @@ ---- language: python python: - - "3.6" +- '3.6' services: - - docker - +- docker install: - - pip install pipenv - - pipenv install --dev - +- pip install pipenv +- pipenv install --dev script: - - pipenv run molecule test - +- pipenv run molecule test after_success: - - true - +- true before_deploy: - - if [ -n "$TRAVIS_TAG" ]; then git archive HEAD -o $TRAVIS_TAG.tar.gz; fi - - if [ -n "$TRAVIS_TAG" ]; then git archive HEAD -o $TRAVIS_TAG.zip; fi - +- if [ -n "$TRAVIS_TAG" ]; then git archive HEAD -o $TRAVIS_TAG.tar.gz; fi +- if [ -n "$TRAVIS_TAG" ]; then git archive HEAD -o $TRAVIS_TAG.zip; fi deploy: provider: releases skip_cleanup: true prerelease: true - name: $TRAVIS_TAG release + name: "$TRAVIS_TAG release" file: - - $TRAVIS_TAG.tar.gz - - $TRAVIS_TAG.zip + - "$TRAVIS_TAG.tar.gz" + - "$TRAVIS_TAG.zip" api_key: - secure: QBfV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qPQls0a2yxJI+nZ38dzCQZ64dTgexGAyCs/goPmmhINloNlFgUI2B6FK42CKXg8xov/PlM/ev20P7Prjk3IuR5PIDWENU2CEXkFYj8A750AXoRVu+BrN37h1xUFA1O92xs2mvjScELxN/t9xGyFKRzLCoufM9sMU4NtZOF5M6sBfioyQvq70Suk96TaZTPTaP5ZuUlkIoDATpsmd4yDa3QiVvlKg+oxvWoG4zyTERAX2H7MtXUisFEEc09wV3ee5/XyCdiK5rZ/OdnHZpXziSE5xHdhXbK4= on: repo: tulibraries/ansible-role-airflow tags: true branch: - - master - - /^v.*$/ - + - master + - "/^v.*$/" notifications: webhooks: https://galaxy.ansible.com/api/v1/notifications/ From 40fd1fa445c471feefc2435cd0cf338440d02387 Mon Sep 17 00:00:00 2001 From: cmharlow Date: Fri, 24 May 2019 12:28:28 -0400 Subject: [PATCH 4/4] fixing autogen indentation error from travis cli --- .travis.yml | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index f9f7455..5220a8b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,33 +1,40 @@ +--- language: python python: -- '3.6' + - "3.6" services: -- docker + - docker + install: -- pip install pipenv -- pipenv install --dev + - pip install pipenv + - pipenv install --dev + script: -- pipenv run molecule test + - pipenv run molecule test + after_success: -- true + - true + before_deploy: -- if [ -n "$TRAVIS_TAG" ]; then git archive HEAD -o $TRAVIS_TAG.tar.gz; fi -- if [ -n "$TRAVIS_TAG" ]; then git archive HEAD -o $TRAVIS_TAG.zip; fi + - if [ -n "$TRAVIS_TAG" ]; then git archive HEAD -o $TRAVIS_TAG.tar.gz; fi + - if [ -n "$TRAVIS_TAG" ]; then git archive HEAD -o $TRAVIS_TAG.zip; fi + deploy: provider: releases skip_cleanup: true prerelease: true - name: "$TRAVIS_TAG release" + name: $TRAVIS_TAG release file: - - "$TRAVIS_TAG.tar.gz" - - "$TRAVIS_TAG.zip" + - $TRAVIS_TAG.tar.gz + - $TRAVIS_TAG.zip api_key: secure: AGUiZgxfZVG5c6EvV+n6malKxO3BNDDRfJiHpW+G9zMGnZNTL4Vmmn3tM/rVZ9jvcYHE6nbTvS1GiFftKZ34i/PPgWFeMAUXeX4S8vMXDIpB9V2X9tfTnRxpdMGZtnPL/m2e7ThNXH5djY4W/bAIb/3EcezK5mTDiaLfq0A2DfhYLXoqEprv21Nz1Mq9cP5rpZAMgdv0MYKjovZF3+hyVVkz3hEdDMHgPD/tFszfF3k1T2LVNkvYcq9lEAeJ51BG1hp2vbokd2SBKamyq+S6VvKpN8ysijWVO7CRseXmEbocksDgOi2iBZ/4aalflm/bt/rg0vY75DEwtQ7+ErXkcGU/ojeyRkgWayLdifkcSUqMRsnrmQngGSPEABMV2FThuafdvywZ4WHoqPQls0a2yxJI+nZ38dzCQZ64dTgexGAyCs/goPmmhINloNlFgUI2B6FK42CKXg8xov/PlM/ev20P7Prjk3IuR5PIDWENU2CEXkFYj8A750AXoRVu+BrN37h1xUFA1O92xs2mvjScELxN/t9xGyFKRzLCoufM9sMU4NtZOF5M6sBfioyQvq70Suk96TaZTPTaP5ZuUlkIoDATpsmd4yDa3QiVvlKg+oxvWoG4zyTERAX2H7MtXUisFEEc09wV3ee5/XyCdiK5rZ/OdnHZpXziSE5xHdhXbK4= on: repo: tulibraries/ansible-role-airflow tags: true branch: - - master - - "/^v.*$/" + - master + - /^v.*$/ + notifications: webhooks: https://galaxy.ansible.com/api/v1/notifications/