Skip to content

Commit

Permalink
chore: distinct ci container for better jenkins performance (3653)
Browse files Browse the repository at this point in the history
* chore: distinct ci container for better jenkins performance

* chore: phpunit is needed

* chore: define composer cache dir
  • Loading branch information
mussbach committed Sep 12, 2024
1 parent 1d254a1 commit 0daf22c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ pipeline {
stage('Preparations') {
steps {
withCredentials([usernamePassword(credentialsId: 'Docker', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh '''docker login --username $USERNAME --password $PASSWORD && docker pull demosdeutschland/demosplan-base:latest'''
sh '''docker login --username $USERNAME --password $PASSWORD && docker pull demosdeutschland/demosplan-ci:latest'''
}
script{
containerName = "testContainer" + env.BRANCH_NAME + env.BUILD_NUMBER
commandDockerRun = 'docker run --cpus=1 -d --name ' + containerName + ' -v ${PWD}:/srv/www -v /var/cache/demosplanCI/:/srv/www/.cache/ --env CURRENT_HOST_USERNAME=$(whoami) --env CURRENT_HOST_USERID=$(id -u $(whoami)) demosdeutschland/demosplan-base:latest'
commandDockerRun = 'docker run --cpus=1 -d --name ' + containerName + ' -v ${PWD}:/srv/www -v /var/cache/demosplanCI/:/srv/www/.cache/ --env CURRENT_HOST_USERNAME=$(whoami) --env CURRENT_HOST_USERID=$(id -u $(whoami)) demosdeutschland/demosplan-ci:latest'
commandExecYarn = _dockerExecAsUser('YARN_CACHE_FOLDER=/srv/www/.cache/yarn yarn install --immutable --check-cache', containerName)
commandExecComposer = _dockerExecAsRoot('composer install --no-interaction', containerName)
commandExecComposer = _dockerExecAsRoot('COMPOSER_CACHE_DIR=/srv/www/.cache/composer composer install --classmap-authoritative --no-interaction', containerName)
sh "mkdir -p .cache"
sh "echo ${PWD}"
sh "$commandDockerRun"
Expand Down

0 comments on commit 0daf22c

Please sign in to comment.