2017-05-17 4 views
0
resources: 
- name: git-clone-resource 
    type: git 
    source: 
    branch: master 
    uri: https://github.com/drahnr/oregano.git 
- name: oregano-test-ubuntu 
    type: docker-image 
    source: 
    repository: quay.io/ratpoison/oregano-test-ubuntu 
    username: {{quay-username}} 
    password: {{quay-password}} 

jobs: 
    - name: build-docker-image-fedora 
    public: true 
    plan: 
     - get: git-clone-resource 
     trigger: true 
     - put: oregano-test-fedora 
     params: 
      cache: true 
      tag_as_latest: true 
      build: git-clone-resource/.concourse/fedora 

    - name: compile 
    public: true 
    plan: 
    - get: git-clone-resource 
     trigger: true 
     passed: [build-docker-image-fedora] 
    - task: compile 
     image: oregano-test-fedora 
     config: 
     platform: linux 
     inputs: 
     - name: git-clone-resource 
     run: 
      path: xvfb-run 
      args: ["./waf", "configure", "debug", "--prefix=/tmp", "install"] 
      dir: "git-clone-resource" 

がある問題の引き上げを防止する方法、直接image宣言にもかかわらず、oregano-test-fedoraはまだquay.ioレジストリから引き出されています。は、作成したばかりのドッキングウィンドウの画像

私はローカルの画像が使用されていることを達成することができますどのようにhttps://concourse-ci.org/task-step.html#task-image

の公式ドキュメントに概説されたアプローチを踏襲?

答えて

1

getではないリソースを参照しているimageがあります。異なるジョブは入力/出力を共有しないため、それらの間のアーティファクトの通過は、リソース(第三者に裏付けられたもの)を使用して行わなければなりません。

それだけでなく、imageの使用には、getの結果であったイメージが必要です。これは、プッシュされたドッカー画像がgetで最初に取得されなければならないことを意味します。 「ローカルにキャッシュされた」バージョンのみを使用する方法はありません。これは、設計上、quay.ioになる必要があります。

1

oregano-test-fedoraは、ジョブbuild-docker-image-fedoraputのためにレジストリから取得されています。プルを避けるには、putskip_downloadを追加できます。

+0

しかし、私は後で同じパイプラインでそのイメージを使用したいですか? 'skip_download'を使うときもそれは可能ですか?ドキュメントは他のものを示唆しています。 – drahnr

+0

いいえ、skip_downloadを実行してからイメージを使用することはできません。 – materialdesigner

関連する問題