Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nezarfadle/10efece4c2b7e526d1446e84ca0e23eb to your computer and use it in GitHub Desktop.
Save nezarfadle/10efece4c2b7e526d1446e84ca0e23eb to your computer and use it in GitHub Desktop.
docker volume create --name data
docker run -d -v //var/run/docker.sock:/var/run/docker.sock -v data:/build --name jenkins -p 6060:8080 -p 50000:50000 jenkins
docker exec -it -u root jenkins bash
apt-get update
apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable"
apt-get update
apt-get install docker-ce

Jenkins Build

cd /build/
docker run --rm -v data:/app local-php7.1.12-cli:latest sh -c "export COMPOSER_ALLOW_SUPERUSER=1 && rm -rf /app/* && cd /app && git clone https://github.com/nezarfadle/jenkins.git && cd jenkins && composer install && vendor/phpunit/phpunit/phpunit --log-junit phpunit.results.xml || true"
cp jenkins/phpunit.results.xml ~/workspace/Demo/phpunit.results.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment