代码之家  ›  专栏  ›  技术社区  ›  Martin Choraine

人工制品的使用。下载不适用于Salt stack中的快照版本

  •  0
  • Martin Choraine  · 技术社区  · 7 年前

    我使用saltstack在AWS上部署我的应用程序。公式从artifactory获取jar,并将应用程序作为服务运行。

    我的公式:

    artifactory.downloaded:
       - artifact:
            artifactory_url: {{ artifactory_url }}
            repository: {{ repository }}
            artifact_id: {{ artifact_id }}
            group_id: {{ group_id }}
            packaging: {{ packaging }}
            classifier: {{ classifier }}
            version: '{{ version }}'
       - target_dir: {{ folder }}
    

    错误: 'NoneType' object is not iterable

    1 回复  |  直到 7 年前
        1
  •  1
  •   Martin Choraine    7 年前

    我想我明白了。

    artifactory.downloaded 使用模块 artifactory.get_snapshot 用于快照和 artifactory.get_release 发布。

    这个 get_snapshot 模块需要 snapshot_version 属性和 version 属性来自 artifactory.downloaded 状态

    artifactory.downloaded 州,但 artifactory.get_snapshot / artifactory.get_release 模块:

    artifact_download:
     module.run:
        - name: artifactory.get_snapshot
        - artifactory_url: {{ artifactory_url }}
        - repository: {{ repository }}
        - artifact_id: {{artifact_id }}
        - group_id: {{ group_id }}
        - packaging: {{ packaging }}
        - classifier: {{ classifier }}
        - version: '{{ version }}'
        - snapshot_version: '{{ version }}'
        - target_dir: {{ folder }}
    

    - snapshot\u版本