Scp

Uploads artifacts, files, and signatures to a SCP server.

Legend:

  • required

  • optional

  • may use environment variable

  • accepts Name Templates

  • YAML

  • TOML

  • JSON

  • Maven

  • Gradle

# 
upload:
  # 
  scp:
    # Uploaders require a name.
    # 
    app:

      # Enables or disables the uploader.
      # Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
      # Defaults to `NEVER`.
      # 
      active: ALWAYS

      # Defines the connection timeout in seconds.
      # Defaults to `20`.
      # 
      connectTimeout: 20

      # Defines the read timeout in seconds.
      # Defaults to `60`.
      # 
      readTimeout: 60

      # Upload files.
      # Defaults to `true`.
      # 
      files: true

      # Upload distribution artifacts.
      # Defaults to `true`.
      # 
      artifacts: true

      # Release checksum files.
      # Defaults to `true`.
      # 
      checksums: true

      # Upload signatures.
      # Defaults to `true`.
      # 
      signatures: true

      # Additional properties used when evaluating templates.
      # 
      extraProperties:
        # Key will be capitalized and prefixed with `scp`, i.e, `scpFoo`.
        foo: bar

      # Host where the SCP service is enabled.
      # If left unspecified, the `JRELEASER_SCP_${name}_HOST`
      # environment variable must be defined.
      #  
      host: uploads.acme.com

      # Port number of SCP service.
      # If left unspecified, the `JRELEASER_SCP_${name}_PORT`
      # environment variable must be defined.
      # Defaults to `22`.
      #  
      port: 22

      # The username required for authorization.
      # If left unspecified, the `JRELEASER_SCP_${name}_USERNAME`
      # environment variable must be defined.
      #  
      username: __DO_NOT_SET_HERE__

      # Password for login into the SCP service.
      # If left unspecified, the `JRELEASER_SCP_${name}_PASSWORD`
      # environment variable must be defined.
      #  
      password: __DO_NOT_SET_HERE__

      # The public SSH key.
      # If left unspecified, the `JRELEASER_SCP_${name}_PUBLIC_KEY`
      # environment variable must be defined.
      #  
      publicKey: __DO_NOT_SET_HERE__

      # The private SSH key.
      # If left unspecified, the `JRELEASER_SCP_${name}_PRIVATE_KEY`
      # environment variable must be defined.
      #  
      privateKey: __DO_NOT_SET_HERE__

      # The passphrase required to read private keys.
      # If left unspecified, the `JRELEASER_SCP_${name}_PASSPHRASE`
      # environment variable must be defined.
      #  
      passphrase: __DO_NOT_SET_HERE__

      # The remote server's SSH fingerprint.
      # If left unspecified, the `JRELEASER_SCP_${name}_FINGERPRINT`
      # environment variable must be defined.
      #  
      fingerprint: __DO_NOT_SET_HERE__

      # Path where artifacts will be uploaded.
      #  
      path: '/uploads/{{projectName}}/{{tagName}}/{{artifactFile}}'

      # An HTTP/HTTPS URL from where artifacts may be downloaded.
      #  
      downloadUrl: 'https://download.acme.com/{{projectName}}/{{tagName}}/{{artifactFile}}'
# Uploaders require a name.
# 
[upload.scp.app]

  # Enables or disables the uploader.
  # Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
  # Defaults to `NEVER`.
  # 
  active = "ALWAYS"

  # Defines the connection timeout in seconds.
  # Defaults to `20`.
  # 
  connectTimeout = 20

  # Defines the read timeout in seconds.
  # Defaults to `60`.
  # 
  readTimeout = 60

  # Upload files.
  # Defaults to `true`.
  # 
  files = true

  # Upload distribution artifacts.
  # Defaults to `true`.
  # 
  artifacts = true

  # Release checksum files.
  # Defaults to `true`.
  # 
  checksums = true

  # Upload signatures.
  # Defaults to `true`.
  # 
  signatures = true

  # Additional properties used when evaluating templates.
  # 
  extraProperties.foo = "bar"
  # Key will be capitalized and prefixed with `scp`, i.e, `scpFoo`.

  # Host where the SCP service is enabled.
  # If left unspecified, the `JRELEASER_SCP_${name}_HOST`
  # environment variable must be defined.
  #  
  host = "uploads.acme.com"

  # Port number of SCP service.
  # If left unspecified, the `JRELEASER_SCP_${name}_PORT`
  # environment variable must be defined.
  # Defaults to `port`.
  #  
  port = 22

  # The username required for authorization.
  # If left unspecified, the `JRELEASER_SCP_${name}_USERNAME`
  # environment variable must be defined.
  #  
  username = "__DO_NOT_SET_HERE__"

  # Password for login into the SCP service..
  # If left unspecified, the `JRELEASER_SCP_${name}_PASSWORD`
  # environment variable must be defined.
  #  
  password = "__DO_NOT_SET_HERE__"

  # The public SSH key.
  # If left unspecified, the `JRELEASER_SCP_${name}_PUBLIC_KEY`
  # environment variable must be defined.
  #  
  publicKey = "__DO_NOT_SET_HERE__"

  # The private SSH key.
  # If left unspecified, the `JRELEASER_SCP_${name}_PRIVATE_KEY`
  # environment variable must be defined.
  #  
  privateKey = "__DO_NOT_SET_HERE__"

  # The passphrase required to read private keys.
  # If left unspecified, the `JRELEASER_SCP_${name}_PASSPHRASE`
  # environment variable must be defined.
  #  
  passphrase = "__DO_NOT_SET_HERE__"

  # The remote server's SSH fingerprint.
  # If left unspecified, the `JRELEASER_SCP_${name}_FINGERPRINT`
  # environment variable must be defined.
  #  
  fingerprint = "__DO_NOT_SET_HERE__"

  # Path where artifacts will be uploaded.
  #  
  path = "/uploads/{{projectName}}/{{tagName}}/{{artifactFile}}"

  # An HTTP/HTTPS URL from where artifacts may be downloaded.
  #  
  downloadUrl = "https://download.acme.com/{{projectName}}/{{tagName}}/{{artifactFile}}"
{
  // 
  "upload": {
    // 
    "scp": {
      // Uploaders require a name.
      // 
      "app": {

        // Enables or disables the uploader.
        // Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
        // Defaults to `NEVER`.
        // 
        "active": "ALWAYS",

        // Defines the connection timeout in seconds.
        // Defaults to `20`.
        // 
        "connectTimeout": 20,

        // Defines the read timeout in seconds.
        // Defaults to `60`.
        // 
        "readTimeout": 60,

        // Upload files.
        // Defaults to `true`.
        // 
        "files": true,

        // Upload distribution artifacts.
        // Defaults to `true`.
        // 
        "artifacts": true,

        // Release checksum files.
        // Defaults to `true`.
        // 
        "checksums": true,

        // Upload signatures.
        // Defaults to `true`.
        // 
        "signatures": true,

        // Additional properties used when evaluating templates.
        // 
        "extraProperties": {
          // Key will be capitalized and prefixed with `scp`, i.e, `scpFoo`.
          "foo": "bar"
        },

        // Host where the SCP service is enabled.
        // If left unspecified, the `JRELEASER_SCP_${name}_HOST`
        // environment variable must be defined.
        //  
        "host": "uploads.acme.com",

        // Port number of SCP service.
        // If left unspecified, the `JRELEASER_SCP_${name}_PORT`
        // environment variable must be defined.
        // Defaults to `22`.
        //  
        "port": 22,

        // The username required for authorization.
        // If left unspecified, the `JRELEASER_SCP_${name}_USERNAME`
        // environment variable must be defined.
        //  
        "username": "__DO_NOT_SET_HERE__",

        // Password for login into the SCP service.
        // If left unspecified, the `JRELEASER_SCP_${name}_PASSWORD`
        // environment variable must be defined.
        //  
        "password": "__DO_NOT_SET_HERE__",

        // The public SSH key.
        // If left unspecified, the `JRELEASER_SCP_${name}_PUBLIC_KEY`
        // environment variable must be defined.
        //  
        "publicKey": "__DO_NOT_SET_HERE__",

        // The private SSH key.
        // If left unspecified, the `JRELEASER_SCP_${name}_PRIVATE_KEY`
        // environment variable must be defined.
        //  
        "privateKey": "__DO_NOT_SET_HERE__",

        // The passphrase required to read private keys.
        // If left unspecified, the `JRELEASER_SCP_${name}_PASSPHRASE`
        // environment variable must be defined.
        //  
        "passphrase": "__DO_NOT_SET_HERE__",

        // The remote server's SSH fingerprint.
        // If left unspecified, the `JRELEASER_SCP_${name}_FINGERPRINT`
        // environment variable must be defined.
        //  
        "fingerprint": "__DO_NOT_SET_HERE__",

        // Path where artifacts will be uploaded.
        //  
        "path": "/uploads/{{projectName}}/{{tagName}}/{{artifactFile}}",

        // An HTTP/HTTPS URL from where artifacts may be downloaded.
        //  
        "downloadUrl": "https://download.acme.com/{{projectName}}/{{tagName}}/{{artifactFile}}"
      }
    }
  }
}
<jreleaser>
  <!--
    
  -->
  <upload>
    <!--
      
    -->
    <scp>
      <!--
        Uploaders require a name.
        
      -->
      <app>
        <!--
          Enables or disables the distribution.
          Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
          Defaults to `NEVER`.
          
        -->
        <active>ALWAYS</active>

        <!--
          Defines the connection timeout in seconds.
          Defaults to `20`.
          
        -->
        <connectTimeout>20</connectTimeout>

        <!--
          Defines the read timeout in seconds.
          Defaults to `60`.
          
        -->
        <readTimeout>60</readTimeout>

        <!--
          Upload files.
          Defaults to `true`.
          
        -->
        <files>true</files>

        <!--
          Upload distribution artifacts.
          Defaults to `true`.
          
        -->
        <artifacts>true</artifacts>

        <!--
          Release checksum files.
          Defaults to `true`.
          
        -->
        <checksums>true</checksums>

        <!--
          Upload signatures.
          Defaults to `true`.
          
        -->
        <signatures>true</signatures>

        <!--
          Additional properties used when evaluating templates.
          
        -->
        <extraProperties>
          <!--
            Key will be capitalized and prefixed with `scp`, i.e, `scpFoo`.
          -->
          <foo>bar</foo>
        </extraProperties>

        <!--
          Host where the SCP service is enabled.
          If left unspecified, the `JRELEASER_SCP_${name}_HOST`
          environment variable must be defined.
           
        -->
        <host>uploads.acme.com</host>

        <!--
          Port number of SCP service.
          If left unspecified, the `JRELEASER_SCP_${name}_PORT`
          environment variable must be defined.
          Defaults to `22`.
           
        -->
        <port>22</port>

        <!--
          The username required for authorization.
          If left unspecified, the `JRELEASER_SCP_${name}_USERNAME`
          environment variable must be defined.
           
        -->
        <username>__DO_NOT_SET_HERE__</username>

        <!--
          Password for login into the SCP service.
          If left unspecified, the `JRELEASER_SCP_${name}_PASSWORD`
          environment variable must be defined.
           
        -->
        <password>__DO_NOT_SET_HERE__</password>

        <!--
          The public SSH key.
          If left unspecified, the `JRELEASER_SCP_${name}_PUBLIC_KEY`
          environment variable must be defined.
           
        -->
        <publicKey>__DO_NOT_SET_HERE__</publicKey>

        <!--
          The private SSH key.
          If left unspecified, the `JRELEASER_SCP_${name}_PRIVATE_KEY`
          environment variable must be defined.
           
        -->
        <privateKey>__DO_NOT_SET_HERE__</privateKey>

        <!--
          The passphrase required to read private keys.
          If left unspecified, the `JRELEASER_SCP_${name}_PASSPHRASE`
          environment variable must be defined.
           
        -->
        <passphrase>__DO_NOT_SET_HERE__</passphrase>

        <!--
          The remote server's SSH fingerprint.
          If left unspecified, the `JRELEASER_SCP_${name}_FINGERPRINT`
          environment variable must be defined.
           
        -->
        <fingerprint>__DO_NOT_SET_HERE__</fingerprint>

        <!--
          Path where artifacts will be uploaded.
           
        -->
        <path>/uploads/{{projectName}}/{{tagName}}/{{artifactFile}}</path>

        <!--
          An HTTP/HTTPS URL from where artifacts may be downloaded.
           
        -->
        <downloadUrl>https://download.acme.com/{{projectName}}/{{tagName}}/{{artifactFile}}</downloadUrl>
      </app>
    </scp>
  </upload>
</jreleaser>
jreleaser {
  // 
  upload {
    // 
    scp {
      // Uploaders require a name.
      // 
      app {

        // Enables or disables the uploader.
        // Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
        // Defaults to `NEVER`.
        // 
        active = 'ALWAYS'

        // Defines the connection timeout in seconds.
        // Defaults to `20`.
        // 
        connectTimeout = 20

        // Defines the read timeout in seconds.
        // Defaults to `60`.
        // 
        readTimeout = 60

        // Upload files.
        // Defaults to `true`.
        // 
        files = true

        // Upload distribution artifacts.
        // Defaults to `true`.
        // 
        artifacts = true

        // Release checksum files.
        // Defaults to `true`.
        // 
        checksums = true

        // Upload signatures.
        // Defaults to `true`.
        // 
        signatures = true

        // Additional properties used when evaluating templates.
        // Key will be capitalized and prefixed with `scp`, i.e, `scpFoo`.
        // 
        extraProperties.put('foo', 'bar')

        // Host where the SCP service is enabled.
        // If left unspecified, the `JRELEASER_SCP_${name}_HOST`
        // environment variable must be defined.
        //  
        host = 'uploads.acme.com'

        // Port number of SCP service.
        // If left unspecified, the `JRELEASER_SCP_${name}_PORT`
        // environment variable must be defined.
        // Defaults to `22`.
        //  
        port = 22

        // The username required for authorization.
        // If left unspecified, the `JRELEASER_SCP_${name}_USERNAME`
        // environment variable must be defined.
        //  
        username = '__DO_NOT_SET_HERE__'

        // Password for login into the SCP service.
        // If left unspecified, the `JRELEASER_SCP_${name}_PASSWORD`
        // environment variable must be defined.
        //  
        password = '__DO_NOT_SET_HERE__'

        // The public SSH key.
        // If left unspecified, the `JRELEASER_SCP_${name}_PUBLIC_KEY`
        // environment variable must be defined.
        //  
        publicKey = '__DO_NOT_SET_HERE__'

        // The private SSH key.
        // If left unspecified, the `JRELEASER_SCP_${name}_PRIVATE_KEY`
        // environment variable must be defined.
        //  
        privateKey = '__DO_NOT_SET_HERE__'

        // The passphrase required to read private keys.
        // If left unspecified, the `JRELEASER_SCP_${name}_PASSPHRASE`
        // environment variable must be defined.
        //  
        passphrase = '__DO_NOT_SET_HERE__'

        // The remote server's SSH fingerprint.
        // If left unspecified, the `JRELEASER_SCP_${name}_FINGERPRINT`
        // environment variable must be defined.
        //  
        fingerprint = '__DO_NOT_SET_HERE__'

        // Path where artifacts will be uploaded.
        //  
        path: '/uploads/{{projectName}}/{{tagName}}/{{artifactFile}}'

        // An HTTP/HTTPS URL from where artifacts may be downloaded.
        //  
        downloadUrl: 'https://download.acme.com/{{projectName}}/{{tagName}}/{{artifactFile}}'
      }
    }
  }
}

Host

You can have the host set in the configuration as shown above, or you can have it read from an environment variable. The configured name of the SCP server will be used to build the environment variable name. This means that the name per configured instance needs to be unique.

The name of the environment variable will be JRELEASER_SCP_NAME_HOST. If your instance is named production, you can store the host in the environment variable JRELEASER_SCP_PRODUCTION_HOST. The name will be transformed to uppercase.

If a configured host is found in the configuration file, then the environment variable is not used at all.

Alternatives to JRELEASER_SCP_NAME_HOST are (in order):

  • JRELEASER_SSH_NAME_HOST

  • JRELEASER_SCP_HOST

  • JRELEASER_SSH_HOST

Port

You can have the port set in the configuration as shown above, or you can have it read from an environment variable. The configured name of the SCP server will be used to build the environment variable name. This means that the name per configured instance needs to be unique.

The name of the environment variable will be JRELEASER_SCP_NAME_PORT. If your instance is named production, you can store the port in the environment variable JRELEASER_SCP_PRODUCTION_PORT. The name will be transformed to uppercase.

If a configured port is found in the configuration file, then the environment variable is not used at all.

Alternatives to JRELEASER_SCP_NAME_PORT are (in order):

  • JRELEASER_SSH_NAME_PORT

  • JRELEASER_SCP_PORT

  • JRELEASER_SSH_PORT

Username

You can have the username set in the configuration as shown above, or you can have it read from an environment variable. The configured name of the SCP server will be used to build the environment variable name. This means that the name per configured instance needs to be unique.

The name of the environment variable will be JRELEASER_SCP_NAME_USERNAME. If your instance is named production, you can store the username in the environment variable JRELEASER_SCP_PRODUCTION_USERNAME. The name will be transformed to uppercase.

If a configured username is found in the configuration file, then the environment variable is not used at all.

Alternatives to JRELEASER_SCP_NAME_USERNAME are (in order):

  • JRELEASER_SSH_NAME_USERNAME

  • JRELEASER_SCP_USERNAME

  • JRELEASER_SSH_USERNAME

Password

The password will be stored in an environment variable. The configured name of the SCP server will be used. This means that the name per configured instance needs to be unique.

The name of the environment variable will be JRELEASER_SCP_NAME_PASSWORD. If your instance is named production, you need to store the secret in the environment variable JRELEASER_SCP_PRODUCTION_PASSWORD. The name will be transformed to uppercase.

Alternatives to JRELEASER_SCP_NAME_PASSWORD are (in order):

  • JRELEASER_SSH_NAME_PASSWORD

  • JRELEASER_SCP_PASSWORD

  • JRELEASER_SSH_PASSWORD

Public Key

The public key will be stored in an environment variable. The configured name of the SCP server will be used. This means that the name per configured instance needs to be unique.

The name of the environment variable will be JRELEASER_SCP_NAME_PUBLIC_KEY. If your instance is named production, you need to store the secret in the environment variable JRELEASER_SCP_PRODUCTION_PUBLIC_KEY. The name will be transformed to uppercase.

Alternatives to JRELEASER_SCP_NAME_PUBLIC_KEY are (in order):

  • JRELEASER_SSH_NAME_PUBLIC_KEY

  • JRELEASER_SCP_PUBLIC_KEY

  • JRELEASER_SSH_PUBLIC_KEY

Private Key

The private key will be stored in an environment variable. The configured name of the SCP server will be used. This means that the name per configured instance needs to be unique.

The name of the environment variable will be JRELEASER_SCP_NAME_PRIVATE_KEY. If your instance is named production, you need to store the secret in the environment variable JRELEASER_SCP_PRODUCTION_PRIVATE_KEY. The name will be transformed to uppercase.

Alternatives to JRELEASER_SCP_NAME_PRIVATE_KEY are (in order):

  • JRELEASER_SSH_NAME_PRIVATE_KEY

  • JRELEASER_SCP_PRIVATE_KEY

  • JRELEASER_SSH_PRIVATE_KEY

Passphrase

The passphrase will be stored in an environment variable. The configured name of the SCP server will be used. This means that the name per configured instance needs to be unique.

The name of the environment variable will be JRELEASER_SCP_NAME_PASSPHRASE. If your instance is named production, you need to store the secret in the environment variable JRELEASER_SCP_PRODUCTION_PASSPHRASE. The name will be transformed to uppercase.

Alternatives to JRELEASER_SCP_NAME_PASSPHRASE are (in order):

  • JRELEASER_SSH_NAME_PASSPHRASE

  • JRELEASER_SCP_PASSPHRASE

  • JRELEASER_SSH_PASSPHRASE

Fingerprint

The fingerprint will be stored in an environment variable. The configured name of the SCP server will be used. This means that the name per configured instance needs to be unique.

The name of the environment variable will be JRELEASER_SCP_NAME_FINGERPRINT. If your instance is named production, you need to store the secret in the environment variable JRELEASER_SCP_PRODUCTION_FINGERPRINT. The name will be transformed to uppercase.

Alternatives to JRELEASER_SCP_NAME_FINGERPRINT are (in order):

  • JRELEASER_SSH_NAME_FINGERPRINT

  • JRELEASER_SCP_FINGERPRINT

  • JRELEASER_SSH_FINGERPRINT

Path

The path where artifacts will be uploaded to.

An example configuration may look like path: '/uploads/{{projectName}}/{{tagName}}/{{artifactFile}}'.

And will result in a final deployment like /uploads/app/v1.0.0/app-1.0.0.zip.

DownloadUrl

The downloadUrl is the URL used to download artifacts from. This property is optional but should be set if artifacts are available for download.

An example configuration may look like downloadUrl: 'https://artifacts.acme.com:8081/upload/{{projectName}}/{{tagName}}/{{artifactFile}}'.

And will result in a final URL like https://artifacts.acme.com:8081/upload/app/v1.0.0/app-1.0.0.zip.