Last active
August 29, 2015 14:04
-
-
Save sizovs/dd8bf702fc7a62ce05e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovyx.net.http.HTTPBuilder | |
import groovyx.net.http.HttpResponseException | |
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7.2') | |
version = args[0] | |
if (!version) { | |
throw new IllegalArgumentException("No version specified") | |
} | |
archive = "askfm-node-$version-docker.zip" | |
host = 'http://172.16.0.2:8081' | |
http = new HTTPBuilder(host) | |
http.auth.basic 'jenkins', 'jenkins' | |
path = "/nexus/content/repositories/releases/com/rubylight/askfm/askfm-node/$version/$archive" | |
println "Downloading file from $host$path to $archive" | |
new File(archive) << http.get(path:path) | |
ant = new AntBuilder() | |
ant.unzip( src:"$archive", | |
dest:".", | |
overwrite:"true" ) | |
ant.copy(file:'askfm-node-docker/fig.yml', tofile:'fig.yml', overwrite: true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment