grep - 带有正则表达式的 grep 命令在 gitlab ci 上不起作用
问题描述
我在我的 gitlab ci 中运行脚本:
pre_build:
stage: get_info
script:
- printenv
- cd ./scripts
- ./pre_build.sh
该脚本具有以下行:
todays_date=$(date +"%d-%b-%Y")
latest=$(curl -i ${artifactory_url} | grep develop | grep -i ${todays_date} | grep ${last_ok_build_number} | grep -Eoi '<a [^>]+>' | grep -Eo 'href="[^\"]+"')
我相信这是由于 grep 中的正则表达式而失败的,知道如何在 GitLab ci 中运行它吗?上面的脚本在我的本地机器上运行良好
编辑:上面的代码是时区问题
解决方案
推荐阅读
- android - Firestore 侦听器在 Android 上使 Unity 应用程序崩溃,但在 Unity 编辑器中工作正常。我该如何解决这个问题?
- c# - ASP.NET Core Razor Pages - 返回 Page() 后复杂模型属性为空
- c# - 如何了解之前打开了哪个页面
- r - 用于收集的多个键值对
- python - 如何从 Django REST API 将图像加载到 React?
- sql-server - 将行从 server1.database.table 复制到 server2.database.table
- c++ - c ++ csv逗号分隔文件条目,混合类型的麻烦
- node.js - Nodejs 没有从类模块中的插入函数返回 mysql 数据
- python - 为什么当我在负载属性中键入“r”时 pygame 混合器工作?
- amazon-web-services - aws 上的 Strapi 拒绝连接