Bug 1017154 - [deploy]App is still deployed on master when a non master deployment_branch is configured
[deploy]App is still deployed on master when a non master deployment_branch i...
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Andy Goldstein
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-10-09 06:52 EDT by Jianwei Hou
Modified: 2015-05-14 19:29 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-17 09:34:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jianwei Hou 2013-10-09 06:52:18 EDT
Description of problem:
Given deployment_branch is configured to the app, and a new branch is created, when I push the code, there are some errors shown up and the branch is not deployed to the app

Version-Release number of selected component (if applicable):
On devenv_3874

How reproducible:

Steps to Reproduce:
1. Create a diy application
rhc create-app d1 diy-0.1
2. Create a new branch, add current branch name in index.html
git checkout -b br1
edit content under "h1" tag in index.html, eg: <h1>Branch br1</h1>
git commit diy/index.html -m 'branch br1 updates'
3. Invoke rest api to make the application auto deploy the br1 branch
curl -s -k -H 'Content-Type: Application/json' --user jhou@redhat.com:x https://ec2-184-72-155-218.compute-1.amazonaws.com/broker/rest/domain/jhou/application/d1 -X PUT -d '{"deployment_branch":"br1"}'
4. Push the changes
git push -u origin br1

Actual results:
After step 4:
Total 4 (delta 1), reused 0 (delta 0)
remote: fatal: Not a valid object name br1
remote: fatal: Invalid revision range 0000000000000000000000000000000000000000..567a54a227a31d074c7470bc4a9969be320dd212
remote: Stopping DIY cartridge
remote: Building git ref 'master', commit a03b676
remote: Preparing build for deployment
remote: Prepared deployment artifacts in /var/lib/openshift/525532196948fa5632000144/app-deployments/2013-10-09_06-39-52.732
remote: Deployment id is 19d41549
remote: Activating deployment
remote: Result: success
remote: Activation status: success
remote: Deployment completed
To ssh://525532196948fa5632000144@d1-jhou.dev.rhcloud.com/~/git/d1.git/
 * [new branch]      br1 -> br1
Branch br1 set up to track remote branch br1 from origin.

Access the app's webpage, the content added in branch 'br1' is not deployed to the app

Expected results:
Should have auto deployed the branch 'br1' to the application

Additional info:
Comment 1 Andy Goldstein 2013-10-11 15:23:52 EDT
Comment 2 openshift-github-bot 2013-10-11 17:04:24 EDT
Commit pushed to master at https://github.com/openshift/origin-server

Deploy fixes

Don't update metadata.json on disk for each attr update

Make all 3 jenkins_shell_command files consistent

Only check for marker files when using git push or jenkins remotedeploy

Support checking for marker files in the correct deployment ref

Bug 1017154
Bug 1013064
Comment 3 Jakub Hadvig 2013-10-12 11:09:00 EDT
Hi Andy,
closed the my PR because of the duplication. 

Comment 4 Jianwei Hou 2013-10-13 22:53:56 EDT
Verified on devenv_3893
After git push, the branch can be deployed properly now.

Note You need to log in before you can comment on or make changes to this bug.