Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

CreateVariable

Erwan KOFFI edited this page Nov 21, 2017 · 1 revision

Create variable

This task allows you to create a brand new variable on Data Fabric.

The task can be launched with the command gradle createVariable.

Configuration

The configuration variable allows to create multiple variables at once.

Configuration object

Once your saagie object is available on your project with the server correctly set up, you need to fill the variable list which will be created.

saagie {
    server {...}

    variables {[
        {
            name = <variable_name>
            value = <variable_value>
            password = <password_flag>
        }
    ]}
}

The platform where variable will be created is set up in the server object. The gradle task will fail if a variable with the same name already exists.

Properties explanation

  • name (mandatory)

    • The name of the variable that will be created.
    • type: string
    • default:
  • value (mandatory)

    • The value of the variable.
    • type: string
    • default:
  • password (mandatory)

    • Set this flag to true if your variable has to be secured.
    • type: boolean
    • default: false

Examples

Simple variable

saagie {
    server {...}

    variables {[
        {
            name = 'MY_ENV_VAR'
            value = '9000'
        }
    ]}
}

Password variable

saagie {
    server {...}

    variables {[
        {
            name = 'MY_SECRET_VAR'
            value = 'secret'
            password = true
        }
    ]}
}

Multiples variables

saagie {
    server {...}

    variables {[
        {
            name = 'MY_ENV_VAR'
            value = '9001'
        },
        {
            name = 'MY_SECOND_VAR'
            value = '42'
        },
        {
            name = 'MY_THIRD_SECRET_VAR'
            value = '666'
            password = true
        }
    ]}
}

Clone this wiki locally