Can';t下载gitlab CI/CD pipelin中带有maven docker映像的Cypress

Can';t下载gitlab CI/CD pipelin中带有maven docker映像的Cypress,maven,proxy,gitlab-ci,cypress,frontend-maven-plugin,Maven,Proxy,Gitlab Ci,Cypress,Frontend Maven Plugin,我有一个Gitlab管道,它在docker映像中执行maven构建(maven:3.5.2-jdk-8) 当我执行命令时 - mvn $MAVEN_CLI_OPTS -P package_project -U clean install -Dmaven.test.skip=true 我收到一个纱线错误,因为无法下载Cypress: [INFO] [4/4] Building fresh packages... [INFO] info Visit https://yarnpkg.com/en/

我有一个Gitlab管道,它在docker映像中执行maven构建(maven:3.5.2-jdk-8)

当我执行命令时

- mvn $MAVEN_CLI_OPTS -P package_project -U  clean install -Dmaven.test.skip=true
我收到一个纱线错误,因为无法下载Cypress:

[INFO] [4/4] Building fresh packages...
[INFO] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[ERROR] error /builds/custom/project-parent/project_front/project/node_modules/cypress: Command failed.
[ERROR] Exit code: 1
[ERROR] Command: node index.js --exec install
[ERROR] Arguments: 
[ERROR] Directory: /builds/custom/project-parent/project_front/project/node_modules/cypress
[ERROR] Output:
[ERROR] Installing Cypress (version: 5.3.0)
[ERROR] 
[ERROR] [14:11:05]  Downloading Cypress     [started]
[ERROR] [14:13:14]  Downloading Cypress     [failed]
[ERROR] The Cypress App could not be downloaded.
[ERROR] 
[ERROR] Does your workplace require a proxy to be used to access the Internet? If so, you must configure the HTTP_PROXY environment variable before downloading Cypress. Read more: https://on.cypress.io/proxy-configuration
[ERROR] 
[ERROR] Otherwise, please check network connectivity and try again:
[ERROR] 
[ERROR] ----------
[ERROR] 
[ERROR] URL: https://download.cypress.io/desktop/5.3.0?platform=linux&arch=x64
[ERROR] Error: connect ETIMEDOUT 172.67.69.12:443
[ERROR] 
[ERROR] ----------
[ERROR] 
[ERROR] Platform: linux (Debian - 9.3)
[ERROR] Cypress Version: 5.3.0
[ERROR] 
我将前端maven插件与纱线一起使用。这是pom.xml中的声明

<plugin>
    <groupId>com.github.eirslett</groupId>
    <artifactId>frontend-maven-plugin</artifactId>
    <version>${frontend-maven-plugin.version}</version>
    <configuration>
        <nodeVersion>${node.version}</nodeVersion>
        <yarnVersion>${yarn.version}</yarnVersion>
        <workingDirectory>${frontend-src-dir}</workingDirectory>
        <installDirectory>${project.build.directory}</installDirectory>
    </configuration>
    <executions>
        <execution>
            <id>install-frontend-tools</id>
            <goals>
                <goal>install-node-and-yarn</goal>
            </goals>
        </execution>
        <execution>
            <id>yarn-install</id>
            <goals>
                <goal>yarn</goal>
            </goals>
            <configuration>
                <!-- Le proxy maven n'est pas utilisé, on le redéfinit-->
                <yarnInheritsProxyConfigFromMaven>true</yarnInheritsProxyConfigFromMaven>
                <arguments>install</arguments>
            </configuration>
        </execution>
        <execution>
            <id>build-frontend</id>
            <goals>
                <goal>yarn</goal>
            </goals>
            <phase>prepare-package</phase>
            <configuration>
                <arguments>build</arguments>
            </configuration>
        </execution>
    </executions>
</plugin>
当我测试此目标以确认代理配置时,配置列表不会返回代理:

<execution>
    <id>yarn-config</id>
    <goals>
        <goal>yarn</goal>
    </goals>
    <configuration>
        <yarnInheritsProxyConfigFromMaven>true</yarnInheritsProxyConfigFromMaven>
        <arguments>config list</arguments>
    </configuration>
</execution>

[INFO] --- frontend-maven-plugin:1.7.6:yarn (yarn-config) @ project_front ---
[INFO] Found proxies: [myOrganization{protocol='http', host='city.proxy.corp.myOrganization', port=8080}, myOrganizationSecure{protocol='https', host='city.proxy.corp.myOrganization', port=8080}]
[INFO] Running 'yarn config list --https-proxy=http://city.proxy.corp.myOrganization --proxy=http://city.proxy.corp.myOrganization' in /builds/project/project-parent/project_front/project
[INFO] yarn config v1.15.2
[INFO] info yarn config
[INFO] { 'version-tag-prefix':
[INFO]    'v',
[INFO]   'version-git-tag':
[INFO]    true,
[INFO]   'version-commit-hooks':
[INFO]    true,
[INFO]   'version-git-sign':
[INFO]    false,
[INFO]   'version-git-message':
[INFO]    'v%s',
[INFO]   'init-version':
[INFO]    '1.0.0',
[INFO]   'init-license':
[INFO]    'MIT',
[INFO]   'save-prefix':
[INFO]    '^',
[INFO]   'bin-links':
[INFO]    true,
[INFO]   'ignore-scripts':
[INFO]    false,
[INFO]   'ignore-optional':
[INFO]    false,
[INFO]   registry:
[INFO]    'https://registry.yarnpkg.com',
[INFO]   'strict-ssl':
[INFO]    true,
[INFO]   'user-agent':
[INFO]    'yarn/1.15.2 npm/? node/v10.15.3 linux x64' }
[INFO] info npm config
[INFO] {}
[INFO] Done in 0.04s.
[INFO] 

纱线结构
纱线
真的
配置列表
[信息]---前端maven插件:1.7.6:Thread(纱线配置)@project_front---
[INFO]找到代理:[myOrganization{protocol='http',host='city.proxy.corp.myOrganization',port=8080},myOrganizationSecure{protocol='https',host='city.proxy.corp.myOrganization',port=8080}]
[信息]正在运行“纱线配置列表”-https代理=http://city.proxy.corp.myOrganization --代理=http://city.proxy.corp.myOrganization'在/builds/project/project parent/project\u front/project中
[信息]纱线配置v1.15.2
[信息]信息纱线配置
[信息]{“版本标记前缀”:
[信息]“v”,
[信息]“版本git标记”:
[信息]没错,
[信息]“版本提交挂钩”:
[信息]没错,
[信息]“版本git符号”:
[信息]错误,
[信息]“git消息版本”:
[信息]“v%s”,
[信息]“初始版本”:
[信息]“1.0.0”,
[信息]“初始许可证”:
[资讯]"麻省理工学院",,
[信息]“保存前缀”:
[资讯]"^,,
[信息]“垃圾箱链接”:
[信息]没错,
[信息]“忽略脚本”:
[信息]错误,
[信息]“忽略可选项”:
[信息]错误,
[信息]登记处:
[信息]'https://registry.yarnpkg.com',
[信息]“严格ssl”:
[信息]没错,
[信息]“用户代理”:
[信息]“纱线/1.15.2 npm/?节点/v10.15.3 linux x64”}
[信息]信息npm配置
[信息]{}
[信息]在0.04秒内完成。
[信息]

你知道为什么插件中的纱线无法访问互联网下载Cypress吗?

你解决了吗?我也面临同样的问题。我通过在Jenkins全局配置中设置代理来解决这个问题,因为安装后脚本(下载cypress所需)无法从Maven获得代理设置。“frontend-maven-plugin”有一个公开的Github问题您好,由于主要的技术限制,我无法继续讨论这个问题。我将在未来几天或几周内恢复这项工作。我看到您在Jenkins上绕过了这个问题,但是,在我的例子中,我使用的是Docker模式下的GITLAB CI/CD。我理解这意味着前端maven插件不从maven获取代理,不管标记是什么?Github上提到这一点的开放式股票代码是什么?谢谢你的帮助;-)你解决了吗?我也面临同样的问题。我通过在Jenkins全局配置中设置代理来解决这个问题,因为安装后脚本(下载cypress所需)无法从Maven获得代理设置。“frontend-maven-plugin”有一个公开的Github问题您好,由于主要的技术限制,我无法继续讨论这个问题。我将在未来几天或几周内恢复这项工作。我看到您在Jenkins上绕过了这个问题,但是,在我的例子中,我使用的是Docker模式下的GITLAB CI/CD。我理解这意味着前端maven插件不从maven获取代理,不管标记是什么?Github上提到这一点的开放式股票代码是什么?谢谢你的帮助;-)
[INFO] --- frontend-maven-plugin:1.7.6:yarn (yarn-install) @ project_front ---
[INFO] Found proxies: [myOrganization{protocol='http', host='city.proxy.corp.myOrganization', port=8080}, myOrganizationSecure{protocol='https', host='city.proxy.corp.myOrganization', port=8080}]
[INFO] Running 'yarn install --https-proxy=city.proxy.corp.myOrganization:8080 --proxy=city.proxy.corp.myOrganization:8080' in /builds/custom/project-parent/project/project-src
<execution>
    <id>yarn-config</id>
    <goals>
        <goal>yarn</goal>
    </goals>
    <configuration>
        <yarnInheritsProxyConfigFromMaven>true</yarnInheritsProxyConfigFromMaven>
        <arguments>config list</arguments>
    </configuration>
</execution>

[INFO] --- frontend-maven-plugin:1.7.6:yarn (yarn-config) @ project_front ---
[INFO] Found proxies: [myOrganization{protocol='http', host='city.proxy.corp.myOrganization', port=8080}, myOrganizationSecure{protocol='https', host='city.proxy.corp.myOrganization', port=8080}]
[INFO] Running 'yarn config list --https-proxy=http://city.proxy.corp.myOrganization --proxy=http://city.proxy.corp.myOrganization' in /builds/project/project-parent/project_front/project
[INFO] yarn config v1.15.2
[INFO] info yarn config
[INFO] { 'version-tag-prefix':
[INFO]    'v',
[INFO]   'version-git-tag':
[INFO]    true,
[INFO]   'version-commit-hooks':
[INFO]    true,
[INFO]   'version-git-sign':
[INFO]    false,
[INFO]   'version-git-message':
[INFO]    'v%s',
[INFO]   'init-version':
[INFO]    '1.0.0',
[INFO]   'init-license':
[INFO]    'MIT',
[INFO]   'save-prefix':
[INFO]    '^',
[INFO]   'bin-links':
[INFO]    true,
[INFO]   'ignore-scripts':
[INFO]    false,
[INFO]   'ignore-optional':
[INFO]    false,
[INFO]   registry:
[INFO]    'https://registry.yarnpkg.com',
[INFO]   'strict-ssl':
[INFO]    true,
[INFO]   'user-agent':
[INFO]    'yarn/1.15.2 npm/? node/v10.15.3 linux x64' }
[INFO] info npm config
[INFO] {}
[INFO] Done in 0.04s.
[INFO]