Skip to content

Instantly share code, notes, and snippets.

@bagheera
Created August 10, 2012 10:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bagheera/3313376 to your computer and use it in GitHub Desktop.
Save bagheera/3313376 to your computer and use it in GitHub Desktop.
go-task-snippets
<exec command="bundle">
<arg>exec</arg>
<arg>rake</arg>
<arg>db:migrate</arg>
</exec>
<!--
name: echo_windows
description: echo on windows
author: Go Team
platform: windows
moreinfo: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/echo.mspx?mfr=true
keywords: echo
-->
<exec command="cmd">
<!--/c makes cmd exit after one command.-->
<arg>/c</arg>
<arg>echo</arg>
<arg>hello ${GO_PIPELINE_LABEL}</arg>
</exec>
<!--
name:
description: Simple maven task.
author: Go Team
platform: Linux, Windows
moreinfo: http://community.thoughtworks.com/comment/4396
keywords: mvn, maven, build
-->
<exec command="/bin/bash">
<arg>-c</arg>
<arg>'echo ${GO_PIPELINE_LABEL}'</arg>
</exec>
<!--
name: maven
description: Simple maven task.
author: Go Team
platform: Java
moreinfo: http://www.thoughtworks-studios.com/content/continuous-delivery-maven-and-go-maven-central
keywords: mvn, maven, build
-->
<exec command="mvn" workingdir="some-folder-under-agent-sandbox">
<arg>-V</arg>
<arg>package</arg>
</exec>
<!--
name: msbuild command line
description: build system for Visual Studio
author: Go Team
platform: windows
moreinfo: http://lyricsoft.blogspot.in/2012/08/we-are-often-asked-about-using.html
keywords: msbuild, nant, build
-->
<exec command="MsBuild">
<arg>D:\path\to\project.sln</arg>
<arg>/REBUILD</arg>
<arg>/CFG="Release_99|Win32"</arg>
</exec>
<!--
name: nuget_pack
author: Mark Richter
description: Create a NuGet package
moreinfo: http://lyricsoft.blogspot.in/2012/10/how-to-build-and-publish-to-nuget-using.html
keywords: nuget, pack, package
-->
<exec command="nuget" workingdir="Nuget">
<arg>pack</arg>
<arg>component.nuspec</arg>
<arg>-version</arg>
<arg>1.5.%GO_PIPELINE_COUNTER%</arg>
</exec>
<!--
name: nuget_publish
author: Mark Richter
description: Publish a NuGet package
moreinfo: http://lyricsoft.blogspot.in/2012/10/how-to-build-and-publish-to-nuget-using.html
keywords: nuget, publish, push, package
-->
<exec command="nuget" workingdir="Nuget">
<arg>push</arg>
<arg>component.1.5.%GO_PIPELINE_COUNTER%.nupkg</arg>
<arg>%NUGETAPIKEY%</arg>
<arg>-Timeout</arg>
<arg>60</arg>
<runif status="passed"/>
</exec>
<!--
name: scp
description: secure file copy assuming automatic ssh public key authentication
author: Go Team
platform: Linux
moreinfo: http://www.hypexr.org/linux_scp_help.php
keywords: scp, cp, copy, ftp
-->
<exec command="/bin/bash">
<arg>-c</arg>
<arg>scp -o StrictHostKeyChecking=no source-file user@dest-server:/dest-directory</arg>
</exec>
<!--
Using a version controlled script instead of a job with ten tasks
-->
<exec command="/bin/ruby">
<arg>do_ten_things.rb</arg>
</exec>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment