skip to Main Content

I must integrate a 3rd party module into our containerized Docker solution. On my local dev it works well as I can download the image 3rdParty_file_name.tar on the disk and use it:

docker load --input .3rdParty_file_name.tar

The problem appears when I have to do the same in Azure Devops. How can I integrate the image 3rdParty_file_name.tar into the container build pipeline? I can’t upload the image because there’s a limitation of 10MB in the Azure DevOpsLibrarySecure files feature.

2

Answers


  1. Chosen as BEST ANSWER

    The other option with 0 cost was to upload the .tar file on an internal server, expose the public IP and use the Invoke-WebRequest command into the pipeline:

    - task: PowerShell@2
      displayName:  Downloading {{imageName}} from {{serverName}}
      inputs:
        targetType: 'inline'
        script:  Invoke-WebRequest -Uri https://websitename.ch/path/to/the/file/3rdParty_file_name.tar' -OutFile '.3rdParty_file_name.tar' -UseBasicParsing -Credential (New-Object PSCredential('$(serverUsername)', (ConvertTo-SecureString -AsPlainText -Force -String'$(serverPassword)')))
    

  2. Azure Storage account is a good approach to remove the limitation of 10MB file size.

    enter image description here

    1.Upload your .tar to the container.

    enter image description here

    2.In your Azure Pipeline, you could use Azure CLI task to execute the az storage blob download command.

    enter image description here

    enter image description here

    Script sample:

    mkdir $(Build.SourcesDirectory)BlobFile
    az storage blob download --container-name $(containername) --file $(Build.SourcesDirectory)BlobFile"sample.tar" --name "sample.tar"--account-key $(accountkey) --account-name $(accountname)
    cd $(Build.SourcesDirectory)BlobFile
    ls
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search