【问题标题】:Pipeline apt-get update Fails管道 apt-get 更新失败
【发布时间】:2019-08-28 22:10:10
【问题描述】:

运行我的管道文件时出现此错误这是我的管道文件:我是前端开发人员这是第一次构建/创建像这样的自动化流程任何有关如何使其工作或改进的指针都会受到赞赏。

# This is a sample build configuration for JavaScript.
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: node:10.9.0
pipelines: 
branches: 
master: 
- step: max-time: 10 
name: production 
deployment: production 
caches: 
- node 
script: # Modify the commands below to build your repository. 
- npm install 
- npm install -g @angular/cli@7.3.3 
- ng build --prod 
- apt-get clean 
- apt-get update 
- apt-get install ncftp 
- ncftpput -v -u $FTP_USERNAME -p $FTP_PASSWORD -R $FTP_HOST $FTP_SITE_ROOT dist/* 
- echo Finished uploading files to $FTP_HOST$FTP_SITE_R
definitions: caches: ncftp: /var/cache/apt node: node_modules

这是我的错误:

+ apt-get update
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [7340 B]
Get:3 http://deb.debian.org jessie Release.gpg [2420 B]
Get:4 http://deb.debian.org jessie Release [148 kB]
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [825 kB]
Get:6 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Fetched 10.1 MB in 8s (1182 kB/s)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease  Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.

我不确定如何让 apt-get 在 Bitbucket 中工作,这个管道文件几周前工作正常。任何想法都没有我能做些什么来让它再次工作。

【问题讨论】:

    标签: bitbucket pipeline apt-get bitbucket-pipelines


    【解决方案1】:

    节点图像现在应该默认为 debian 拉伸而不是 jessie。 Bitbucket 可能正在缓存旧图像。您可以通过将图像设置为node:<version>-stretch来强制拉伸版本

    GitHub 上的相关问题:https://github.com/nodejs/docker-node/issues/1013

    【讨论】:

    • 感谢@Oscar Barrett 看来已经解决了我的问题。
    猜你喜欢
    • 1970-01-01
    • 2020-07-01
    • 1970-01-01
    • 2014-10-24
    • 1970-01-01
    • 2017-06-21
    • 1970-01-01
    • 1970-01-01
    • 2016-07-12
    相关资源
    最近更新 更多