Wiki

Clone wiki

File Downloader / Home

Welcome to the File Downloader Wiki

File Downloader is a Bamboo plugin that helps you download a file or even unpack an archive into your workspace. When you create a new Bamboo task, select File Downloader and read below how you can configure it.

Usage

I. File properties

1. File type

First select the type of the file you want to download :

  • Text file: Simple text file.
  • Script file: A file which purpose is to be executed. chmod u+x
  • Archive: An archive that contains packed files.
2. Variable pattern

When writing a text or script file, may it be inline or online, you normally don't have the possibility to use Bamboo variables. Well this option is made for you and since the ${variable} syntax can interact badly with a bash script for example, you can choose from a variety of patterns.

  • ${variable}
  • $(variable)
  • @(variable)
  • #[variable]
  • {{variable}}
  • [(variable)]

The task should fail if the Bamboo variable is undefined but for some reason you could want to have a default value instead.

  • ${variable:-defaultValue}
  • $(variable:defaultValue)
  • @(variable/defaultValue)
  • #[variable|defaultValue]
  • {{variable || "defaultValue"}}
  • [(variable|defaultValue)]

Since now I know exactly what is a Bamboo variable, you don't have to write ${bamboo.buildKey} but directly ${buildKey}.

3. Extract archive

If you download an archive you may want to extract it instead of just placing into your workspace. This works for a variety of well-known archives. Except 7z files.

II. File source

1. Location type
  • Inline: For when you write your file directly inside your Bamboo Task. Cannot be used with an archive.
  • Online: For when your file can be accessed through the web.
  • Repository: You can also download a file from a repository you added on the Build plan (not available for Deployment plans).
2. Online location

When your file is stored online, write here the URL pointing to it. The protocols supported are: * HTTP * HTTPS * FTP * FTPS

The URL is written in the form of protocol://server:port/path, for example:
https://example.com/page1/archive.zip
ftp://ftp.company.com:21/project1/manifest.txt
file:/C:/Ive_let/this_one/work/in case you need.it (but beware with agents)

3. Authentication

Even thought you can actually write your password in the url, you might prefer a nicer and more secure way to do it. If you are editing the task, put your password only if you want to modify it, leaving the field empty is fine.

4. Test access before access

No one likes bad surprises, so this option lets you test if you can accesss the desired file.
If you are editing the task and have authentication enabled, you'll need to put your password again.

5. Inline body

If desired, you can write your file directly inside your Bamboo Task.

6. Line endings

Having an inline script means you cannot choose the line endings. Therefore, this selection helps you choose the type of EOL you want.

  • LF: Unix style
  • CRLF: Windows style
  • CR: because we all like diversity

III. File target

1. File destination

This is the path where you want your file to be placed or your archive extracted. It can be a filename, an absolute or a relative path. It should never be empty. If you want to extract your archive at the root of the workspace, just write "./".

Updated