Skip to content

Commit 97047ac

Browse files
committed
[multi-user CI] WIP: dotty job templates, scabot conf
TODO: create a script in lampepfl/dotty with path `scripts/jobs/validate/main`, inspired by https://github.com/scala/scala/tree/2.11.x/scripts/jobs/validate/publish-core, that does something like: ``` baseDir=${WORKSPACE-`pwd`} scriptsDir="$baseDir/scripts" . $scriptsDir/common update scala scala # note: do not do `cd ..`, so adjust your build to reflect scala/ is created in $baseDir sbt -Ddotty.travis.build=yes update compile test scalastyle ``` Where scripts/common has: ``` update() { [[ -d $baseDir ]] || mkdir -p $baseDir cd $baseDir if [ ! -d $baseDir/$2 ]; then git clone "https://github.com/$1/$2.git"; fi cd $2 git fetch --tags "https://github.com/$1/$2.git" (git fetch "https://github.com/$1/$2.git" $3 && git checkout -fq FETCH_HEAD) #|| git checkout -fq $3 # || fallback is for local testing on tag git reset --hard } ```
1 parent 3c760e9 commit 97047ac

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

recipes/_master-jenkins-jobs.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ def expandJobTemplates(user, repo, branch)
8484
expandJobTemplates("scala", "scala", branch)
8585
end
8686

87+
# create dotty-$branch-$jobName for every template under jobs/
88+
%w{ master }.each do | branch |
89+
expandJobTemplates("lampepfl", "dotty", branch)
90+
end
91+
8792

8893
# TODO #10: make a view for each top-level directory under jobs/ that lists all jobs under it (scala-2.11.x-integrate, scala-2.11.x-release, scala-2.11.x-validate)
8994
# https://issues.jenkins-ci.org/browse/JENKINS-8927
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<project>
3+
<%= githubProject(
4+
repoUser: @user,
5+
repoName: "dotty",
6+
repoRef: @branch,
7+
description: "PR validation",
8+
nodeRestriction: "public",
9+
params: [
10+
{:name => "_scabot_pr", :desc => "For internal use by Scabot."}
11+
],
12+
jvmVersion: 8,
13+
jvmFlavor: "oracle",
14+
buildNameScript: setValidateBuildNameScript)
15+
%>
16+
<publishers>
17+
<hudson.tasks.Mailer plugin="[email protected]">
18+
<recipients>[email protected]</recipients>
19+
<dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
20+
<sendToIndividuals>false</sendToIndividuals>
21+
</hudson.tasks.Mailer>
22+
</publishers>
23+
</project>

templates/default/scabot.conf.erb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,19 @@ scala: {
1313
token: "<%=@scabotVault['github']['scala']['token']%>"
1414
}
1515
}
16+
17+
dotty: {
18+
jenkins: {
19+
jobSuffix: "validate-main"
20+
host: "<%=node['master']['jenkinsHost']%>"
21+
user: "<%=node['scabot']['jenkins']['user']%>"
22+
token: "<%=scabotVault['jenkins']['token']%>"
23+
}
24+
github: {
25+
repo: "dotty"
26+
branches: ["master"]
27+
host: "api.github.com"
28+
user: "lampepfl"
29+
token: "<%=scabotVault['github']['lampepfl']['token']%>"
30+
}
31+
}

0 commit comments

Comments
 (0)