Unverified Commit 3a25d5bd authored by Keshav Prasad's avatar Keshav Prasad
Browse files

feat: SB-30654 generalizing plugins upload


Signed-off-by: default avatarKeshav Prasad <keshavprasadms@gmail.com>
Showing with 17 additions and 9 deletions
+17 -9
......@@ -72,13 +72,22 @@
- preview
- block:
- name: run the az_copy.sh script
shell: "bash {{ az_file_path }} {{ plugin_storage }} {{ source_file }}"
async: 3600
poll: 10
environment:
AZURE_STORAGE_ACCOUNT: "{{ azure_public_storage_account_name }}"
AZURE_STORAGE_SAS_TOKEN: "{{ azure_public_storage_account_sas }}"
- name: delete batch of files from azure storage
include_role:
name: azure-cloud-storage
tasks_from: blob-delete-batch.yml
vars:
blob_delete_pattern: "content-plugins/{{ item }}"
with_lines: "cat {{ plugin_list_to_delete_and_upload }}"
- name: upload batch of files to azure storage
include_role:
name: azure-cloud-storage
tasks_from: blob-upload-batch.yml
vars:
blob_container_folder_path: "/content-plugins"
local_file_or_folder_path: "{{ source_file }}/{{ item }}"
with_lines: "cat {{ plugin_list_to_delete_and_upload }}"
tags:
- plugins
when: cloud_service_provider == "azure"
......
......@@ -31,11 +31,10 @@ node() {
sh """
unzip ${artifact}
unzip content-plugins.zip
chmod a+x content-plugins/az_copy.sh
mv content-plugins ansible
"""
ansiblePlaybook = "${currentWs}/ansible/deploy-plugins.yml"
ansibleExtraArgs = "--tags plugins --extra-vars \" source_file=${currentWs}/ansible/content-plugins az_file_path=${currentWs}/ansible/content-plugins/az_copy.sh\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
ansibleExtraArgs = "--tags plugins --extra-vars \" source_file=${currentWs}/ansible/content-plugins plugin_list_to_delete_and_upload=${currentWs}/ansible/content-plugins/plugin_list_to_delete_and_upload.txt\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
values.put('ansiblePlaybook', ansiblePlaybook)
values.put('ansibleExtraArgs', ansibleExtraArgs)
println values
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment