From 3a806df6c62806351915f6cc402e1cbd51c54d41 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 7 Feb 2018 21:34:24 +0100 Subject: [PATCH] Move wheel-build scripts out of jenkins/scripts We only need the three wheel-X scripts from jenkins/scripts and need them only for the playbook and its roles. Move the scripts in the roles directory and copy them only if needed - using the scripts module. Remove copying of complete jenkins/script for this playbook using the role legacy-copy-project-config-scripts, it's not needed anymore. Change-Id: I2e481fcf7ca148aac8a36ae99d8598ba26078a25 --- playbooks/wheel/pre.yaml | 1 - .../scripts => roles/build-wheels/files}/wheel-build.sh | 0 roles/build-wheels/tasks/main.yaml | 8 +------- .../scripts => roles/copy-wheels/files}/wheel-copy.sh | 0 .../scripts => roles/copy-wheels/files}/wheel-index.sh | 0 roles/copy-wheels/tasks/main.yaml | 4 ++-- 6 files changed, 3 insertions(+), 10 deletions(-) rename {jenkins/scripts => roles/build-wheels/files}/wheel-build.sh (100%) rename {jenkins/scripts => roles/copy-wheels/files}/wheel-copy.sh (100%) rename {jenkins/scripts => roles/copy-wheels/files}/wheel-index.sh (100%) diff --git a/playbooks/wheel/pre.yaml b/playbooks/wheel/pre.yaml index 79af98181b..3a16e45b0a 100644 --- a/playbooks/wheel/pre.yaml +++ b/playbooks/wheel/pre.yaml @@ -2,7 +2,6 @@ roles: - bindep - legacy-install-afs-with-puppet - - legacy-copy-project-config-scripts pre_tasks: # NOTE(pabelanger): Needed by puppet-openafs package. diff --git a/jenkins/scripts/wheel-build.sh b/roles/build-wheels/files/wheel-build.sh similarity index 100% rename from jenkins/scripts/wheel-build.sh rename to roles/build-wheels/files/wheel-build.sh diff --git a/roles/build-wheels/tasks/main.yaml b/roles/build-wheels/tasks/main.yaml index 2504ab0d8e..cee826fad4 100644 --- a/roles/build-wheels/tasks/main.yaml +++ b/roles/build-wheels/tasks/main.yaml @@ -11,10 +11,4 @@ become: yes - name: Build the wheel mirror - shell: - cmd: ./scripts/wheel-build.sh {{ wheel_dir }} {{ wheel_python }} - executable: /bin/bash - # ANSIBLE0013 complains about shell. TODO(jaegerandi): Use command instead, - # for now we just silence the warning. - tags: - - skip_ansible_lint + script: wheel-build.sh {{ wheel_dir }} {{ wheel_python }} diff --git a/jenkins/scripts/wheel-copy.sh b/roles/copy-wheels/files/wheel-copy.sh similarity index 100% rename from jenkins/scripts/wheel-copy.sh rename to roles/copy-wheels/files/wheel-copy.sh diff --git a/jenkins/scripts/wheel-index.sh b/roles/copy-wheels/files/wheel-index.sh similarity index 100% rename from jenkins/scripts/wheel-index.sh rename to roles/copy-wheels/files/wheel-index.sh diff --git a/roles/copy-wheels/tasks/main.yaml b/roles/copy-wheels/tasks/main.yaml index 0d928f5105..cc3dccd24b 100644 --- a/roles/copy-wheels/tasks/main.yaml +++ b/roles/copy-wheels/tasks/main.yaml @@ -1,5 +1,5 @@ - name: Copy the wheels to AFS - command: bash -x scripts/wheel-copy.sh {{ wheel_dir }} {{ afs_dir }} + script: wheel-copy.sh {{ wheel_dir }} {{ afs_dir }} - name: Rebuild mirror index - command: bash -x scripts/wheel-index.sh {{ afs_dir }} + script: wheel-index.sh {{ afs_dir }}