我正在尝试使用ftp协议和gitlab的持续集成来部署我的Web应用程序。所有文件都已上传,并且站点工作正常,但是当gitlab运行程序快完成时,我一直收到以下错误。
我的gitlab-ci.yml文件
stages:
- build
- test
- deploy
build:
stage: build
tags:
- shell
script:
- echo "Building"
test:
stage: test
tags:
- shell
script: echo "Running tests"
frontend-deploy:
stage: deploy
tags:
- debian
allow_failure: true
environment:
name: devallei
url: https://devallei.azurewebsites.net/
only:
- master
script:
- echo "Deploy to staging server"
- apt-get update -qq
- apt-get install -y -qq lftp
- lftp -c "set ftp:ssl-allow yes; set ssl:verify-certificate false; debug; open -u devallei\FTPAccesHoussem,Devallei2019 ftps://waws-prod-dm1-131.ftp.azurewebsites.windows.net/site/wwwroot; mirror -Rev ./frontend/dist /site/wwwroot"
backend-deploy:
stage: deploy
tags:
- shell
allow_failure: true
only:
- master
script:
- echo "Deploy spring boot application"
我希望跑步者通过并通过工作,但这给了我以下错误。
---- Connecting data socket to (23.99.220.117) port 10033
---- Data connection established
---> ALLO 4329977
<--- 200 ALLO command successful.
---> STOR vendor.3b66c6ecdd8766cbd8b1.js.map
<--- 125 Data connection already open; Transfer starting.
---- Closing data socket
<--- 226 Transfer complete.
---> QUIT
gnutls_record_recv: The TLS connection was non-properly terminated. Assuming
EOF.
<--- 221 Goodbye.
---- Closing control socket
ERROR: Job failed: exit code 1
答案 0 :(得分:1)
我不知道“ gnutls_record_recv: The TLS connection was non-properly terminated. Assuming EOF.
”错误的原因,但是它使您的lftp命令返回一个非零的退出代码。这使得GitLab认为您的工作失败了。最好的办法就是修复它。
如果您认为一切正常,并防止lftp命令失败,请在lftp命令的末尾添加|| true
。 但是请注意,即使发生真正的错误,您的工作也不会失败。