Giter VIP home page Giter VIP logo

scala-jenkins-infra's Introduction

Jenkins-based CI for the Scala project

Used for

Old documentation in doc directory; some pieces are still relevant, some are outdated.

History

The AWS infra was originally deployed and maintanied using ansible (this repo). We no longer use ansible to update the infra, but manage it manually (AWS console, ssh to the machines, jenkins UI, artifactory UI).

We are gradually moving away from using this infra

  • releases and integration builds are published on travis / appveyor
  • mergely tests for windows and on various jdks on github actions

But we still need it because

  • where would we put PR / integration builds?
  • where would we get enough resources to run the community build?

Webhooks, tokens, accounts etc

SSH access

Add the following to your ~/.ssh/config
Host jenkins-master
  HostName 54.67.111.226
  User admin

Host jenkins-worker-behemoth-1
  HostName 54.153.2.9
  User admin

Host jenkins-worker-behemoth-2
  HostName 54.153.1.99
  User admin

Host jenkins-worker-behemoth-3
  HostName 54.183.156.89
  User admin

# no public ip, jumphost through master
Host influxdb
  HostName 172.31.0.100
  User ubuntu
  ProxyCommand ssh -q -W %h:%p jenkins-master

Installed Services

nginx

Nginx for scala-ci.typesafe.com on jenkins-master, /etc/nginx/conf.d/jenkins.conf.

Handles jenkins, /artifactory, /grafana, /benchq, ...

Jenkins

Auth goes via GitHub. In the configuraton there's a field "Admin User Names".

AWS Workers are started / stopped by custom jenkins plugin: https://github.com/lightbend-labs/ec2-start-stop

TODO: how to get logs?

  • After a recent upgrade, scabot was no longer receiving job notifications from jenkins (it fixed itself...)
  • lrytz didn't figure out how to enable debug logs in jenkins
  • The notifications plugin produces logs, but no idea how to enable / find them

Artifactory

scala-ci.typesafe.com/artifactory/ to log in to the UI.

Repositories:

  • scala-pr-validation-snapshots
  • scala-integration for mergely builds
  • dbuild is an aggregate of cached remote repositories. used for the community build.

The config file is /opt/jfrog/artifactory/var/etc/system.yaml.

/opt/jfrog/artifactory/var/log/console.log has aggregated logs, logs for individual services in the same directory.

/opt/jfrog/artifactory/var/data/derby is the main database for our artifactory; its large (19G in Aug 2024).

The access service has its own db at /opt/jfrog/artifactory/var/data/access/derby.

Scabot

Scabot triggers Jenkins builds and updates their state on github commits / PRs.

  • Logs: journalctl -u scabot -f -n 100

Details

AWS CLI

  • brew install awscli
  • via okta, go to AWS IAM
  • unfold the "EngOps Scala" entry, click "Access keys" to get the SSO start URL and SSO Region
  • aws configure sso
  • set AWS_DEFAULT_PROFILE
  • aws ec2 describe-instances to test

Disk usage

Use ncdu -x /path to analyze disk usage.

Artifactory Disk Usage

Artifactory disk usage report: https://scala-ci.typesafe.com/ui/admin/monitoring/storage-summary.

Steps to delete old builds from scala-pr-validation-snapshots:

Create a file search.json, adjust the cutoff date on the last line:

items.find({
  "repo": "scala-pr-validation-snapshots",
  "$or": [ { "name": { "$match": "scala-compiler*" } }, {"name": { "$match": "scala-reflect*" } }, { "name": { "$match": "scala-library*" } }, { "name": { "$match": "scala-dist*" } }, { "name": { "$match": "scala-partest*" } }, { "name": { "$match": "scalap*" } } ],
  "created": { "$lt": "2020-01-01" }
})

curl -u 'lukas:SEEEKREET' -X POST "https://scala-ci.typesafe.com/artifactory/api/search/aql" -T search.json > artifacts.json

In an up-to-date Scala 2.13.x checkout, the following tests which of the artifacts correspond to revisions that were actually merged into scala/scala. Builds for those revisions are kept, builds for revisions that never made it are added to to-delete.txt.

n=$(cat artifacts.json | jq -r '.results[] | .path' | uniq | wc -l)
for p in $(cat artifacts.json | jq -r '.results[] | .path' | uniq); do
  n=$((n-1))
  sha=$(echo $p | awk -F'-' '{print $(NF-1)}')
  if git branch --contains $sha | grep 2.13.x > /dev/null; then
    echo "$sha y - $n"
  else
    echo "$sha n - $n"
    echo $p >> to-delete.txt
  fi
done

Delete the artifacts; best run it on ssh jenkins-master for performance.

n=$(cat to-delete.txt | wc -l)
for p in $(cat to-delete.txt); do
  n=$((n-1))
  echo "$p - $n"
  curl -u 'lukas:PASSWORDSEKRET' -X DELETE "https://scala-ci.typesafe.com/artifactory/scala-pr-validation-snapshots/$p"
done

After that

Other measures

Resize Drives / File Systems

Enlarging drives and their partitions seems to work well, even for the root partition of a running system (Debian).

  • Take a snapshot of the EBS Volume, wait for it to be completed
  • Use "Modify volume" and increase the size
  • Increase the partition and file system sizes (details here)
    • sudo growpart /dev/nvme0n1 1 (if there are partitions)
    • sudo resize2fs /dev/nvme0n1p1

Recreate Drive

To recreate a drive / file system (to shrink it, or to move to a different file system), create a new EBS volume, mount it and copy the data over using rsync.

  • new EBS volume, gp3, 400g, default iops/throughput. us-west-1c.
  • attach to instance as /dev/xvdN
  • lsblk
  • mkfs -t ext4 -N 50000000 /dev/xvdN (-N to specify the number of inodes; df -hi to display)
  • mkdir /home/jenkins-new
  • chown jenkins:root /home/jenkins-new
  • blkid to show UUID
  • fstab: UUID=YYYYYYYYYYYYYYYY /home/jenkins-new ext4 noatime 0 0
  • systemctl daemon-reload
  • mount -a
  • chown jenkins:root /home/jenkins-new
  • rsync -a -H --info=progress2 --info=name0 /home/jenkins/ /home/jenkins-new/
    • -H is important, git checkouts use hard links
  • fstab, mount new volume at /home/jenkins. comment out old volume
  • systemctl daemon-reload
  • reboot (old volume might be in use)

Unattended Upgrades

Enabled on master and behemoths

  • default config on behemoths, installs all updates.
  • only security updates on master, plus jenkins. Not artifactory because an apt upgrade of it doesn't restart the service. Also, artifactory updates tend to be more breaking.

JVM installations

Only a basic jre is installed through apt (eg openjdk-17-jre-headless).

Use sudo su and cd to /usr/lib/jvm, see the README file. Install new JDKs here, we default to adoptium.

chrony

On all machines (chronyc tracking to check):

root@ip-172-31-10-237:~# cat /etc/chrony/sources.d/aws.sources
#https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-ec2-ntp.html
server 169.254.169.123 prefer iburst minpoll 4 maxpoll 4

scala-jenkins-infra's People

Contributors

2m avatar adriaanm avatar darkdimius avatar gkossakowski avatar gourlaysama avatar lrytz avatar retronym avatar sethtisue avatar smarter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scala-jenkins-infra's Issues

ping slack or gitter when important jobs fail

A validation/main job with _scabot_pr in (2.11.x, 2.12.x) should never fail --> ping slack. Should we use a different job if we can't decide whether to ping based on param values?

redundant proxying of maven

making sure the SSL certs expire on different dates (or there is no redundancy), or that there's a fallback proxy so CI doesn't go all red when the proxy is no longer reachable/valid

integrate-then-merge by bot

add /integrate command, which launches the integration job on the merge commit of PR into target branch, actually merges PR on success

TODO: figure out smoothest way to do this -- ideally, we'd build actual merge comment and then push to repo, but that would mean not using the "merge button", closing the PR instead... maybe that's the way to go

avoid amazon linux

they are slow to upgrade & closed (hard to figure out which kernel we're running for example)

the EC2 api is readily available on ubuntu, though you need to --hint ec2 to tip off Ohai in knife bootstrap

regulate concurrency per category, not per job

We should really configure job concurrency at a category level:

Introduce category cpu-heavy for test/ide/community build and limit to 2 jobs per node. No need to limit concurrency for other jobs I think.

Create this file in jenkins root: hudson.plugins.throttleconcurrents.ThrottleJobProperty.xml

<?xml version='1.0' encoding='UTF-8'?>
<hudson.plugins.throttleconcurrents.ThrottleJobProperty_-DescriptorImpl plugin="[email protected]">
  <categories>
    <hudson.plugins.throttleconcurrents.ThrottleJobProperty_-ThrottleCategory>
      <categoryName>cpu-heavy</categoryName>
      <maxConcurrentPerNode>2</maxConcurrentPerNode>
      <maxConcurrentTotal>0</maxConcurrentTotal>
      <nodeLabeledPairs/>
    </hudson.plugins.throttleconcurrents.ThrottleJobProperty_-ThrottleCategory>
  </categories>
</hudson.plugins.throttleconcurrents.ThrottleJobProperty_-DescriptorImpl

The job config's ThrottleJobProperty (see job_blurbs) should look like:

<hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="[email protected]">
      <maxConcurrentPerNode>2</maxConcurrentPerNode>
      <maxConcurrentTotal>0</maxConcurrentTotal>
      <categories>
        <string>cpu-heavy</string>
      </categories>
      <throttleEnabled>true</throttleEnabled>
      <throttleOption>category</throttleOption>
</hudson.plugins.throttleconcurrents.ThrottleJobProperty>

release/finalize/staging job

send email to scala-internals announcing that a new release is staged (include link to sonatype staging repo, obtained from scala-2.11.x-integrate-bootstrap)

nightly on windows (2.11.x/jdk6)

  • install curl (need to update cygwin base image :-(() on jenkins-worker-windows-publish (done manually for now)
  • install /usr/local/share/jvm/jvm-select script on jenkins-worker-windows-publish (worked around for 2.11.x; fix needed to add 2.12.x support)
  • install ant on jenkins-worker-windows-publish (just unzip the archive and set ANT_HOME and PATH accordingly in windows node env vars) (done manually for now)
  • get pull-binary-libs craziness to work on cygwin (ARGH)

Intermittent "Slave went offline during the build"

https://scala-ci.typesafe.com/job/scala-2.11.x-integrate-ide/71/console

015-02-03 15:00:46,014 DEBUG [main] - ScalaPlugin - package fragment added or removed: src
2015-02-03 15:00:46,064 DEBUG [main] - ScalaProject - javabootclasspath: /usr/lib/jvm/jdk1.6.0_45/jre/lib/resources.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/rt.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/jsse.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/jce.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/charsets.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/ext/dnsns.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/ext/localedata.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/ext/sunpkcs11.jar
2015-02-03 15:00:46,064 DEBUG [main] - ScalaProject - javaextdirs:  
2015-02-03 15:00:46,064 DEBUG [main] - ScalaProject - scalabootclasspath: /home/jenkins/workspace/scala-2.11.x-integrate-ide/target/m2repo/p2/osgi/bundle/org.scala-lang.scala-library/2.11.6.v20150203-141730-da51dc9-SNAPSHOT-da51dc96f3/org.scala-lang.scala-library-2.11.6.v20150203-141730-da51dc9-SNAPSHOT-da51dc96f3.jar
2015-02-03 15:00:46,064 DEBUG [main] - ScalaProject - user classpath: /home/jenkins/workspace/scala-2.11.x-integrate-ide/target/m2repo/p2/osgi/bundle/org.scala-lang.scala-reflect/2.11.6.v20150203-141730-da51dc9-SNAPSHOT-da51dc96f3/org.scala-lang.scala-reflect-2.11.6.v20150203-141730-da51dc9-SNAPSHOT-da51dc96f3.jar:/home/jenkins/workspace/scala-2.11.x-integrate-ide/target/m2repo/p2/osgi/bundle/org.scala-lang.scala-actors/2.11.6.v20150203-141730-da51dc9-SNAPSHOT-da51dc96f3/org.scala-lang.scala-actors-2.11.6.v20150203-141730-da51dc9-SNAPSHOT-da51dc96f3.jar:/home/jenkins/workspace/scala-2.11.x-integrate-ide/target/m2repo/p2/osgi/bundle/org.scala-lang.scala-library/2.11.6.v20150203-141730-da51dc9-SNAPSHOT-da51dc96f3/org.scala-lang.scala-library-2.11.6.v20150203-141730-da51dc9-SNAPSHOT-da51dc96f3.jar
Slave went offline during the build
ERROR: Connection was broken: java.io.IOException: Sorry, this connection is closed.
    at com.trilead.ssh2.transport.TransportManager.ensureConnected(TransportManager.java:587)
    at com.trilead.ssh2.transport.TransportManager.sendMessage(TransportManager.java:660)
    at com.trilead.ssh2.channel.Channel.freeupWindow(Channel.java:407)
    at com.trilead.ssh2.channel.Channel.freeupWindow(Channel.java:347)
    at com.trilead.ssh2.channel.ChannelManager.getChannelData(ChannelManager.java:943)
    at com.trilead.ssh2.channel.ChannelInputStream.read(ChannelInputStream.java:58)
    at com.trilead.ssh2.channel.ChannelInputStream.read(ChannelInputStream.java:79)
    at hudson.remoting.FlightRecorderInputStream.read(FlightRecorderInputStream.java:82)
    at hudson.remoting.ChunkedInputStream.readHeader(ChunkedInputStream.java:72)
    at hudson.remoting.ChunkedInputStream.readUntilBreak(ChunkedInputStream.java:103)
    at hudson.remoting.ChunkedCommandTransport.readBlock(ChunkedCommandTransport.java:39)
    at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
Caused by: java.net.SocketException: Connection timed out
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
    at com.trilead.ssh2.crypto.cipher.CipherOutputStream.flush(CipherOutputStream.java:75)
    at com.trilead.ssh2.transport.TransportConnection.sendMessage(TransportConnection.java:193)
    at com.trilead.ssh2.transport.TransportConnection.sendMessage(TransportConnection.java:107)
    at com.trilead.ssh2.transport.TransportManager.sendMessage(TransportManager.java:677)
    at com.trilead.ssh2.channel.ChannelManager.sendData(ChannelManager.java:429)
    at com.trilead.ssh2.channel.ChannelOutputStream.write(ChannelOutputStream.java:63)
    at com.trilead.ssh2.channel.ChannelOutputStream.write(ChannelOutputStream.java:68)
    at hudson.remoting.ChunkedOutputStream.sendFrame(ChunkedOutputStream.java:93)
    at hudson.remoting.ChunkedOutputStream.sendBreak(ChunkedOutputStream.java:66)
    at hudson.remoting.ChunkedCommandTransport.writeBlock(ChunkedCommandTransport.java:46)
    at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.write(AbstractSynchronousByteArrayCommandTransport.java:45)
    at hudson.remoting.Channel.send(Channel.java:553)
    at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:279)
    at hudson.remoting.PipeWriter$1.run(PipeWriter.java:158)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
    at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18)
    at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21)
    at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Build step 'Execute shell' marked build as failure
ERROR: Publisher hudson.tasks.ArtifactArchiver aborted due to exception
hudson.AbortException: no workspace for scala-2.11.x-integrate-ide #71
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:72)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
    at hudson.model.Build$BuildExecution.post2(Build.java:183)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
    at hudson.model.Run.execute(Run.java:1743)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:89)
    at hudson.model.Executor.run(Executor.java:240)
ERROR: Publisher hudson.tasks.Mailer aborted due to exception
hudson.AbortException: no workspace for scala-2.11.x-integrate-ide #71
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:72)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
    at hudson.model.Build$BuildExecution.post2(Build.java:183)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
    at hudson.model.Run.execute(Run.java:1743)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:89)
    at hudson.model.Executor.run(Executor.java:240)
2015-02-03 15:00:46,064 DEBUG [main] - ScalaProject - [StandardCompletionTests$] initializing -deprecation to false (false)
2015-02-03 15:00:46,064 DEBUG [main] - ScalaProject - [StandardCompletionTests$] initializing -feature to false (false)

Basic IDE integration

Feature parity with the old setup: integrate with the IDE on last commit. Will refine this in #9.

builds aborted due to time out in agent connection?

Three builds on the same worker were all aborted near the end of the build for unexplained reasons. Is it the copy artifact plugin? (FlightRecorderInputStream)

Here's two of them:
https://scala-ci.typesafe.com/job/scala-2.11.x-validate-test/106/console
https://scala-ci.typesafe.com/job/scala-2.11.x-validate-test/107/consoleFull

Slave went offline during the build
ERROR: Connection was broken: java.io.IOException: Sorry, this connection is closed.
    at com.trilead.ssh2.transport.TransportManager.ensureConnected(TransportManager.java:587)
    at com.trilead.ssh2.transport.TransportManager.sendMessage(TransportManager.java:660)
    at com.trilead.ssh2.channel.Channel.freeupWindow(Channel.java:407)
    at com.trilead.ssh2.channel.Channel.freeupWindow(Channel.java:347)
    at com.trilead.ssh2.channel.ChannelManager.getChannelData(ChannelManager.java:943)
    at com.trilead.ssh2.channel.ChannelInputStream.read(ChannelInputStream.java:58)
    at com.trilead.ssh2.channel.ChannelInputStream.read(ChannelInputStream.java:79)
    at hudson.remoting.FlightRecorderInputStream.read(FlightRecorderInputStream.java:82)
    at hudson.remoting.ChunkedInputStream.readHeader(ChunkedInputStream.java:72)
    at hudson.remoting.ChunkedInputStream.readUntilBreak(ChunkedInputStream.java:103)
    at hudson.remoting.ChunkedCommandTransport.readBlock(ChunkedCommandTransport.java:39)
    at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
Caused by: java.net.SocketException: Connection timed out
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
    at com.trilead.ssh2.crypto.cipher.CipherOutputStream.flush(CipherOutputStream.java:75)
    at com.trilead.ssh2.transport.TransportConnection.sendMessage(TransportConnection.java:193)
    at com.trilead.ssh2.transport.TransportConnection.sendMessage(TransportConnection.java:107)
    at com.trilead.ssh2.transport.TransportManager.sendMessage(TransportManager.java:677)
    at com.trilead.ssh2.channel.ChannelManager.sendData(ChannelManager.java:429)
    at com.trilead.ssh2.channel.ChannelOutputStream.write(ChannelOutputStream.java:63)
    at com.trilead.ssh2.channel.ChannelOutputStream.write(ChannelOutputStream.java:68)
    at hudson.remoting.ChunkedOutputStream.sendFrame(ChunkedOutputStream.java:93)
    at hudson.remoting.ChunkedOutputStream.sendBreak(ChunkedOutputStream.java:66)
    at hudson.remoting.ChunkedCommandTransport.writeBlock(ChunkedCommandTransport.java:46)
    at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.write(AbstractSynchronousByteArrayCommandTransport.java:45)
    at hudson.remoting.Channel.send(Channel.java:553)
    at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:279)
    at hudson.remoting.PipeWriter$1.run(PipeWriter.java:158)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
    at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18)
    at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21)
    at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Build step 'Execute shell' marked build as failure
ERROR: Publisher hudson.tasks.ArtifactArchiver aborted due to exception
hudson.AbortException: no workspace for scala-2.11.x-validate-test #107
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:72)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
    at hudson.model.Build$BuildExecution.post2(Build.java:183)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
    at hudson.model.Run.execute(Run.java:1743)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:89)
    at hudson.model.Executor.run(Executor.java:240)

rework attribute handling

so that we don't have to run chef-client on each node that needs a new setting

i can only assume this is possible

release/finalize/publish job

consume release.properties artifact created upstream (TODO) by

  • integrate/bootstrap persists
    • sonatype staging repo id (sonaStagingRepoIds)
    • sha of scala/scala (scalaSha)
  • release/package/unix persists
    • sha of scala/scala (scalaDistSha)

This job is run in dry-run mode at end of staging job flow, and can be rebuilt to complete the release process once staging was tested by community.

When re-run under doRelease=1, it runs (example values for properties from 2.10.5 release):

repo_user="scala"
version="2.10.5"
scalaDistSha="0ec20a73fac8578ec1e469ff0a8c59726a2f0553"
scalaSha="88c5407613a3d8281b9b50c4bb110849a0149a97"
sonaStagingRepoIds="orgscala-lang-1186"

cd ~/git/scala-dist
git fetch https://github.com/$repo_user/scala-dist.git
git tag -s -m "Scala $version" v$version $scalaDistSha
git push https://github.com/$repo_user/scala-dist.git v$version

cd ~/git/scala
git fetch https://github.com/$repo_user/scala.git
git tag -s -m "Scala $version" v$version $scalaSha
git push https://github.com/$repo_user/scala.git v$version

for repo in $sonaStagingRepoIds; do st_stagingRepoPromote $repo; done 

and notifies scala-internals

refactor conversion from chef attributes to jenkins environment variables

Right now, we don't set any global variables, but every worker node does pull in some shared values. This is awkward, because chef-client needs to run on every node when changing a "global" jenkins variable. Instead, we should have a { "jenkins": { "environment": { .... } } } attribute set for every node. On the master node, this is translated into the global env vars for the jenkins master config, whereas for the workers it would go into the jenkins slave config.

multiple JDKs

  • install them
  • select them in job
  • backstop in release jobs to ensure we're on the right version of java

local maven mirror

dbuild generates a lot of traffic to maven/ivy repos. To speed up the build, we should proxy & cache them. Can we use a regular http proxy like squid (which can even be transparent using NAT) instead of a full blown artifactory install?

nginx correctly receives webhook payloads

Weirdly, json payloads seem unparseable, perhaps due to rate-limiting or chunking? When I hit "redeliver", it worked!

The following request gets a 500 response, saying the any_ref member (at the end!) is missing.

screenshot

Headers

Request URL: http://scala-ci.typesafe.com:8888/github
Request method: POST
content-type: application/json
Expect: 
User-Agent: GitHub-Hookshot/f5d5ca1
X-GitHub-Delivery: c6b8cc00-2610-11e5-8df0-2a4b8fe84742
X-GitHub-Event: push

Payload

{
  "ref": "refs/heads/2.12.x",
  "before": "057664807902aeab50e399455d7c7917e9a6d071",
  "after": "8a5aa6ee74eff54660984078839cea2c2be11116",
  "created": false,
  "deleted": false,
  "forced": false,
  "base_ref": null,
  "compare": "https://github.com/scala/scala/compare/057664807902...8a5aa6ee74ef",
  "commits": [
    {
      "id": "3bca6a23802adeb74b9524d0f80a0691fdaba441",
      "distinct": true,
      "message": "SI-9387 Fix VerifyError introduced by indylambda\n\nAs with regular `Apply`-s, we should compute the generated type\nbased on the function's type, rather than the expected type.\n\nIn the test case, the expected type was void. Now, we correctly\nuse the generated type of `scala/Function1`, which is enough\nto generate a subsequent POP instruction.\n\nThe tree shape involved was:\n\n```\narg0 = {\n  {\n    $anonfun()\n  };\n  scala.runtime.BoxedUnit.UNIT\n}\n```",
      "timestamp": "2015-07-09T16:10:00+10:00",
      "url": "https://github.com/scala/scala/commit/3bca6a23802adeb74b9524d0f80a0691fdaba441",
      "author": {
        "name": "Jason Zaugg",
        "email": "[email protected]",
        "username": "retronym"
      },
      "committer": {
        "name": "Jason Zaugg",
        "email": "[email protected]",
        "username": "retronym"
      },
      "added": [
        "test/files/run/t9387.scala",
        "test/files/run/t9387b.check",
        "test/files/run/t9387b.scala"
      ],
      "removed": [

      ],
      "modified": [
        "src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala"
      ]
    },
    {
      "id": "8a5aa6ee74eff54660984078839cea2c2be11116",
      "distinct": true,
      "message": "Merge pull request #4617 from retronym/ticket/9387\n\nSI-9387 Fix VerifyError introduced by indylambda",
      "timestamp": "2015-07-09T18:01:55+10:00",
      "url": "https://github.com/scala/scala/commit/8a5aa6ee74eff54660984078839cea2c2be11116",
      "author": {
        "name": "Jason Zaugg",
        "email": "[email protected]",
        "username": "retronym"
      },
      "committer": {
        "name": "Jason Zaugg",
        "email": "[email protected]",
        "username": "retronym"
      },
      "added": [
        "test/files/run/t9387.scala",
        "test/files/run/t9387b.check",
        "test/files/run/t9387b.scala"
      ],
      "removed": [

      ],
      "modified": [
        "src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala"
      ]
    }
  ],
  "head_commit": {
    "id": "8a5aa6ee74eff54660984078839cea2c2be11116",
    "distinct": true,
    "message": "Merge pull request #4617 from retronym/ticket/9387\n\nSI-9387 Fix VerifyError introduced by indylambda",
    "timestamp": "2015-07-09T18:01:55+10:00",
    "url": "https://github.com/scala/scala/commit/8a5aa6ee74eff54660984078839cea2c2be11116",
    "author": {
      "name": "Jason Zaugg",
      "email": "[email protected]",
      "username": "retronym"
    },
    "committer": {
      "name": "Jason Zaugg",
      "email": "[email protected]",
      "username": "retronym"
    },
    "added": [
      "test/files/run/t9387.scala",
      "test/files/run/t9387b.check",
      "test/files/run/t9387b.scala"
    ],
    "removed": [

    ],
    "modified": [
      "src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala"
    ]
  },
  "repository": {
    "id": 2888818,
    "name": "scala",
    "full_name": "scala/scala",
    "owner": {
      "name": "scala",
      "email": ""
    },
    "private": false,
    "html_url": "https://github.com/scala/scala",
    "description": "The Scala programming language",
    "fork": false,
    "url": "https://github.com/scala/scala",
    "forks_url": "https://api.github.com/repos/scala/scala/forks",
    "keys_url": "https://api.github.com/repos/scala/scala/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/scala/scala/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/scala/scala/teams",
    "hooks_url": "https://api.github.com/repos/scala/scala/hooks",
    "issue_events_url": "https://api.github.com/repos/scala/scala/issues/events{/number}",
    "events_url": "https://api.github.com/repos/scala/scala/events",
    "assignees_url": "https://api.github.com/repos/scala/scala/assignees{/user}",
    "branches_url": "https://api.github.com/repos/scala/scala/branches{/branch}",
    "tags_url": "https://api.github.com/repos/scala/scala/tags",
    "blobs_url": "https://api.github.com/repos/scala/scala/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/scala/scala/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/scala/scala/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/scala/scala/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/scala/scala/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/scala/scala/languages",
    "stargazers_url": "https://api.github.com/repos/scala/scala/stargazers",
    "contributors_url": "https://api.github.com/repos/scala/scala/contributors",
    "subscribers_url": "https://api.github.com/repos/scala/scala/subscribers",
    "subscription_url": "https://api.github.com/repos/scala/scala/subscription",
    "commits_url": "https://api.github.com/repos/scala/scala/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/scala/scala/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/scala/scala/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/scala/scala/issues/comments{/number}",
    "contents_url": "https://api.github.com/repos/scala/scala/contents/{+path}",
    "compare_url": "https://api.github.com/repos/scala/scala/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/scala/scala/merges",
    "archive_url": "https://api.github.com/repos/scala/scala/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/scala/scala/downloads",
    "issues_url": "https://api.github.com/repos/scala/scala/issues{/number}",
    "pulls_url": "https://api.github.com/repos/scala/scala/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/scala/scala/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/scala/scala/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/scala/scala/labels{/name}",
    "releases_url": "https://api.github.com/repos/scala/scala/releases{/id}",
    "created_at": 1322715754,
    "updated_at": "2015-07-09T07:52:10Z",
    "pushed_at": 1436428918,
    "git_url": "git://github.com/scala/scala.git",
    "ssh_url": "[email protected]:scala/scala.git",
    "clone_url": "https://github.com/scala/scala.git",
    "svn_url": "https://github.com/scala/scala",
    "homepage": "http://www.scala-lang.org/",
    "size": 194211,
    "stargazers_count": 4455,
    "watchers_count": 4455,
    "language": "Scala",
    "has_issues": false,
    "has_downloads": true,
    "has_wiki": true,
    "has_pages": true,
    "forks_count": 1150,
    "mirror_url": null,
    "open_issues_count": 17,
    "forks": 1150,
    "open_issues": 17,
    "watchers": 4455,
    "default_branch": "2.11.x",
    "stargazers": 4455,
    "master_branch": "2.11.x",
    "organization": "scala"
  },
  "pusher": {
    "name": "retronym",
    "email": "[email protected]"
  },
  "organization": {
    "login": "scala",
    "id": 57059,
    "url": "https://api.github.com/orgs/scala",
    "repos_url": "https://api.github.com/orgs/scala/repos",
    "events_url": "https://api.github.com/orgs/scala/events",
    "members_url": "https://api.github.com/orgs/scala/members{/member}",
    "public_members_url": "https://api.github.com/orgs/scala/public_members{/member}",
    "avatar_url": "https://avatars.githubusercontent.com/u/57059?v=3",
    "description": ""
  },
  "sender": {
    "login": "retronym",
    "id": 65551,
    "avatar_url": "https://avatars.githubusercontent.com/u/65551?v=3",
    "gravatar_id": "",
    "url": "https://api.github.com/users/retronym",
    "html_url": "https://github.com/retronym",
    "followers_url": "https://api.github.com/users/retronym/followers",
    "following_url": "https://api.github.com/users/retronym/following{/other_user}",
    "gists_url": "https://api.github.com/users/retronym/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/retronym/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/retronym/subscriptions",
    "organizations_url": "https://api.github.com/users/retronym/orgs",
    "repos_url": "https://api.github.com/users/retronym/repos",
    "events_url": "https://api.github.com/users/retronym/events{/privacy}",
    "received_events_url": "https://api.github.com/users/retronym/received_events",
    "type": "User",
    "site_admin": false
  },
  "distinct_commits": [
    {
      "id": "3bca6a23802adeb74b9524d0f80a0691fdaba441",
      "distinct": true,
      "message": "SI-9387 Fix VerifyError introduced by indylambda\n\nAs with regular `Apply`-s, we should compute the generated type\nbased on the function's type, rather than the expected type.\n\nIn the test case, the expected type was void. Now, we correctly\nuse the generated type of `scala/Function1`, which is enough\nto generate a subsequent POP instruction.\n\nThe tree shape involved was:\n\n```\narg0 = {\n  {\n    $anonfun()\n  };\n  scala.runtime.BoxedUnit.UNIT\n}\n```",
      "timestamp": "2015-07-09T16:10:00+10:00",
      "url": "https://github.com/scala/scala/commit/3bca6a23802adeb74b9524d0f80a0691fdaba441",
      "author": {
        "name": "Jason Zaugg",
        "email": "[email protected]",
        "username": "retronym"
      },
      "committer": {
        "name": "Jason Zaugg",
        "email": "[email protected]",
        "username": "retronym"
      },
      "added": [
        "test/files/run/t9387.scala",
        "test/files/run/t9387b.check",
        "test/files/run/t9387b.scala"
      ],
      "removed": [

      ],
      "modified": [
        "src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala"
      ]
    },
    {
      "id": "8a5aa6ee74eff54660984078839cea2c2be11116",
      "distinct": true,
      "message": "Merge pull request #4617 from retronym/ticket/9387\n\nSI-9387 Fix VerifyError introduced by indylambda",
      "timestamp": "2015-07-09T18:01:55+10:00",
      "url": "https://github.com/scala/scala/commit/8a5aa6ee74eff54660984078839cea2c2be11116",
      "author": {
        "name": "Jason Zaugg",
        "email": "[email protected]",
        "username": "retronym"
      },
      "committer": {
        "name": "Jason Zaugg",
        "email": "[email protected]",
        "username": "retronym"
      },
      "added": [
        "test/files/run/t9387.scala",
        "test/files/run/t9387b.check",
        "test/files/run/t9387b.scala"
      ],
      "removed": [

      ],
      "modified": [
        "src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala"
      ]
    }
  ],
  "ref_name": "2.12.x"
}

push-to-deploy using chef zero and secret management

Move away from hosted chef and client-server setup. It's much nicer to have everything versioned in git (right now, we need to go the the chef.io website to find out which version of cookbooks are used). For secret management, we could use https://vaultproject.io/ (via http://sirupsen.com/production-docker/#secrets). We still need some kind of search to discover nodes, though maybe that's kind of overkill?

  • experiment with chef-solo (--> it's not a solution)
  • replacement for chef vault? (nope, it needs chef server)
  • push to deploy instead of knife cookbook upload?

scabot git hooks & deploy setup

create ~scabot/scabot/.git/hooks/post-receive from https://github.com/mislav/git-deploy/blob/master/lib/hooks/post-receive.sh
chmod a+x ~scabot/scabot/.git/hooks/post-receive
git config receive.denyCurrentBranch ignore

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.