【问题标题】:How to access Environment Variables, created in Context, in my config.yml file?如何在我的 config.yml 文件中访问在 Context 中创建的环境变量?
【发布时间】:2018-08-11 08:11:08
【问题描述】:

由于我无法将我的 jks filekeystore.properties 文件推送到我的公共 Github 存储库,我关注了 Signing Android APK’s with CircleCIContinuous Integration and Deployment with Android, the right way 的帖子。但是它们都没有显示如何访问在Contexts 中创建的环境变量。我需要这些上下文环境变量来下载 jks 文件并将秘密凭据(例如 key alias)导出到在我的 .circleci/ci-scripts/circleci_env_setup.sh bash 脚本中执行的 keystore.properties 文件。即使我关注了documentation,我也会收到以下错误:

密钥库文件丢失,正在“”处下载“”
curl:选项-o:需要参数

这证明我无法正确访问STORE_FILEKEY_STORE_URI 环境。您可以从this repository 看到我的全圈 ci 工作。任何帮助,将不胜感激。提前致谢。

【问题讨论】:

    标签: android sh circleci circleci-2.0 circleci-workflows


    【解决方案1】:

    在您的 CircleCI 配置中的 workflows 键中,您需要将工作应用于上下文:https://circleci.com/docs/2.0/contexts/

    如果您不需要工作流(您正在使用单个作业),则根本不需要使用上下文。只需使用项目设置页面中的私有环境变量即可。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-02
      • 2015-06-18
      • 1970-01-01
      • 2020-02-13
      • 1970-01-01
      • 2015-05-31
      • 1970-01-01
      • 2022-01-15
      相关资源
      最近更新 更多