diff --git a/README.md b/README.md index 3641c44..8d8145b 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ cd docker-ci-tool-stack docker-compose up ``` -## Access Tools +## Access Tools | *Tool* | *Link* | *Credentials* | | ------------- | ------------- | ------------- | @@ -54,6 +54,7 @@ docker-compose up | SonarQube | http://${docker-machine ip default}:9000/ | admin/admin | | Nexus | http://${docker-machine ip default}:8081/nexus | admin/admin123 | | GitLab | http://${docker-machine ip default}:10080/ | root/5iveL!fe | +| Selenium Grid | http://${docker-machine ip default}:4444/grid/console | no login required | ## Screenshots @@ -63,11 +64,22 @@ Here is an overview of all tools: - Jenkins contains build job and is triggered once projects in GitLab are updated - As part of the CI build, Jenkins triggers a static code analysis and the results are stored in SonarQube - The Maven build uses Nexus as a Proxy Repository for all 3rd party libs. The build artefacts are deployed to the Nexus Release Repository +- The Selenium Grid contains Docker containers running Chrome and Firefox and is used for UI tests ![Docker CI Tools](screenshots/docker-ci-tools.png) ### Jenkins Jobs +There are several jobs preconfigured in Jenkins. +The Jobs cover the following tasks: + +- Continuous Integration Build with Maven +- Unit Tests +- Static Source Analysis results are stored in SonarQube +- JaCoCo Test Coverage +- Deployment to Nexus +- Jenkins Job DSL examples + ![Conference App Jobs](screenshots/jenkins-jobs-1.png) ![Conference App CI Job](screenshots/jenkins-jobs-2-conference-app-ci.png) @@ -80,14 +92,6 @@ Here is an overview of all tools: ![Nexus Proxy Repository](screenshots/nexus.png) -## Jenkins Build Jobs +### Selenium Grid -There are several jobs preconfigured in Jenkins. -The Jobs cover the following tasks: - -- Continuous Integration Build with Maven -- Unit Tests -- Static Source Analysis results are stored in SonarQube -- JaCoCo Test Coverage -- Deployment to Nexus -- Jenkins Job DSL examples +![Selenium Grid](screenshots/selenium-grid.png) diff --git a/docker-compose.yml b/docker-compose.yml index 8ec77ab..48fe57e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ jenkins: - nexus:nexus - gitlab:gitlab - sonar:sonar + - selhub:hub sonar: build: ./sonar @@ -26,6 +27,25 @@ db: - POSTGRES_USER=sonar - POSTGRES_PASSWORD=sonar +selhub: + image: selenium/hub + ports: + - 4444:4444 + +nodeff: + image: selenium/node-firefox-debug + ports: + - 5900 + links: + - selhub:hub + +nodechrome: + image: selenium/node-chrome-debug + ports: + - 5900 + links: + - selhub:hub + postgresql: image: sameersbn/postgresql:9.4-3 environment: diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index 7abc907..a4b7bde 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -7,6 +7,7 @@ RUN /usr/local/bin/plugins.sh /var/jenkins_home/plugins.txt COPY jobs/1-github-seed-job.xml /usr/share/jenkins/ref/jobs/1-github-seed-job/config.xml COPY jobs/2-job-dsl-seed-job.xml /usr/share/jenkins/ref/jobs/2-job-dsl-seed-job/config.xml COPY jobs/3-conference-app-seed-job.xml /usr/share/jenkins/ref/jobs/3-conference-app-seed-job/config.xml +COPY jobs/4-selenium2-maven-test.xml /usr/share/jenkins/ref/jobs/4-selenium2-maven-test/config.xml COPY jobs/6-conference-app-ci.xml /usr/share/jenkins/ref/jobs/conference-app-1-ci/config.xml COPY jobs/6-conference-app-sonar-analysis.xml /usr/share/jenkins/ref/jobs/conference-app-2-sonar-analysis/config.xml COPY jobs/7-conference-app-monitoring-ci.xml /usr/share/jenkins/ref/jobs/conference-app-monitoring-1-ci/config.xml diff --git a/jenkins/jobs/4-selenium2-maven-test.xml b/jenkins/jobs/4-selenium2-maven-test.xml new file mode 100644 index 0000000..afd5c7f --- /dev/null +++ b/jenkins/jobs/4-selenium2-maven-test.xml @@ -0,0 +1,61 @@ + + + + + + -1 + 10 + -1 + -1 + + false + + + https://github.com/marcelbirkner/selenium2-maven-project/ + + + false + false + + + + 2 + + + https://github.com/marcelbirkner/selenium2-maven-project + + + + + */master + + + false + + + + true + false + false + false + + false + + + clean test -Dgrid.server.url=http://${DOCKERCITOOLSTACK_SELHUB_1_PORT_4444_TCP_ADDR}:4444/wd/hub + Maven 3.3.3 + false + + + + + + + target/surefire-reports/**.xml + false + + 1.0 + + + + diff --git a/jenkins/plugins.txt b/jenkins/plugins.txt index 1813fa1..5216cbb 100644 --- a/jenkins/plugins.txt +++ b/jenkins/plugins.txt @@ -17,3 +17,4 @@ token-macro:1.5.1 parameterized-trigger:2.29 clone-workspace-scm:0.6 chucknorris:0.5 +xvfb:1.0.16 diff --git a/screenshots/selenium-grid.png b/screenshots/selenium-grid.png new file mode 100644 index 0000000..9374033 Binary files /dev/null and b/screenshots/selenium-grid.png differ