[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: copy mutiple directories using oc new-build with source-image-path flag



Looks like this has been added as an issue on GitHub [1]. I don't see a reason why we shouldn't allow multiple --source-image-path values.

[1] https://github.com/openshift/origin/issues/22600 

On Thu, Apr 18, 2019 at 9:26 AM Ben Parees <bparees redhat com> wrote:


On Thu, Apr 18, 2019 at 6:05 AM Alix ander <mysteriousmann hotmail com> wrote:
Hi Everyone,

when writing a build config in openshift, i can copy multiple
directories from one container to another like this
```yaml
source:
    images:
      - from:
          kind: ImageStreamTag
          name: 'buildervscv:latest'
        paths:
          - destinationDir: .
            sourcePath: /opt/app-root/src/dist/.
          - destinationDir: .
            sourcePath: /opt/app-root/src/openshift/conf/.
```

how can i do the same thing using oc new-build ?

I tried
```
oc new-build --source-image=builder
--source-image-path=/opt/app-root/src/dist/.:.
--source-image-path=/opt/app-root/src/openshift/conf/.:.
--image-stream=openshift/nginx
```
 
```
oc new-build  --source-image=builder --source-image-path
/opt/app-root/src/dist/.:.  /opt/app-root/src/openshift/conf/.:.
--image-stream=openshift/nginx
```
```
oc new-build  --source-image=builder
--source-image-path=[/opt/app-root/src/dist/.:. ,
/opt/app-root/src/openshift/conf/.:.] --image-stream=openshift/nginx
```

with the fist one only one directory is being copied! and the rest are
throwing an error.

Unfortunately it looks like new-build only accepts a single --source-image-path argument right now (meaning if you pass multiple, it will just use the first one i guess, though I would have expected it to use the last one).  If you need to specify multiple you'd have to edit/patch the buildconfig after it is created to add the additional paths.

 

Any help?

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


--
Ben Parees | OpenShift



--

ADAM KAPLAN

SENIOR SOFTWARE ENGINEER - OPENSHIFT

Red Hat

100 E Davie St Raleigh, NC 27601 USA

adam kaplan redhat com    T: +1-919-754-4843     IM: adambkaplan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]