从已部署的无服务器端点中提取域

时间:2019-09-13 06:03:07

标签: serverless-framework

运行无服务的deploy命令后,我希望检索已部署端点的域名,以在其他服务中进一步使用。到目前为止,我想出的最好办法是grep sls info输出。

例如 sls info --stage integration | grep GET - | head -1 | egrep -o 'https?://[^ ]+' | awk -F[/:] '{print $4}'

是否有更好,更简单的方法来实现这一目标?

1 个答案:

答案 0 :(得分:1)

您可以使用this插件。

在您的--era1800_1900 = era(eras,1800,1900) era1800_1900["result"] = era1800_1900[(era1800_1900["home_score"] < era1800_1900["away_score"] == "Lose")]------------------------------------------------------------------------ ValueError Traceback (most recent call last) <ipython-input-78-58ef8c4a0715> in <module> 1 era1800_1900 = era(eras,1800,1900) ----> 2 era1800_1900["result"] = era1800_1900[(era1800_1900["home_score"] < era1800_1900["away_score"] == "Lose")] ~\Anaconda3 new\lib\site-packages\pandas\core\generic.py in __nonzero__(self) 1574 raise ValueError("The truth value of a {0} is ambiguous. " 1575 "Use a.empty, a.bool(), a.item(), a.any() or a.all()." -> 1576 .format(self.__class__.__name__)) 1577 1578 __bool__ = __nonzero__ ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

serverless.yml

plugins: - serverless-scriptable-plugin custom: scriptHooks: after:deploy:finalize: - scripts/postDeploy.js

postDeploy.js

另一个选项是this plugin,但您需要使用here中所述的分叉版本。