提交 0491279d 编写于 作者: J Jesse Glick 提交者: GitHub

Merge pull request #2889 from jglick/node-npm

Node & package mirroring, yarn
......@@ -4,7 +4,6 @@ work
# Node
node/
node_modules/
npm-debug.log
# Generated JavaScript Bundles
jsbundles
......@@ -42,7 +42,7 @@ THE SOFTWARE.
<contextPath>/jenkins</contextPath><!-- context path during test -->
<port>8080</port><!-- HTTP listener port -->
<node.version>6.10.2</node.version>
<npm.version>3.10.10</npm.version>
<yarn.version>0.24.5</yarn.version>
</properties>
<dependencies>
......@@ -582,103 +582,6 @@ THE SOFTWARE.
See https://github.com/tfennelly/jenkins-js-builder#maven-integration
-->
<!--
Manually download node and NPM for the frontend plugin so it gets cached in the local maven repo.
Otherwise frontend will be downloading it all the time on the CI servers. The download-maven-plugin
caches it's downloads in the local maven repo.
-->
<profile>
<id>node-classifier-linux</id>
<activation><os><family>Linux</family><arch>amd64</arch></os></activation>
<properties>
<node.download.file>node-v${node.version}-linux-x64.tar.gz</node.download.file>
<node.download.classifier />
</properties>
</profile>
<profile>
<id>node-classifier-linux-32</id>
<activation><os><family>Linux</family><arch>i386</arch></os></activation>
<properties>
<node.download.file>node-v${node.version}-linux-x86.tar.gz</node.download.file>
<node.download.classifier />
</properties>
</profile>
<profile>
<id>node-classifier-mac</id>
<activation><os><family>mac</family></os></activation>
<properties>
<node.download.file>node-v${node.version}-darwin-x64.tar.gz</node.download.file>
<node.download.classifier />
</properties>
</profile>
<profile>
<id>node-classifier-windows</id>
<activation><os><family>windows</family><arch>x64</arch></os></activation>
<properties>
<node.download.file>win-x64/node.exe</node.download.file>
<node.download.classifier>/x64</node.download.classifier>
</properties>
</profile>
<profile>
<id>node-classifier-windows-amd64</id>
<activation><os><family>windows</family><arch>amd64</arch></os></activation>
<properties>
<node.download.file>win-x64/node.exe</node.download.file>
<node.download.classifier>/win-x64</node.download.classifier>
</properties>
</profile>
<profile>
<id>node-classifier-windows-x86</id>
<activation><os><family>windows</family><arch>x86</arch></os></activation>
<properties>
<node.download.file>win-x86/node.exe</node.download.file>
<node.download.classifier />
</properties>
</profile>
<profile>
<id>node-download</id>
<activation>
<file>
<exists>package.json</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<id>get-node</id>
<phase>initialize</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://nodejs.org/dist/v${node.version}/${node.download.file}</url>
<unpack>false</unpack>
<outputDirectory>${project.build.directory}/frontend/v${node.version}${node.download.classifier}</outputDirectory>
</configuration>
</execution>
<execution>
<id>get-npm</id>
<phase>initialize</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>http://registry.npmjs.org/npm/-/npm-${npm.version}.tgz</url>
<unpack>false</unpack>
<outputDirectory>${project.build.directory}/frontend/</outputDirectory>
<outputFileName>npm-${npm.version}.tgz</outputFileName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>gulp-execution</id>
<activation>
......@@ -716,27 +619,28 @@ THE SOFTWARE.
<execution>
<phase>initialize</phase>
<id>install node and npm</id>
<id>install node and yarn</id>
<goals>
<goal>install-node-and-npm</goal>
<goal>install-node-and-yarn</goal>
</goals>
<configuration>
<nodeVersion>v${node.version}</nodeVersion>
<npmVersion>${npm.version}</npmVersion>
<!-- Use the pre-download node and npm packages. See download-maven-plugin config above. -->
<downloadRoot>${project.baseUri}target/frontend/</downloadRoot>
<yarnVersion>v${yarn.version}</yarnVersion>
<nodeDownloadRoot>https://repo.jenkins-ci.org/nodejs-dist/</nodeDownloadRoot>
<!-- tried to create a mirror for yarnDownloadRoot but it did not work -->
</configuration>
</execution>
<execution>
<phase>initialize</phase>
<id>npm install</id>
<id>yarn install</id>
<goals>
<goal>npm</goal>
<goal>yarn</goal>
</goals>
<configuration>
<!-- Note that this may not be omitted lest maven-release-plugin be confused (frontend-maven-plugin #109): -->
<arguments>install</arguments>
<!-- ensure only one concurrent 'yarn install' -->
<!-- when yarn cache is empty, multiple yarns performing network fetches frequently results in opaque errors -->
<arguments>--mutex network</arguments>
</configuration>
</execution>
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册