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

Fix branch updates and make Linux compatible #5224

Merged
merged 2 commits into from Oct 13, 2017

Conversation

Projects
None yet
4 participants
@adbridge
Contributor

adbridge commented Sep 29, 2017

Changes:

  1. When updating the release tag for a branch, the script now correctly allows the update to a pre-existing branch.

  2. The commands have been converted to strings rather than lists. This is more cross platform compatible.

  3. Updated the run commands and logger to be consistent with other scripts.

This has been tested locally using windows gitbash, the github-to-jira-test repo and a test.json configuration file.

Test results:

  1. Branch test
Update: INFO - 'examples' directory already exists. Deleting...                                                                                                                              
Update: INFO - Updating example 'github-to-jira-test'                                                                                                                                        
Cloning into 'github-to-jira-test'...                                                                                                                                                        
remote: Counting objects: 45, done.                                                                                                                                                          
remote: Total 45 (delta 0), reused 0 (delta 0), pack-reused 45                                                                                                                               
Unpacking objects: 100% (45/45), done.                                                                                                                                                       
Already on 'master'                                                                                                                                                                          
Switched to a new branch 'mbed-os-5.6-test'                                                                                                                                                  
Total 0 (delta 0), reused 0 (delta 0)                                                                                                                                                        
To https://github.com/ARMmbed/github-to-jira-test                                                                                                                                            
 * [new branch]      mbed-os-5.6-test -> mbed-os-5.6-test                                                                                                                                    
warning: CRLF will be replaced by LF in test_example_update1/mbed-os.lib.                                                                                                                    
The file will have its original line endings in your working directory.                                                                                                                      
warning: CRLF will be replaced by LF in test_example_update2/mbed-os.lib.                                                                                                                    
The file will have its original line endings in your working directory.                                                                                                                      
Counting objects: 4, done.                                                                                                                                                                   
Delta compression using up to 4 threads.                                                                                                                                                     
Compressing objects: 100% (3/3), done.                                                                                                                                                       
Writing objects: 100% (4/4), 428 bytes | 0 bytes/s, done.                                                                                                                                    
Total 4 (delta 0), reused 0 (delta 0)                                                                                                                                                        
To https://github.com/ARMmbed/github-to-jira-test                                                                                                                                            
   4c4d9da..2834eda  mbed-os-5.6-test -> mbed-os-5.6-test                                                                                                                                    
Update: INFO - Finished updating examples                                                                                                                                                    
Update: INFO -  SUCCEEDED: github-to-jira-test   
  1. Fork test
Update: INFO - 'examples' directory already exists. Deleting...                                                                                                                              
Update: INFO - Updating example 'github-to-jira-test'                                                                                                                                        
Cloning into 'github-to-jira-test'...                                                                                                                                                        
remote: Counting objects: 28, done.                                                                                                                                                          
remote: Total 28 (delta 0), reused 0 (delta 0), pack-reused 28                                                                                                                               
Unpacking objects: 100% (28/28), done.                                                                                                                                                       
remote: Counting objects: 23, done.                                                                                                                                                          
remote: Total 23 (delta 0), reused 0 (delta 0), pack-reused 23                                                                                                                               
Unpacking objects: 100% (23/23), done.                                                                                                                                                       
From https://github.com/ARMmbed/github-to-jira-test                                                                                                                                          
 * [new branch]      master                -> armmbed/master                                                                                                                                 
 * [new branch]      mbed-os-5.5.0-oob     -> armmbed/mbed-os-5.5.0-oob                                                                                                                      
 * [new branch]      mbed-os-5.5.0-oob-rc2 -> armmbed/mbed-os-5.5.0-oob-rc2                                                                                                                  
 * [new branch]      mbed-os-5.6-test      -> armmbed/mbed-os-5.6-test                                                                                                                       
 * [new branch]      oob_test_branch       -> armmbed/oob_test_branch                                                                                                                        
 * [new branch]      oob_test_mbed-os-5.4.0-rc1 -> armmbed/oob_test_mbed-os-5.4.0-rc1                                                                                                        
Total 0 (delta 0), reused 0 (delta 0)                                                                                                                                                        
To https://github.com/adbridge/github-to-jira-test                                                                                                                                           
 + 547db51...4c4d9da master -> master (forced update)                                                                                                                                        
warning: CRLF will be replaced by LF in test_example_update1/mbed-os.lib.                                                                                                                    
The file will have its original line endings in your working directory.                                                                                                                      
warning: CRLF will be replaced by LF in test_example_update2/mbed-os.lib.                                                                                                                    
The file will have its original line endings in your working directory.                                                                                                                      
Counting objects: 4, done.                                                                                                                                                                   
Delta compression using up to 4 threads.                                                                                                                                                     
Compressing objects: 100% (3/3), done.                                                                                                                                                       
Writing objects: 100% (4/4), 430 bytes | 0 bytes/s, done.                                                                                                                                    
Total 4 (delta 0), reused 0 (delta 0)                                                                                                                                                        
To https://github.com/adbridge/github-to-jira-test                                                                                                                                           
   4c4d9da..fcd9b14  master -> master                                                                                                                                                        
Update: INFO - Finished updating examples                                                                                                                                                    
Update: INFO -  SUCCEEDED: github-to-jira-test        

To be tested: Linux

adbridge added some commits Sep 27, 2017

Fix the prepare_branch function
Currently when checking if the destination branch already exists the
command 'git branch' is used. This only returns local branches. What is
actually required is the list of remote branches. This can be obtained
by the command 'git branch -r' and filtering the result.
Move to using command strings rather than command lists.
Previously the script used
cmd =['git','checkout', branch]
syntax. This does not work well cross platform. The solution it to
actually use strings. E.g.
cmd = "git checkout " + branch
@adbridge

This comment has been minimized.

Contributor

adbridge commented Sep 29, 2017

@theotherjimmy please review changes

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 10, 2017

@theotherjimmy please review changes

bump for review !

@adbridge

This comment has been minimized.

Contributor

adbridge commented Oct 10, 2017

@0xc0170 beat me to it , was going to bump him too!

@adbridge adbridge added needs: CI and removed needs: review labels Oct 11, 2017

@adbridge

This comment has been minimized.

Contributor

adbridge commented Oct 11, 2017

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 11, 2017

Build : SUCCESS

Build number : 121
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5224/

Triggering tests

/test mbed-os

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 11, 2017

Build : SUCCESS

Build number : 129
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5224/

Triggering tests

/test mbed-os

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Oct 12, 2017

@theotherjimmy theotherjimmy merged commit 5c8ef54 into ARMmbed:master Oct 13, 2017

5 checks passed

Cam-CI uvisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment