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

k8s-jenkins-slave-php

License

Notifications You must be signed in to change notification settings

cloutainer/k8s-jenkins-slave-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

‼️ DEPRECATED AND ARCHIVED

k8s-jenkins-slave-php

Kubernetes Docker image providing Jenkins Slave JNLP with PHP and Composer.


 

Preinstalled Tools

tool version
composer 1.6.3
php 7.0.25
git apt-get
curl, wget apt-get
zip, bzip2 apt-get
jq apt-get

 

Usage

Use with Kubernetes Jenkins Plugin like so:

podTemplate(
  name: 'php-v3',
  label: 'k8s-jenkins-slave-php-v3',
  cloud: 'mycloud',
  nodeSelector: 'failure-domain.beta.kubernetes.io/zone=eu-west-1a',
  containers: [
    containerTemplate(
      name: 'jnlp',
      image: 'cloutainer/k8s-jenkins-slave-php:v3',
      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-php-v3') {
    stage('build and test') {
      sh 'mvn -version'
      sh 'git clone https://github.com/clouless/WHATEVERAPP.git'
      dir('whateverapp') {
        sh 'composer require'
      }
    }
  }
}

 

License

MIT © Bernhard Grünewaldt