Skip to content

Instantly share code, notes, and snippets.

@bdpiprava
Last active March 13, 2018 11:14
Show Gist options
  • Save bdpiprava/2cdf2b5f8b8df7d7b80e12b2a43154cf to your computer and use it in GitHub Desktop.
Save bdpiprava/2cdf2b5f8b8df7d7b80e12b2a43154cf to your computer and use it in GitHub Desktop.
<elastic>
<profiles>
<profile id="dind-workflow" pluginId="cd.go.contrib.elasticagent.kubernetes">
<property>
<key>Image</key>
<value>gocd/gocd-agent-docker-dind:v18.2.0</value>
</property>
<property>
<key>MaxMemory</key>
</property>
<property>
<key>MaxCPU</key>
</property>
<property>
<key>Environment</key>
</property>
<property>
<key>PodConfiguration</key>
<value>apiVersion: v1
kind: Pod
metadata:
name: pod-name-prefix-{{ POD_POSTFIX }}
labels:
app: web
spec:
containers:
- name: gocd-agent-container-{{ CONTAINER_POSTFIX }}
image: {{ GOCD_AGENT_IMAGE }}:{{ LATEST_VERSION }}
securityContext:
privileged: true</value>
</property>
<property>
<key>SpecifiedUsingPodConfiguration</key>
<value>false</value>
</property>
<property>
<key>Privileged</key>
<value>true</value>
</property>
</profile>
</profiles>
</elastic>
<pipelines group="first">
<authorization>
<view>
<user>operate</user>
</view>
<admins>
<user>operate</user>
</admins>
</authorization>
<pipeline name="k8s-dind-workflow">
<materials>
<git url="https://github.com/gocd-contrib/github-oauth-authorization-plugin" />
</materials>
<stage name="up42_stage">
<jobs>
<job name="up42_job" elasticProfileId="dind-workflow">
<tasks>
<exec command="ls">
<arg>-lRt</arg>
<runif status="passed" />
</exec>
<exec command="bash">
<arg>-c</arg>
<arg>docker run -v $PWD:/material bdpiprava/gocd-agent-dind:0.0.1 /bin/sh -c "cd /material &amp;&amp; ./gradlew clean build"</arg>
<runif status="passed" />
</exec>
<exec command="ls">
<arg>-lRt</arg>
<runif status="passed" />
</exec>
</tasks>
<artifacts>
<test src="build/test-results/*" dest="test-results" />
<test src="build/reports/*" dest="reports" />
<artifact src="build/libs/*" dest="dist" />
</artifacts>
</job>
</jobs>
</stage>
</pipeline>
</pipelines>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment