Я пытаюсь создать свое реактивное приложение, используя Jenkins.
Я извлекаю исходный код из gitlab и пытаюсь выполнить команды оболочки:
npm install && npm run build
Но проблема в том, что build
выполняется бесконечно, а Дженкинс даже ломается!
Это мои package.json
:
{
"name": "myapplication",
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.18.0",
"jquery": "^3.3.1",
"react": "^16.5.2",
"react-bootstrap": "^0.32.4",
"react-dom": "^16.5.2",
"react-router-dom": "^4.3.1",
"react-scripts": "2.0.3",
"react-trumbowyg": "^1.1.0",
"react-vk": "^3.5.0"
},
"scripts": {
"start": "PORT=80 react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"proxy": "http://localhost:8080"
}
И рабочая область jenkinks для этого проекта:
Журналы:
Checking out Revision 05de65c3548b48a798ebe2f58f8cf0be59416887 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 05de65c3548b48a798ebe2f58f8cf0be59416887
Commit message: "fix build"
> git rev-list --no-walk 05de65c3548b48a798ebe2f58f8cf0be59416887 # timeout=10
[static] $ /bin/sh -xe /tmp/jenkins4408353562870979305.sh
+ npm install
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
audited 32091 packages in 43.675s
found 8 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
+ npm run build
> myapplication@0.1.0 build /var/lib/jenkins/workspace/path/to
> react-scripts build
Creating an optimized production build...
Build timed out (after 3 minutes). Marking the build as failed.
Build was aborted
SSH: Current build result is [FAILURE], not going to run.
Finished: FAILURE
Большинство учебных пособий, которые я нашел, предлагают использовать Docker и CI & DI Framework.
Как создать реагирующее приложение без них?