简体   繁体   English

如何使用Jenkins上传到Azure Data Lake Storage Gen1?

[英]How to use Jenkins to upload to Azure Data Lake Storage Gen1?

I found the Windows Azure Storage Plugin for Jenkins. 我找到了Jenkins的Windows Azure存储插件。 But it seems that it works only with blob storage. 但它似乎只适用于blob存储。 Is there a way to upload files to Azure Data Lake Storage Gen1 from Jenkins ? 有没有办法从Jenkins上传文件到Azure Data Lake Storage Gen1? Thanks for your help ! 谢谢你的帮助 !

AFAIK currently there is no Jenkins plugin to upload files to Azure Data Lake Storae Gen1 from Jenkins. AFAIK目前没有Jenkins插件可以将文件从Jenkins上传到Azure Data Lake Storae Gen1。 You could use Azure PowerShell or Azure CLI to accomplish your requirement. 您可以使用Azure PowerShell或Azure CLI来完成您的要求。

Sample Azure PowerShell command: 示例Azure PowerShell命令:

Import-AzDataLakeStoreItem -AccountName $dataLakeStorageGen1Name -Path "C:\sampledata\vehicle1_09142014.csv" -Destination $myrootdir\mynewdirectory\vehicle1_09142014.csv

Sample Azure CLI command: 示例Azure CLI命令:

az dls fs upload --account mydatalakestoragegen1 --source-path "C:\SampleData\AmbulanceData\vehicle1_09142014.csv" --destination-path "/mynewfolder/vehicle1_09142014.csv"

For more information, refer below articles: 有关更多信息,请参阅以下文章:

https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-get-started-powershell#upload-data-to-your-data-lake-storage-gen1-account https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-get-started-powershell#upload-data-to-your-data-lake-storage-gen1-帐户

https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-get-started-cli-2.0 https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-get-started-cli-2.0

https://docs.microsoft.com/en-us/powershell/module/az.datalakestore/import-azdatalakestoreitem?view=azps-1.5.0 https://docs.microsoft.com/en-us/powershell/module/az.datalakestore/import-azdatalakestoreitem?view=azps-1.5.0

https://docs.microsoft.com/en-us/cli/azure/dls/fs?view=azure-cli-latest#az-dls-fs-upload https://docs.microsoft.com/en-us/cli/azure/dls/fs?view=azure-cli-latest#az-dls-fs-upload

Few pre-requisites to make this work without any issues are: 没有任何问题使这项工作的先决条件很少:

  1. Have Azure PowerShell / Azure CLI installed in the node where you run the command(s). 在运行命令的节点中安装Azure PowerShell / Azure CLI。

  2. Add Azure service principal to Jenkins credential as instructed here -> https://docs.microsoft.com/en-us/azure/jenkins/execute-cli-jenkins-pipeline#add-azure-service-principal-to-jenkins-credential 按照此处的说明将Azure服务主体添加到Jenkins凭证 - > https://docs.microsoft.com/en-us/azure/jenkins/execute-cli-jenkins-pipeline#add-azure-service-principal-to-jenkins-凭据

Hope this helps!! 希望这可以帮助!! Cheers!! 干杯!!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何重命名 Azure Data Lake Storage Gen1 帐户名称? - How to rename Azure Data Lake Storage Gen1 account name? Azure Data Lake Storage (gen1) 帐户名称和存储帐户密钥是什么? - What is the Azure Data Lake Storage (gen1) account name and storage account key? 在 Azure Data Lake Storage Gen1 中将 Spark Dataframe 保存为 Delta Table 时,有没有办法在写入之前判断将创建多少个文件? - Is there a way to tell before the write how many files will be created when saving Spark Dataframe as Delta Table in Azure Data Lake Storage Gen1? Azure Data Lake Storage Gen1 元数据(在文件夹结构和大小信息方面)到 Power BI - Azure Data Lake Storage Gen1 Metadata ( in terms of folder structure and size information) into Power BI 从 Databricks 笔记本中的 Azure Data Lake Storage Gen1 获取嵌套文件夹的大小 - Fetch the size of nested folder from Azure Data Lake Storage Gen1 from Databricks notebook Azure 数据工厂 - Azure 数据湖 Gen1 访问 - Azure Data Factory - Azure Data Lake Gen1 access 复制Azure Data Lake Gen1中的文件/文件夹 - Copy File/Folders in Azure Data Lake Gen1 我们能否使用Azure CLI将文件上传到Azure Data Lake Storage Gen2 - Can we use Azure CLI to upload files to Azure Data Lake Storage Gen2 如何通过 Azure Data Lake Store gen1 中的新文件触发 Azure Data Factory v2 或 Azure Databricks Notebook 中的管道 - How to trigger a pipeline in Azure Data Factory v2 or a Azure Databricks Notebook by a new file in Azure Data Lake Store gen1 如何创建文件或将文件上传到Azure Data Lake Storage Gen2 - How to create a file or upload a file to Azure Data Lake Storage Gen2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM