Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Update template xml and demo script
Browse files Browse the repository at this point in the history
  • Loading branch information
ssk2 committed Feb 12, 2016
1 parent 4665a5a commit b6b12fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 5 additions & 2 deletions bin/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,11 @@ function cleanup {

function create_cd_jobs {
local jenkins_url=$1
local dcos_url=$2
create_job ${jenkins_url} "jobs/build-cd-demo/config.xml" build-cd-demo
create_job ${jenkins_url} "jobs/deploy-cd-demo/config.xml" deploy-cd-demo
mkdir -p tmp/deploy-cd-demo
cat jobs/deploy-cd-demo/config.xml | sed "s#DCOS_URL#$dcos_url#g" > tmp/deploy-cd-demo/config.xml
create_job ${jenkins_url} "tmp/deploy-cd-demo/config.xml" deploy-cd-demo
create_view ${jenkins_url} "views/cd-demo-pipeline.xml" cd-demo-pipeline
trigger_build ${jenkins_url} build-cd-demo
}
Expand Down Expand Up @@ -175,7 +178,7 @@ function main {
cleanup $jenkins_url $demo_job_name $demo_job_count
;;
create-cd)
create_cd_jobs $jenkins_url
create_cd_jobs $jenkins_url $dcos_url
;;
*)
echo -e "Unknown operation: ${operation}\n"
Expand Down
6 changes: 2 additions & 4 deletions jobs/deploy-cd-demo/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@
<builders>
<hudson.tasks.Shell>
<command>GIT_EMAIL=$(git --no-pager show -s --format=&apos;%ae&apos; $GIT_COMMIT)
cat marathon.json | jq &quot;.container.docker.image = \&quot;mesosphere/cd-demo-app:${GIT_COMMIT}\&quot; | .id = \&quot;cd-demo-app-${JOB_NAME}\&quot; | .labels.lastChangedBy
= \&quot;${GIT_EMAIL}\&quot; &quot; &gt; marathon-rendered.json</command>
cat marathon.json | jq &quot;.container.docker.image = \&quot;mesosphere/cd-demo-app:${GIT_COMMIT}\&quot; | .id = \&quot;cd-demo-app-${JOB_NAME}\&quot; | .labels.lastChangedBy = \&quot;${GIT_EMAIL}\&quot; &quot; &gt; marathon-rendered.json</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>curl -X PUT http://sunil-h1f-elasticl-1sz9ryaph8sqp-870102724.us-west-2.elb.amazonaws.com/marathon/v2/apps/cd-demo-app-${JOB_NAME} -d @marathon-rendered.json -H
&quot;Content-type: application/json&quot;</command>
<command>curl -X PUT DCOS_URL/marathon/v2/apps/cd-demo-app-${JOB_NAME} -d @marathon-rendered.json -H &quot;Content-type: application/json&quot;</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
Expand Down

0 comments on commit b6b12fc

Please sign in to comment.