Skip to content
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.

k8s-jenkins-slave-nodejs-xvfb-chrome

License

Notifications You must be signed in to change notification settings

cloutainer/k8s-jenkins-slave-nodejs-xvfb-chrome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

‼️ DEPRECATED AND ARCHIVED

k8s-jenkins-slave-nodejs-xvfb-chrome

Kubernetes Docker image providing Jenkins Slave JNLP with Node.JS, xvfb and Google Chrome.


 

Preinstalled Tools

tool version
yarn 1.22.4
node.js 12.16.2
npm 6.14.4
google-chrome-stable 81.0.4044.122
kubernetes cli apt-get
Xvfb apt-get
git apt-get
curl, wget apt-get
zip, bzip2 apt-get
jq apt-get

 

Usage

Use with Kubernetes Jenkins Plugin like so:

podTemplate(
  name: 'nodejs-xvfb-chrome-v35',
  label: 'k8s-jenkins-slave-nodejs-xvfb-chrome-v35',
  cloud: 'mycloud',
  nodeSelector: 'failure-domain.beta.kubernetes.io/zone=eu-west-1a',
  containers: [
    containerTemplate(
      name: 'jnlp',
      image: 'cloutainer/k8s-jenkins-slave-nodejs-xvfb-chrome:v35',
      privileged: false,
      command: '/opt/docker-entrypoint.sh',
      args: '',
      alwaysPullImage: false,
      workingDir: '/home/jenkins',
      resourceRequestCpu: '500m',
      resourceLimitCpu: '1',
      resourceRequestMemory: '3000Mi',
      resourceLimitMemory: '3000Mi'
    )
  ]
) {
  node('k8s-jenkins-slave-nodejs-xvfb-chrome-v35') {
    stage('build and test') {
      sh 'mvn -version'
      sh 'git clone https://github.com/clouless/angular-4-unit-test-dummy.git'
      dir('angular-4-unit-test-dummy') {
        sh 'yarn'
        sh 'yarn test'
      }
    }
  }
}

 

License

MIT © Bernhard Grünewaldt