From: Andrew Schoen Date: Thu, 12 Nov 2015 20:54:19 +0000 (-0600) Subject: do not clone ceph-build to use build_utils.sh; use !include-raw X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c4bcbfc83f43ad559961605c2ca076f8b7be1747;p=ceph-build.git do not clone ceph-build to use build_utils.sh; use !include-raw This also includes a few small fixes related to using build_utils Signed-off-by: Andrew Schoen --- diff --git a/ceph-build/build/setup b/ceph-build/build/setup index 4f0fb548..6d7f646b 100644 --- a/ceph-build/build/setup +++ b/ceph-build/build/setup @@ -66,9 +66,8 @@ CentOS|Fedora|SUSE*|RedHatEnterpriseServer) ;; esac -source $WORKSPACE/ceph-build/scripts/build_utils.sh - -install_python_packages "chacractl>=0.0.4" +pkgs=( "chacractl>=0.0.4" ) +install_python_packages "pkgs[@]" # create the .chacractl config file using global variables make_chacractl_config diff --git a/ceph-build/config/definitions/ceph-build.yml b/ceph-build/config/definitions/ceph-build.yml index 74385dc3..b23ffd6d 100644 --- a/ceph-build/config/definitions/ceph-build.yml +++ b/ceph-build/config/definitions/ceph-build.yml @@ -36,7 +36,9 @@ filter: 'dist/**' which-build: last-successful - shell: - !include-raw ../../build/setup + !include-raw: + - ../../../scripts/build_utils.sh + - ../../build/setup - shell: !include-raw ../../build/setup_pbuilder - shell: @@ -44,15 +46,6 @@ - shell: !include-raw ../../build/build_rpm - scm: - - git: - url: https://github.com/ceph/ceph-build.git - browser-url: https://github.com/ceph/ceph-build - timeout: 20 - skip-tag: true - wipe-workspace: true - basedir: "ceph-build" - publishers: - archive: artifacts: 'dist/**' diff --git a/ceph-deploy/build/setup b/ceph-deploy/build/setup index e5e789dc..87e1aa00 100644 --- a/ceph-deploy/build/setup +++ b/ceph-deploy/build/setup @@ -17,9 +17,8 @@ if test -f /etc/redhat-release ; then sudo yum install -y $rpm_deps fi -source $WORKSPACE/ceph-build/scripts/build_utils.sh - -install_python_packages "chacractl>=0.0.4" +pkgs=( "chacractl>=0.0.4" ) +install_python_packages "pkgs[@]" # create the .chacractl config file using global variables make_chacractl_config diff --git a/ceph-deploy/config/definitions/ceph-deploy.yml b/ceph-deploy/config/definitions/ceph-deploy.yml index 02651149..7d9e4a56 100644 --- a/ceph-deploy/config/definitions/ceph-deploy.yml +++ b/ceph-deploy/config/definitions/ceph-deploy.yml @@ -1,26 +1,3 @@ -- scm: - name: ceph-deploy - scm: - - git: - url: https://github.com/ceph/ceph-deploy.git - branches: - - $BRANCH - browser: auto - skip-tag: true - timeout: 20 - wipe-workspace: true - -- scm: - name: ceph-build - scm: - - git: - url: https://github.com/ceph/ceph-build.git - browser-url: https://github.com/ceph/ceph-build - timeout: 20 - skip-tag: true - wipe-workspace: true - basedir: "ceph-build" - - job: name: ceph-deploy node: small && trusty @@ -57,8 +34,14 @@ If this is unchecked, then then nothing is built or pushed if they already exist If this is checked, then the binaries will be built and pushed to chacra even if they already exist in chacra." scm: - - ceph-deploy - - ceph-build + - git: + url: https://github.com/ceph/ceph-deploy.git + branches: + - $BRANCH + browser: auto + skip-tag: true + timeout: 20 + wipe-workspace: true axes: - axis: @@ -78,7 +61,10 @@ If this is checked, then the binaries will be built and pushed to chacra even if - centos7 builders: - - shell: !include-raw ../../build/setup + - shell: + !include-raw: + - ../../../scripts/build_utils.sh + - ../../build/setup - shell: !include-raw ../../build/build wrappers: diff --git a/ceph-release-rpm/build/build b/ceph-release-rpm/build/build index 881e0e38..0479a538 100644 --- a/ceph-release-rpm/build/build +++ b/ceph-release-rpm/build/build @@ -12,9 +12,8 @@ echo "Building on Host: $(hostname) Date: $(date)" rm -rf dist rm -rf RPMBUILD -source $WORKSPACE/ceph-build/scripts/build_utils.sh - -install_python_packages "chacractl>=0.0.4" +pkgs=( "chacractl>=0.0.4" ) +install_python_packages "pkgs[@]" # create the .chacractl config file using global variables make_chacractl_config diff --git a/ceph-release-rpm/config/definitions/ceph-release-rpm.yml b/ceph-release-rpm/config/definitions/ceph-release-rpm.yml index 1042ab5e..da17823a 100644 --- a/ceph-release-rpm/config/definitions/ceph-release-rpm.yml +++ b/ceph-release-rpm/config/definitions/ceph-release-rpm.yml @@ -25,15 +25,6 @@ If this is unchecked, then then nothing is built or pushed if they already exist If this is checked, then the binaries will be built and pushed to chacra even if they already exist in chacra." - scm: - - git: - url: https://github.com/ceph/ceph-build.git - browser-url: https://github.com/ceph/ceph-build - timeout: 20 - skip-tag: true - wipe-workspace: true - basedir: "ceph-build" - axes: - axis: type: label-expression @@ -50,7 +41,9 @@ If this is checked, then the binaries will be built and pushed to chacra even if builders: - shell: - !include-raw ../../build/build + !include-raw: + - ../../../scripts/build_utils.sh + - ../../build/build wrappers: - inject-passwords: diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 142b9ab6..17a9aae4 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -6,14 +6,13 @@ VENV="$WORKSPACE/venv/bin" install_python_packages () { # Use this function to create a virtualenv and install - # python packages. Pass either a single package name or a list - # of package names. Usage: + # python packages. Pass a list of package names. # - # install_python_packages "ansible" + # Usage: # # to_install=( "ansible" "chacractl>=0.0.4" ) # install_python_packages "to_install[@]" - # + # Create the virtualenv virtualenv $WORKSPACE/venv @@ -32,10 +31,10 @@ install_python_packages () { } make_chacractl_config () { - # create the .chacractl config file - cat > $HOME/.chacractl << EOF - url = "$CHACRACTL_URL" - user = "$CHACRACTL_USER" - key = "$CHACRACTL_KEY" - EOF +# create the .chacractl config file +cat > $HOME/.chacractl << EOF +url = "$CHACRACTL_URL" +user = "$CHACRACTL_USER" +key = "$CHACRACTL_KEY" +EOF }