Sign inSign up

liveforensics/jenkinswindowsslave

By liveforensics

•Updated about 7 years ago

This is a Jenkins Windows Build Slave Node built on windowsservercore.

Image
1

936

liveforensics/jenkinswindowsslave repository overview

This is a Windows Image designed to run in a Windows Container.

This image is designed to operate as a Jenkins Slave node. It is built on top of the windowsservercore image and includes the following:

  • Chocolatey
  • Windows Git Client
  • Java JDK8
  • Jenkins Java Build agent
  • Microsoft Build Tools
⁠Instructions:

Create a new node in your Jenkins Master. Make sure you select "Permanent Agent". Make sure you set "Remote Root Directory" to "c:\JenkinsRoot" and "Launch Method" to "Launch Agent via Java Web Start". Click OK and then click the new node and you will see something like this:

java -jar agent.jar -jnlpUrl http://my-jenkins-server.com:8000/computer/Docker1/slave-agent.jnlp -secret de494735554fab06e3f26139ce178360c9e418368c50a8e072f3197cdee89f6c -workDir "c:\jenkinsroot"

Copy the jnlpUrl and secret values into the docker-compose file below.

⁠docker-compose.yml

version: '2.1'
services:
   JenkinsWindowsSlave:
   image: liveforensics/jenkinswindowsslave:1903
   container_name: JenkinsSlave
   networks:
     - jenkins-network
   environment:
     - JENKINS_URL=http://my-jenkins-server.com:8000/computer/Docker1/slave-agent.jnlp
     - JENKINS_SECRET=e2dxxxxxxxxxxxxxx..xxxxxxxxxxxxxxx4a3f
   mem_limit: 2G

 networks:
   jenkins-network:
       driver: nat

NOTE: If you need to replace agent.jar, jenkins-slave.exe or jenkins-slave.exe.config because you need a different version to the one in the image, create a local folder with the replacement file(s) in it and make a volume mount like this:

volumes:
      - YOUR_FOLDER:c:\Persist    

The files from your folder will overwrite the ones in the container on boot.

⁠direct access

Once the container is running, you can access it with

docker exec -it yourcontainername powershell

⁠Versions

⁠1903

based on mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-1903

Visual Studio 2017 Workloads

  • Microsoft.Component.MSBuild
  • Microsoft.VisualStudio.Component.TestTools.Core
  • Microsoft.VisualStudio.Component.TestTools.MicrosoftTestManager
  • Microsoft.Net.Component.4.5.TargetingPack

Environment

  • JAVA = c:\program files\java\jdk1.8.0_191\bin\java.exe
  • MSBUILD = c:\buildtools\msbuild\15.0\bin\msbuild.exe
  • MSTEST = c:\buildtools\common7\ide\extensions\testplatform\vstest.console.exe
  • CODECOV = c:\buildtools\team tools\dynamic code coverage tools\codecoverage.exe
⁠ent-1.0.0

based on microsoft/dotnet-framework:4.7.2-runtime-windowsservercore-1803

Visual Studio 2017 Workloads

  • Microsoft.Component.MSBuild
  • Microsoft.VisualStudio.Component.TestTools.Core
  • Microsoft.VisualStudio.Component.TestTools.MicrosoftTestManager
  • Microsoft.Net.Component.4.5.TargetingPack

Environment

  • JAVA = c:\program files\java\jdk1.8.0_191\bin\java.exe
  • MSBUILD = c:\buildtools\msbuild\15.0\bin\msbuild.exe
  • MSTEST = c:\buildtools\common7\ide\extensions\testplatform\vstest.console.exe
  • CODECOV = c:\buildtools\team tools\dynamic code coverage tools\codecoverage.exe
⁠ent-1.0.1

based on microsoft/dotnet-framework:4.7.2-runtime-windowsservercore-1803

Visual Studio 2017 Workloads

  • Microsoft.Component.MSBuild
  • Microsoft.VisualStudio.Component.TestTools.Core
  • Microsoft.VisualStudio.Component.TestTools.MicrosoftTestManager

Environment

  • JAVA = c:\program files\java\jdk1.8.0_191\bin\java.exe
  • MSBUILD = c:\buildtools\msbuild\15.0\bin\msbuild.exe
  • MSTEST = c:\buildtools\common7\ide\extensions\testplatform\vstest.console.exe
  • CODECOV = c:\buildtools\team tools\dynamic code coverage tools\codecoverage.exe
⁠add more workloads

Access your container as shown above, then do something like this..

cd \vs
.\vs_enterprise.exe modify --norestart --passive --installPath "c:\buildtools" --add Component.Dotfuscator

It won't give you any feedback, be patient. I use get-process to see when the installer has finished.

⁠Using Splunk?

If so you might want to check out liveforensics/splunkins⁠, which is this image as a base with an added Splunk Universal Forwarder.

Tag summary

Content type

Image

Digest

Size

4.1 GB

Last updated

about 7 years ago

docker pull liveforensics/jenkinswindowsslave