github.com/ouraigua/jenkins-library@v0.0.0-20231028010029-fbeaf2f3aa9b/documentation/docs/steps/azureBlobUpload.md (about)

     1  # ${docGenStepName}
     2  
     3  ## ${docGenDescription}
     4  
     5  ## Prerequisites
     6  
     7  * Before you can access Azure Storage, you will need an Azure subscription. If you do not have a subscription, create an [account](https://azure.microsoft.com/en-us/).
     8  * This step currently only supports authentication via Shared Access Signature (SAS).
     9  * You can generate a SAS token from the Azure Portal under [Create a service SAS](https://docs.microsoft.com/en-us/rest/api/storageservices/create-service-sas).
    10  * The SAS token must allow the actions "Write" and "Create" for the specified Azure Blob Storage.
    11  
    12  ## Set up the Azure Credentials
    13  
    14  To make your Azure credentials available to the jenkins library, store them as Jenkins credentials of type "Secret Text". The "Secret Text" must be in JSON format and contain the "account_name", "container_name", as well as the "sas_token".
    15  
    16  For Example:
    17  
    18  ```JSON
    19  {
    20    "account_name": "asdfg12345jhgfdwertz4et5",
    21    "container_name": "abcde-lkjhg-qwertzui-fghj-9876-1234-7594rbnsmncx-xyz",
    22    "sas_token": "sig=1234567890wertzuiopaYXCVBNMASDsdfghjkloi1234567890qwedf%1993-12-15opphehttpsqtgcshje1234-aqwe-1234-5678-t57894u875LH2%nv23"
    23  }
    24  ```
    25  
    26  If the JSON string contains additional information, this is not a problem. These are skipped.
    27  
    28  ## About Files/Directories to Upload
    29  
    30  With this step you can upload single files as well as whole directories into your Azure Storage. File formats do not matter and directory structures are preserved.
    31  
    32  **Note:** File paths must be specified in UNIX format. So the used path separator must be "/".
    33  
    34  ## ${docGenParameters}
    35  
    36  ## ${docGenConfiguration}
    37  
    38  ## ${docJenkinsPluginDependencies}
    39  
    40  ## Example
    41  
    42  ```groovy
    43  azureBlobUpload(
    44      script: this,
    45      azureCredentialsId: "Azure_Credentials",
    46      filePath: "test.txt"
    47  )
    48  ```