私はかなり長時間この頭を叩いていましたが、私はそれを理解できません。複数のSCMからプルして、Concourse CIのmvファイルをworkdir
現在、私は2つのリポジトリ(自然に2つの別個のディレクトリを作成しています)を引っ張って、Dockerfileを正常に実行するためにあるディレクトリから別のディレクトリにファイルを移動しようとしています。ここで
は私のpipeline.ymlファイルがどのように見えるかです:私は実際にコンコースに展開することができるパイプラインを掲載しました
---
jobs:
- name: build-nexus-docker-image
public: false
plan:
- get: git-nexus-docker-images
trigger: true
- get: git-nexus-license
trigger: true
- task: mv-nexus-license
config:
platform: linux
image_resource:
type: docker-image
source: {repository: ubuntu, tag: "trusty"}
inputs:
- name: git-nexus-license
- name: git-nexus-docker-images
run:
path: /bin/sh
args:
- -c
- mv -v git-nexus-license/nexus.lic git-nexus-docker-images/nexus.lic; ls -la git-nexus-docker-images
- put: nexus-docker-image
params:
build: git-nexus-docker-images/
resources:
- name: git-nexus-docker-images
type: git
source:
uri: [email protected]:dev/nexus-pro-dockerfile.git
branch: test
paths: [Dockerfile]
private_key: {{git_ci_key}}
- name: git-nexus-license
type: git
source:
uri: [email protected]:secrets/nexus-information.git
branch: master
paths: [nexus.lic]
private_key: {{git_ci_key}}
- name: nexus-docker-image
type: docker-image
source:
username: {{aws-token-username}}
password: {{aws-token-password}}
repository: {{ecr-nexus-repo}}
。しかし、私は多くのことを試みましたが、私はこれを行う方法を理解することはできません。私はライセンスファイルをgit-nexus-license
ディレクトリからgit-nexus-docker-images
ディレクトリに移動する作業に取り掛かっています。私が行ったことはnexus.lic
ファイルのmvには見えません。なぜなら、dockerイメージを構築しているときにディレクトリ内のそのファイルを見つけることができないからです。
編集:上記のコードを使用して「mv」nexus.lic
を正常に実行できましたが、ファイルが見つからないため、ビルドに失敗しています。私が間違っていることが分かりません。手動で行うとビルドが正しく機能しますが、コンコースでは失敗します。