This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example-config.xml
95 lines (95 loc) · 3.86 KB
/
example-config.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?xml version='1.1' encoding='UTF-8'?>
<project>
<actions/>
<description>Render the package documentation website for https://docs.ropensci.org
</description>
<keepDependencies>false</keepDependencies>
<properties>
<hudson.plugins.jira.JiraProjectProperty plugin="[email protected]"/>
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="[email protected]">
<projectUrl>https://github.com/ropensci/drake/</projectUrl>
<displayName></displayName>
</com.coravy.hudson.plugins.github.GithubProjectProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/ropensci/drake</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>*/master</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
<extensions/>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers>
<hudson.triggers.TimerTrigger>
<spec>H H * * H
</spec>
</hudson.triggers.TimerTrigger>
<com.cloudbees.jenkins.GitHubPushTrigger plugin="[email protected]">
<spec></spec>
</com.cloudbees.jenkins.GitHubPushTrigger>
</triggers>
<concurrentBuild>false</concurrentBuild>
<builders>
<com.cloudbees.jenkins.GitHubSetCommitStatusBuilder plugin="[email protected]">
<statusMessage>
<content></content>
</statusMessage>
<contextSource class="org.jenkinsci.plugins.github.status.sources.ManuallyEnteredCommitContextSource">
<context>ropensci/jenkins/pkgdown</context>
</contextSource>
</com.cloudbees.jenkins.GitHubSetCommitStatusBuilder>
<hudson.tasks.Shell>
<command>#!/bin/sh
set -e
echo "Starting pkgdown build!"
echo ""
git log -n1
echo ""
cat DESCRIPTION
BASENAME=$(basename $PWD)
PACKAGE=$(grep 'Package:' DESCRIPTION | awk '{print $NF}')
echo "PACKAGE NAME: $PACKAGE"
echo "GIT_BRANCH: $GIT_BRANCH"
if [ "$GIT_BRANCH" = "origin/master" ]; then
ENABLE_CACHE="--env R_LIBS_USER=/cache -v ${BASENAME}_cache:/cache"
ENABLE_STORE="-v data:/data"
fi
ID=$(docker create --rm $ENABLE_CACHE $ENABLE_STORE ropensci/docs build "/$BASENAME")
docker cp $PWD "$ID:/$BASENAME"
docker start $ID --attach
if [ "$GIT_BRANCH" = "origin/master" ]; then
echo "Deploying to https://docs.ropensci.org"
docker run --rm --env-file=/var/jenkins_home/ghtoken.txt -v data:/data ropensci/docs deploy $PACKAGE
else
echo "Skipping deployment for non-master branch"
fi
echo "All done!"
</command>
</hudson.tasks.Shell>
</builders>
<publishers>
<org.jenkinsci.plugins.github.status.GitHubCommitStatusSetter plugin="[email protected]">
<commitShaSource class="org.jenkinsci.plugins.github.status.sources.BuildDataRevisionShaSource"/>
<reposSource class="org.jenkinsci.plugins.github.status.sources.AnyDefinedRepositorySource"/>
<contextSource class="org.jenkinsci.plugins.github.status.sources.ManuallyEnteredCommitContextSource">
<context>ropensci/jenkins/pkgdown</context>
</contextSource>
<statusResultSource class="org.jenkinsci.plugins.github.status.sources.DefaultStatusResultSource"/>
<statusBackrefSource class="org.jenkinsci.plugins.github.status.sources.BuildRefBackrefSource"/>
<errorHandlers/>
</org.jenkinsci.plugins.github.status.GitHubCommitStatusSetter>
</publishers>
<buildWrappers/>
</project>