This repository was archived by the owner on Jul 2, 2025. It is now read-only.
  
  
  - 
                Notifications
    You must be signed in to change notification settings 
- Fork 40
CP-15745: Add utility scripts for building packages under travis #55
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            2 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      
    File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/bin/sh | ||
|  | ||
| set -eux | ||
|  | ||
| REPO_PATH=$1 | ||
| REPO=`basename $REPO_PATH` | ||
|  | ||
| cp -r $REPO_PATH . | ||
| cd $REPO | ||
|  | ||
| eval $REPO_CONFIGURE_CMD | ||
| eval $REPO_BUILD_CMD | ||
| eval $REPO_TEST_CMD | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| #!/bin/sh | ||
|  | ||
| # This script is intended to called from inside a git repo by travis. | ||
| # It will download travis-build-repo-internal.sh and run.py, launch a | ||
| # xenserver-build-env container with the git repo mounted, and will finally | ||
| # run the script travis-build-repo-internal.sh inside the container. | ||
| # | ||
| # travis-build-repo.sh makes use of the following environment variables: | ||
| # $BUILDENV_USER (optional - default 'xenserver') | ||
| # - The github user from which to pull the required scripts. | ||
| # $BUILDENV_BRANCH (optional - default 'master') | ||
| # - The github branch from which to pull the required scripts. | ||
| # $REPO_PACKAGE_NAME (required) | ||
| # - The package for which dependencies will be installed in the container. | ||
| # $REPO_CONFIGURE_CMD (optional - default './configure') | ||
| # - The configure command to run in the repo. | ||
| # $REPO_BUILD_CMD (optional - default 'make') | ||
| # - The build command to run in the repo. | ||
| # $REPO_TEST_CMD (optional - default 'make test') | ||
| # - The test command to run in the repo. | ||
|  | ||
| set -eux | ||
|  | ||
| BUILDENV_USER=${BUILDENV_USER:-xenserver} | ||
| BUILDENV_BRANCH=${BUILDENV_BRANCH:-master} | ||
|  | ||
| wget https://raw.githubusercontent.com/${BUILDENV_USER}/xenserver-build-env/${BUILDENV_BRANCH}/run.py | ||
| wget https://raw.githubusercontent.com/${BUILDENV_USER}/xenserver-build-env/${BUILDENV_BRANCH}/utils/travis-build-repo-internal.sh | ||
|  | ||
| REPO=`basename $PWD` | ||
| REPO_PATH=/repos/$REPO | ||
|  | ||
| REPO_CONFIGURE_CMD=${REPO_CONFIGURE_CMD:-./configure} | ||
| REPO_BUILD_CMD=${REPO_BUILD_CMD:-make} | ||
| REPO_TEST_CMD=${REPO_TEST_CMD:-make test} | ||
|  | ||
| python run.py -p $REPO_PACKAGE_NAME --rm \ | ||
| -e "REPO_CONFIGURE_CMD=$REPO_CONFIGURE_CMD" \ | ||
| -e "REPO_BUILD_CMD=$REPO_BUILD_CMD" \ | ||
| -e "REPO_TEST_CMD=$REPO_TEST_CMD" \ | ||
| -v $PWD:$REPO_PATH \ | ||
| sh $REPO_PATH/travis-build-repo-internal.sh $REPO_PATH | ||
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice docs 👍