Ejecutar test: PHPunit
Una ejecución sencilla y básica mediante comandos directamente en Jenkins. En este ejemplo no se obtiene ningún reporte o acción adicional.
Dentro de Ejecutar -> Ejecutar línea de comandos Shell ...
git status
git branch -v -a
git checkout dev
git merge origin/dev
echo "Wir Sind in ... "
pwd
phpunit tests
Primero muestra el status y las ramas, nos situamos en dev y ejecutamos un merge de la rama en origen. Ahora tenemos en el repositorio de jenkins una copia de la rama dev exacta a la de origen. Y ejecutamos phpunit tests. El resultado completo con las configuraciones de Notificacion E-Mail y Configurar orígen del código ...
Lanzada por el usuario Pepito Grillo
Ejecutando.en el espacio de trabajo /var/lib/jenkins/workspace/initProces
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/tuCuentaGitHUb/tuProyecto.git # timeout=10
Fetching upstream changes from https://github.com/tuCuentaGitHUb/tuProyecto.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials
> git fetch --tags --progress https://github.com/tuCuentaGitHUb/tuProyecto.git +refs/heads/*:
refs/remotes/origin/*
Seen branch in repository origin/dev
Seen branch in repository origin/master
Seen 2 remote branches
> git tag -l # timeout=10
Checking out Revision cc6c1f0d48ff53d5762f3c92cda3c56ed4d16734 (origin/master, origin/dev)
Commit message: "neu test"
> git config core.sparsecheckout # timeout=10
> git checkout -f cc6c1f0d48ff53d5762f3c92cda3c56ed4d16734
> git rev-list cc6c1f0d48ff53d5762f3c92cda3c56ed4d16734 # timeout=10
> git rev-list cc6c1f0d48ff53d5762f3c92cda3c56ed4d16734 # timeout=10
Checking for pre-build
Executing pre-build step
Checking if email needs to be generated
No emails were triggered.
[initProces] $ /bin/sh -xe /tmp/jenkins2409968119657455705.sh
+ git status
HEAD detached at cc6c1f0
Untracked files:
(use "git add <file>..." to include in what will be committed)
reports/results.xml
nothing added to commit but untracked files present (use "git add" to track)
+ git branch -v -a
* (HEAD detached at cc6c1f0) cc6c1f0 neu test
dev cc6c1f0 neu test
master 1b35351 [behind 60] File creation docuemntation, phpcs in composer, README.md update
remotes/origin/dev cc6c1f0 neu test
remotes/origin/master cc6c1f0 neu test
+ git checkout dev
Switched to branch 'dev'
Your branch is up-to-date with 'origin/dev'.
+ git merge origin/dev
Already up-to-date.
+ echo Wir Sind in ...
Wir Sind in ...
+ pwd
/var/lib/jenkins/workspace/initProces
+ phpunit tests
PHPUnit 6.2.3 by Sebastian Bergmann and contributors.
.. 2 / 2 (100%)
Time: 310 ms, Memory: 8.00MB
OK (2 tests, 2 assertions)
Checking for post-build
Performing post-build step
Checking if email needs to be generated
Email was triggered for: Always
Sending email for trigger: Always
messageContentType = text/plain; charset=UTF-8
Collecting change authors...
build: 112
Adding recipients from project recipient list
Adding recipients from trigger recipient list
Successfully created MimeMessage
Sending email to: [email protected]
Finished: SUCCESS
Y se reciben las notificaciones.