Red Hat Bugzilla – Bug 1023512
[deploy] 'gear deploy' should not allow git deployments when deployment-type is set to binary
Last modified: 2015-05-14 19:31:39 EDT
Description of problem: 'gear deploy' will allow deploying a git ref even when deployment-type is set to binary.
[foo-foo.dev.rhcloud.com 526a7e1b29856796cf000007]\> gear deploy master
Stopping PHP cartridge
Waiting for stop to finish
Building git ref 'master', commit 3961a72
Building PHP cartridge
Preparing build for deployment
Deployment id is c711eb5c
Starting PHP cartridge
Version-Release number of selected component (if applicable):
How reproducible: always
Steps to Reproduce:
1. rhc create-app foo php-5 --no-git --no-dns
2. rhc configure-app foo --no-auto-deploy --keep-deployments 5 --deployment-type binary
3. rhc deploy master -a foo
Actual results: git ref 'master' is deployed
Expected results: gracefully error out a message and exit with error code
Commit pushed to master at https://github.com/openshift/origin-server
Disallow 'gear deploy' if deployment type is binary
Tested on devenv_3953.
When deploy type is set to "binary", we will get the following:
[php2-qiuzhang.dev.rhcloud.com 526df3507820b9fed1000067]\> gear deploy master
OPENSHIFT_DEPLOYMENT_TYPE is 'binary' - git-based deployments are disabled.
The only notice is that, we need to re-login to the application after deploy type changed.
Mark the bug as verified.