Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting deployment and build triggers via CLI #7423

Merged
merged 1 commit into from
Feb 26, 2016

Conversation

smarterclayton
Copy link
Contributor

Exposes a command for managing all triggers on an object, which today are build configs and deployment configs. Provides a consistent experience across both (even though the API is inconsistent). Highlights that we should add web hooks to deployments.

Usage is oc set triggers dc/foo to print the triggers, then oc set triggers dc/foo --manual to set them to manual, oc set triggers dc/foo --auto to set them on, oc set triggers dc/foo --from-image=.... -c ... to set a trigger on particular set of containers, and then other flags like --from-webhook= to create a new web hook secrets.

@smarterclayton smarterclayton force-pushed the set_strategy branch 2 times, most recently from dabda1e to f8e62cc Compare February 20, 2016 05:13
@smarterclayton
Copy link
Contributor Author

@bparees @Kargakis @mfojtik PTAL

@smarterclayton smarterclayton changed the title WIP - Setting deployment and build triggers via CLI Setting deployment and build triggers via CLI Feb 20, 2016
@smarterclayton smarterclayton added this to the 1.2.0 milestone Feb 20, 2016
@smarterclayton
Copy link
Contributor Author

[test]

@smarterclayton
Copy link
Contributor Author

This is on the 1.2 target, if we can get some eyes on it today I'd appreciate it.

@0xmichalis
Copy link
Contributor

Will get to it later today

# Remove all triggers
$ %[1]s triggers bc/webapp --remove-all

# Stop triggering on config change
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation

@smarterclayton smarterclayton force-pushed the set_strategy branch 2 times, most recently from e55e95b to d83ae39 Compare February 23, 2016 15:16
@smarterclayton
Copy link
Contributor Author

More comments needed... :)

Selector string
All bool

Builder *resource.Builder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you pass Infos, you don't really need the resource builder past Complete. Resolve all Infos in Complete.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 24, 2016
return t
}

func (t *TriggerDefinition) Apply(obj runtime.Object) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like it could use some direct unit testing. i'm especially worried about the strategyTrigger matching logic either being broken now, or getting broken in the future.

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 24, 2016
@smarterclayton
Copy link
Contributor Author

Turned --from-webhook|github into bools, not strings.

@smarterclayton
Copy link
Contributor Author

Any more comments?

@mfojtik
Copy link
Contributor

mfojtik commented Feb 25, 2016

@smarterclayton LGTM

`oc set triggers` will display, remove, update, or alter triggers on
deployment configs and build configs.
@smarterclayton
Copy link
Contributor Author

[merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/5112/) (Image: devenv-rhel7_3548)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 304a2b2

@smarterclayton
Copy link
Contributor Author

[test]

2 similar comments
@smarterclayton
Copy link
Contributor Author

[test]

@smarterclayton
Copy link
Contributor Author

[test]

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 304a2b2

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/1647/)

openshift-bot pushed a commit that referenced this pull request Feb 26, 2016
@openshift-bot openshift-bot merged commit e6f2a35 into openshift:master Feb 26, 2016
url=":${API_PORT:-8443}"
project="$(oc project -q)"

# This test validates builds and build related commands
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smarterclayton I'm assuming this is copy-pasta error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

On Fri, Mar 11, 2016 at 3:07 PM, Steve Kuznetsov notifications@github.com
wrote:

In test/cmd/triggers.sh
#7423 (comment):

+source "${OS_ROOT}/hack/util.sh"
+source "${OS_ROOT}/hack/cmd_util.sh"
+os::log::install_errexit
+
+# Cleanup cluster resources created by this test
+(

  • set +e
  • oc delete all --all
  • exit 0
    +) &>/dev/null

+url=":${API_PORT:-8443}"
+project="$(oc project -q)"
+
+# This test validates builds and build related commands

@smarterclayton https://github.com/smarterclayton I'm assuming this is
copy-pasta error?


Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/7423/files#r55881699.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants