在Github操作/工作流中使用ddev

问题描述 投票:0回答:1

我已经使用ddev设置了验收测试。它们在ddev composer cookieman:test上本地运行。我想对Github动作使用相同的设置。

有人在Github动作/工作流程中有人对ddev感到幸运吗?我直到ddev的运行状况检查失败为止:

...创建ddev-router ...完成无法启动扩展程序-cookieman-master:ddev-router无法就绪:logOutput = 2019/11/15 02:24:19 [emerg] 1630#1630:/etc/nginx/conf.d中上游没有服务器/default.conf:89nginx:[emerg] /etc/nginx/conf.d/default.conf:89中上游没有服务器nginx:配置文件/etc/nginx/nginx.conf测试失败%总计%接收的%Xferd平均速度时间时间时间当前Dload上传总花费左速度0 0 0 0 0 0 0 0-:-:--:-:--:-:-00 0 0 0 0 0 0 0-:-:--:-:--:-:-0curl:(22)请求的URL返回错误:404未找到ddev-router运行状况检查端点未响应,err = container / ddev-router不健康:2019/11/15 02:24:19 [emerg] 1630#1630:/etc/nginx/conf.d/default.conf:89中没有上游的服务器nginx:[emerg] /etc/nginx/conf.d/default.conf:89中上游没有服务器nginx:配置文件/etc/nginx/nginx.conf测试失败%总计%接收的%Xferd平均速度时间时间时间当前Dload上传总花费左速度0 0 0 0 0 0 0 0-:-:--:-:--:-:-00 0 0 0 0 0 0 0-:-:--:-:--:-:-0curl:(22)请求的URL返回错误:404未找到ddev-router运行状况检查端点未响应## [错误]进程已完成,退出代码为1。

。github / workflows / tests.yml:

名称:测试上:[push,pull_request]职位:通过ddev测试:运行:ubuntu-latest脚步:-使用:actions / checkout @ v1-运行:export DEBIAN_FRONTEND =非交互式#更新docker-运行:sudo -E apt-get purge -y docker docker-engine docker.io containerd runc nginx-运行:curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt键添加--运行:sudo -E add-apt-repository“ deb [arch = amd64] https://download.docker.com/linux/ubuntu $ {lsb_release -cs)稳定”-运行:sudo -E apt-get更新-运行:sudo -E apt-get -y -o Dpkg :: Options :: =“-force-confnew”安装docker-ce#安装linuxbrew-运行:sh -c“ $(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)”-运行:echo“ :: add-path :: / home / linuxbrew / .linuxbrew / bin”#安装ddev + docker-compose-运行:brew tap drud / ddev && brew install ddev docker-compose#启动ddev-运行:ddev start ||出口0#调试-运行:ls -als .ddev /-运行:curl 127.0.0.1 ||出口0-运行:curl 127.0.0.1/healthcheck ||出口0-运行:docker ps ||出口0#我们希望四叶草覆盖-运行:ddev exec enable_xdebug#运行测试-运行:ddev作曲家cookieman:test

我尝试过

  • 使用Ubuntu 16.04

  • 在Ubuntu 16.04 / 18.04上完全升级所有软件包]

  • 像这样配置ddev:

    • run: ddev config global --router-bind-all-interfaces=true
    • run: ddev config global --omit-containers=dba,ddev-ssh-agent
  • 更改为非特权路由器端口(在config.yaml中设置router_http_port,router_https_port)

  • 如果我强制其继续使用ddev start || exit 0,则可以看到容器正在运行:

- run: docker ps || exit 0
容器ID图像命令创建的状态端口名称c36601a06fd6 drud / ddev-router:v1.11.0“ / app / docker-entrypo…” 27秒前向上24秒(不健康)0.0.0.0:4430->4430/tcp、0.0.0.0:4444->4444/tcp, 0.0.0.0:8025->8025/tcp、80/tcp、0.0.0.0:8080->8080/tcp ddev-router18152602a054 drud / ddev-webserver:v1.11.0-build“ /start.sh” 30秒前向上28秒(正常)8025 / tcp,127.0.0.1:32770-> 80 / tcp,127.0.0.1:32769-> 443 / tcp ddev-extension-cookieman-master-web33aca55715f2 selenium / standalone-chrome:3.12“ / opt / bin / entry_poin…” 32秒前向上30秒4444 / tcp ddev-extension-cookieman-master-chrome6c852ae62974 drud / ddev-dbserver:v1.11.0-10.2-built“/docker-entrypoint.…” 32秒前向上30秒(正常)127.0.0.1:32768->3306/tcp ddev-extension-cookieman-master-db

[curl 127.0.0.1产生默认的nginx起始页(我希望'503:无可用的ddev后端站点')]

curl 127.0.0.1/healthcheck产生404

到目前为止,我的结论是:ddev-router可以访问,但是其nginx没有适当的配置(/etc/nginx/conf.d/default.conf中上游没有服务器)。因此,ddev仅运行启动前挂钩形式config.yaml。后启动未达到。

您可以在这里https://github.com/dmind-gmbh/extension-cookieman/actions?query=branch%3Afeat%2Facceptance-tests看到最后运行的输出

编辑/修改:这是从/etc/nginx/conf.d/default.conf中(恶意)生成的ddev-router

# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
# scheme used to connect to this server
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
  default $http_x_forwarded_proto;
  ''      $scheme;
}
# If we receive X-Forwarded-Port, pass it through; otherwise, pass along the
# server port the client connected to
map $http_x_forwarded_port $proxy_x_forwarded_port {
  default $http_x_forwarded_port;
  ''      $server_port;
}
# If we receive Upgrade, set Connection to "upgrade"; otherwise, delete any
# Connection header that may have been passed to this server
map $http_upgrade $proxy_connection {
  default upgrade;
  '' close;
}
# Apply fix for very long server names
server_names_hash_bucket_size 128;
# Default dhparam
# ssl_dhparam /etc/nginx/dhparam/dhparam.pem;
# Set appropriate X-Forwarded-Ssl header
map $scheme $proxy_x_forwarded_ssl {
  default off;
  https on;
}

rfay提到了ddev-router与底层docker守护程序之间通过套接字的通信错误。

我已经使用ddev设置了验收测试。它们在ddev composer cookieman:test上本地运行。我想对Github动作使用相同的设置。在Github中有人对ddev有好运吗?

github typo3 action acceptance-testing ddev
1个回答
0
投票

我得出的结论是问题在于docker-gen。

© www.soinside.com 2019 - 2024. All rights reserved.