# Jenkins Web Task


# Dependencies

# Docker

Just like reliable-web, we recommend to build web with Docker.

# Sample Project

# Quick Start

# Step1 - Create New

Create a new item named web-app-bootstrap, and select the Freestyle project mode.

# Step2 - SCM Config

Please input the web-app-bootstrap git url, and set the clone depth to 1, branch to master is ok.

https://github.com/app-bootstrap/web-app-bootstrap.git

# Step3 - Build Scripts Config

Noted

  • please confirm jenkins delete the workspace before build to avoid the old middle-file problem.

We provide the webpack build docker like macacajs/macaca-electron-docker, so you can set the feild content like this:

docker stop $JOB_NAME || true && docker rm $JOB_NAME || true

docker run --rm \
  --name $JOB_NAME \
  -e JOB_NAME \
  -e BUILD_NUMBER \
  -e RELIABLE_SERVER_URL=http://129.168.1.102:9900 \
  -v $HOME/reliable_home/static:/static \
  -v $WORKSPACE:/root/src \
  macacajs/macaca-electron-docker \
  bash -c "cd /root/src && npm run ci"

Noted

  • please confirm the RELIABLE_SERVER_URL has the correct address just like the IPV4 or some domain name which can be visited from the docker container, otherwise you will meet the problem below.
error: TypeError: Cannot read property 'server' of undefined
    at _.postToGW (/root/src/node_modules/reliable-cli/lib/helper.js:31:66)
    at ReportCommand.pushToWebhook (/root/src/node_modules/reliable-cli/lib/report-command.js:130:18)
    at ReportCommand._run (/root/src/node_modules/reliable-cli/lib/report-command.js:70:35)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! web-app-bootstrap@1.0.8 reliable: `reliable report -c ./reliable.config.js`
npm ERR! Exit status 1

# Step4 - Build Now

After the building ready, you can get the final result from reliable-web.

We cat get the build results of the web-app-bootstrap.

You can also get other extra build infomation. If you want more, please tweak the reliable-cli#configuration file.

# Step5 - Test Reporter

Reliable support the Unit and E2E test reporter, coverage based on Macaca is supported.