none
Uploading files into FTP Server using Azure pipelines. RRS feed

  • Question

  •  

    SITUATION

    I want to upload my release build as .zip file into my FTP Server

    for this scenario let's assume that this is my environment.


    application type: Console

    folder I want to upload: $(System.DefaultWorkingDirectory)/CompanyName.ProjectName.Console/bin/Release

    my ftp server host:  ftp://00.00.00.00:21/folderTest

    ftp username: MyUsername

    ftp password: MyPassword




    for Azure agent: I allowed this (168.63.129.16) ip adress to be able to communicate with my ftp server

    azure pipelines

    trigger:
    - master
    
    pool:
      vmImage: 'windows-latest'
    
    variables:
      solution: '**/*.sln'
      buildPlatform: 'Any CPU'
      buildConfiguration: 'Release'
    
    steps:
    - task: NuGetToolInstaller@1
    
    - task: NuGetCommand@2
      inputs:
        restoreSolution: '$(solution)'
    
    - task: VSBuild@1
      inputs:
        solution: '$(solution)'
        platform: '$(buildPlatform)'
        configuration: '$(buildConfiguration)'
    
    - task: VSTest@2
      inputs:
        platform: '$(buildPlatform)'
        configuration: '$(buildConfiguration)'
    
    - publish: $(System.DefaultWorkingDirectory)/CompanyName.ProjectName.Console/bin/Release
      artifact: CompanyName Project Name
    
    - task: FtpUpload@2
      displayName: 'FTP Upload'
      inputs:
        credentialsOption: inputs
        serverUrl: 'ftp://00.00.00.00:21'
        username: MyUsername
        password: MyPassword
        rootDirectory: '$(System.DefaultWorkingDirectory)/CompanyName.ProjectName.Console/bin/Release'
        remoteDirectory: '/folderTest'
        trustSSL: true

    PROBLEM

    following errors occur when I commit (for test purposes) something.

    ##[error]Error: connect ETIMEDOUT 00.00.00.00:21 (control socket)

    ##[error]Ftp Upload failed






    Friday, March 13, 2020 6:25 AM

Answers