Groovy web console

subscribe to the feed Subscribe
to this
site

array tests

Published 3 weeks ago by vahe
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
void send(List channels = []) {
    def SLACK_CHANNEL = "jenkins,deployment"

    if (SLACK_CHANNEL) {
        channels.addAll(SLACK_CHANNEL.split(','))
    }

    def uniqueChannels = channels.toUnique()
    println "${uniqueChannels}"
}

send(["jenkins"])