{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/4284","labels_url":"https://api.github.com/repos/openshift/origin/issues/4284/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/4284/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/4284/events","html_url":"https://github.com/openshift/origin/issues/4284","id":102088565,"number":4284,"title":"DeploymentConfig trigger doesn't work properly","user":{"login":"sebiwi","id":1782142,"avatar_url":"https://avatars.githubusercontent.com/u/1782142?v=3","gravatar_id":"","url":"https://api.github.com/users/sebiwi","html_url":"https://github.com/sebiwi","followers_url":"https://api.github.com/users/sebiwi/followers","following_url":"https://api.github.com/users/sebiwi/following{/other_user}","gists_url":"https://api.github.com/users/sebiwi/gists{/gist_id}","starred_url":"https://api.github.com/users/sebiwi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebiwi/subscriptions","organizations_url":"https://api.github.com/users/sebiwi/orgs","repos_url":"https://api.github.com/users/sebiwi/repos","events_url":"https://api.github.com/users/sebiwi/events{/privacy}","received_events_url":"https://api.github.com/users/sebiwi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-20T08:23:54Z","updated_at":"2015-08-20T10:18:10Z","closed_at":null,"body":"Hello, \r\n\r\nI have a DeploymentConfig that's deploying a container from an image right after the build, even if the image does not have the right tag.\r\n\r\nHere's the DeploymenConfig:\r\n\r\n```\r\n- kind: DeploymentConfig\r\n  apiVersion: v1\r\n  metadata:\r\n    name: chatter-dev-dc\r\n  template:\r\n  spec:\r\n    strategy:\r\n      type: Recreate\r\n      resources: {}\r\n    triggers:\r\n    - type: ConfigChange\r\n    - type: ImageChange\r\n      imageChangeParams:\r\n        automatic: true\r\n        containerNames:\r\n        - chatter-app-dev\r\n        from:\r\n          kind: ImageRepository\r\n          name: chatter-app\r\n          tag: dev\r\n    replicas: 1\r\n    selector: \r\n      deploymentconfig: chatter-dev-dc\r\n    template:\r\n      metadata:\r\n        labels:\r\n          deploymentconfig: chatter-dev-dc\r\n      spec:\r\n        containers:\r\n        - name: chatter-app-dev\r\n          image: chatter-app:dev\r\n          env:\r\n          - key: PORT\r\n            name: PORT\r\n            value: \"8080\"\r\n          - key: ENV_NAME\r\n            name: ENV_NAME\r\n            value: dev\r\n          ports:\r\n          - containerPort: 8080\r\n            protocol: TCP\r\n```\r\nThe ImageChange trigger is set to work with the \"dev\" tag, and the built image has the \"latest\" tag.\r\n\r\nHere's the BuildConfig I used to create the image:\r\n```\r\n- apiVersion: v1\r\n  kind: BuildConfig\r\n  metadata:\r\n    name: chatter-bc\r\n  spec:\r\n    source:\r\n      type: Git\r\n      git:\r\n        uri: https://gitserver/username/chatter.git\r\n        ref: master\r\n    strategy:\r\n      type: Source\r\n      sourceStrategy:\r\n        from:\r\n          kind: ImageStreamTag\r\n          clean: true\r\n          name: nodejs-010-centos7:latest\r\n    output: \r\n      to:\r\n        kind: ImageStream\r\n        name: chatter-app\r\n        tag: latest\r\n    resources: {}\r\n```\r\nWith this setup the container is deployed right after the build, which is not the desired behaviour. \r\n\r\nI want the deployment to be triggered after the image is tagged with the \"dev\" tag. "},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/132965714","html_url":"https://github.com/openshift/origin/issues/4284#issuecomment-132965714","issue_url":"https://api.github.com/repos/openshift/origin/issues/4284","id":132965714,"user":{"login":"sebiwi","id":1782142,"avatar_url":"https://avatars.githubusercontent.com/u/1782142?v=3","gravatar_id":"","url":"https://api.github.com/users/sebiwi","html_url":"https://github.com/sebiwi","followers_url":"https://api.github.com/users/sebiwi/followers","following_url":"https://api.github.com/users/sebiwi/following{/other_user}","gists_url":"https://api.github.com/users/sebiwi/gists{/gist_id}","starred_url":"https://api.github.com/users/sebiwi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebiwi/subscriptions","organizations_url":"https://api.github.com/users/sebiwi/orgs","repos_url":"https://api.github.com/users/sebiwi/repos","events_url":"https://api.github.com/users/sebiwi/events{/privacy}","received_events_url":"https://api.github.com/users/sebiwi/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T10:18:10Z","updated_at":"2015-08-20T10:18:10Z","body":"This was fixed by referencing an ImageStreamTag instead of an ImageRepository on the DeploymentConfig:\r\n\r\n```\r\n...\r\n    - type: ImageChange\r\n      imageChangeParams:\r\n        automatic: true\r\n        containerNames:\r\n        - chatter-app-dev\r\n        from:\r\n          kind: ImageStreamTag\r\n          name: chatter-app:dev\r\n...\r\n\r\n```"}}