Hi,
I believe this might be what you are looking 4 :
- $DEV_PROJECT_NAME my dev project
- $OTH_PROJECT_NAME my other project
- $IS_DEV_PROJECT_NAME the name of your image stream
oc policy add-role-to-user system:image-puller
system:serviceaccount:$OTH_PROJECT_NAME:default
--namespace=$DEV_PROJECT_NAME
oc tag $DEV_PROJECT_NAME/*$IS_DEV_PROJECT_NAME*:latest $DEV_PROJECT_NAME/$
*IS_DEV_PROJECT_NAME*:tag-youchoose -n $DEV_PROJECT_NAME
And you need to have a deployment config using :
apiVersion: v1
kind: DeploymentConfig
....
spec:
triggers:
-
type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- whateveryoulike
from:
kind: ImageStreamTag
namespace: $DEV_PROJECT_NAME
name: '$*IS_DEV_PROJECT_NAME*:tag-youchoose'
My2รง
On Tue, May 30, 2017 at 9:52 AM, Andrew Lau <[email protected]> wrote:
On Tue, 30 May 2017 at 17:46 Office ME2Digtial e. U. <[email protected]>
wrote:
Hi Andrew.
Andrew Lau have written on Tue, 30 May 2017 02:42:58 +0000:
> Is there a way to import images from an imagestream tag?
>
> ie. I have an imagestream
>
> spec:
> tags:
> - name: '7'
> annotations:
> openshift.io/display-name: Node.js 7
> iconClass: icon-nodejs
> tags: builder,nodejs
> supports: nodejs:7,nodejs
> version: '7'
> from:
> kind: ImageStreamTag
> name: s2i-nodejs:7
> namespace: jenkinstests
>
> If I rerun `oc tag jenkinstests/s2i-nodejs:7 test/s2i-nodejs:7` I
> lose the annotations on the tag.
> `oc import-image` only seems to work on Docker registries, not
> imagestreams
You can't, afaik.
`oc tag ..` is mainly for imagestreams.
When you want to copy the image you will need to do this via docker.
A example sequence can be found in this blog post.
https://blog.openshift.com/cross-cluster-image-promotion-techniques/
e. g.
```
1. docker login <source_reg>
2. docker pull <source_pull_spec>
3. docker tag <source_pull_pec> <dest_pull_spec>
4. docker login <dest_reg>
5. docker push <dest_pull_spec>
```
I'm looking to promote between namespaces, not clusters.
I am referencing from an imagestreamtag. The only way so far I've found to
update the tag is to be to tag it again but then I lose the s2i
annotations.
I was just hoping there was a way to bump the last imported (and hence
buildconfig triggers) without having to `oc tag` and `oc annotate`.
--
Best Regards
Aleksandar Lazic - ME2Digital e. U.
https://me2digital.online/
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users