From aee13892c870473a3d38d2b7524871e0024a92f2 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Fri, 6 Jul 2012 01:12:54 +0000 Subject: Adding debian package build to teamcity build script. --- build.sh | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 81 insertions(+), 4 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index a95ca91d82..ac7fdc4f75 100755 --- a/build.sh +++ b/build.sh @@ -271,12 +271,89 @@ then end_section WaitParallel fi +# build debian package +if [ "$arch" == "Linux" ] +then + if $succeeded + then + if $build_viewer_deb && [ "$last_built_variant" == "Release" ] + then + begin_section "Build Debian Package" + # mangle the changelog + dch --force-bad-version \ + --distribution unstable \ + --newversion "${VIEWER_VERSION}" \ + "Automated build #$build_id, repository $branch revision $revision." \ + >> "$build_log" 2>&1 + + # build the debian package + $pkg_default_debuild_command >>"$build_log" 2>&1 || record_failure "\"$pkg_default_debuild_command\" failed." + + # Unmangle the changelog file + hg revert debian/changelog + + end_section "Build Debian Package" + + # upload debian package and create repository + begin_section "Upload Debian Repository" + for deb_file in ./*.deb; do + upload_item debian $deb_file binary/octet-stream + done + if [ -d "$build_log_dir/debian_repo" ] + then + pushd "$build_log_dir/debian_repo" + cat > Release < Packages.gz \ + && dpkg-scansources . /dev/null | gzip -9c > Sources.gz + then + begin_section Packages.gz + gunzip --stdout Packages.gz + for file in *.deb + do + stat "$file" | sed 2q + md5sum "$file" + done + end_section Packages.gz + + for file in * + do + upload_item debian_repo "$file" binary/octet-stream + done + else + record_failure 'Unable to generate Packages.gz or Sources.gz' + fi + popd + + process_pending_uploads + + # Rename the local debian_repo directory so that the master buildscript + # doesn't make a remote repo again. + + mv $build_log_dir/debian_repo $build_log_dir/debian_repo_pushed + fi + end_section "Upload Debian Repository" + + else + echo skipping debian build + fi + else + echo skipping debian build due to failed build. + fi +fi + + # check status and upload results to S3 if $succeeded then if $build_viewer then - begin_section Upload + begin_section Upload Installer # Upload installer - note that ONLY THE FIRST ITEM uploaded as "installer" # will appear in the version manager. package=$(installer_$arch) @@ -302,12 +379,12 @@ then # Upload stub installers upload_stub_installers "$build_dir_stubs" fi - end_section Upload + end_section Upload Installer else - echo skipping viewer + echo skipping upload of installer fi else - echo skipping upload of build results due to failed build. + echo skipping upload of installer due to failed build. fi # The branch independent build.sh script invoking this script will finish processing -- cgit v1.2.3 From a6ecafceff18497deba2e0d308f97b044027f7f0 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Fri, 6 Jul 2012 01:53:34 +0000 Subject: Change install directory to include viewer version --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index ac7fdc4f75..47b3ff545e 100755 --- a/build.sh +++ b/build.sh @@ -296,7 +296,7 @@ then # upload debian package and create repository begin_section "Upload Debian Repository" - for deb_file in ./*.deb; do + for deb_file in ../*.deb; do upload_item debian $deb_file binary/octet-stream done if [ -d "$build_log_dir/debian_repo" ] -- cgit v1.2.3 From 8808325ced4d380d937c9be1cc81e20a5ebb5f62 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Fri, 14 Sep 2012 11:27:04 +0000 Subject: Removed appearance utility from viewer source. Added appearance utility autobuild package. --- build.sh | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 2f4f440a92..a85d4af6fc 100755 --- a/build.sh +++ b/build.sh @@ -113,11 +113,23 @@ build() check_for "Before 'autobuild build'" ${build_dir}/packages/dictionaries "$AUTOBUILD" build --no-configure -c $variant - viewer_build_ok=$? + build_ok=$? end_section "Viewer$variant" + + # Run build extensions + if [ $build_ok -eq 0 -a -d ${build_dir}/packages/build-extensions ]; then + for extension in ${build_dir}/packages/build-extensions/*.sh; do + . $extension + if [ $build_ok -ne 0 ]; then + break + fi + done + fi + + # *TODO: Make this a build extension. package_llphysicsextensions_tpv tpvlib_build_ok=$? - if [ $viewer_build_ok -eq 0 -a $tpvlib_build_ok -eq 0 ] + if [ $build_ok -eq 0 -a $tpvlib_build_ok -eq 0 ] then echo true >"$build_dir"/build_ok else @@ -299,7 +311,7 @@ then then if $build_viewer_deb && [ "$last_built_variant" == "Release" ] then - begin_section "Build Debian Package" + begin_section "Build Viewer Debian Package" # mangle the changelog dch --force-bad-version \ --distribution unstable \ @@ -313,7 +325,16 @@ then # Unmangle the changelog file hg revert debian/changelog - end_section "Build Debian Package" + end_section "Build Viewer Debian Package" + + # Run debian extensions + if [ -d ${build_dir}/packages/debian-extensions ]; then + for extension in ${build_dir}/packages/debian-extensions/*.sh; do + . $extension + done + fi + # Move any .deb results. + mv ${build_dir}/packages/*.deb ../ 2>/dev/null || true # upload debian package and create repository begin_section "Upload Debian Repository" @@ -394,8 +415,9 @@ then do upload_item symbolfile "$build_dir/$symbolfile" binary/octet-stream done - + # Upload the llphysicsextensions_tpv package, if one was produced + # *TODO: Make this an upload-extension if [ -r "$build_dir/llphysicsextensions_package" ] then llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package) @@ -409,6 +431,13 @@ then ;; esac + # Run upload extensions + if [ -d ${build_dir}/packages/upload-extensions ]; then + for extension in ${build_dir}/packages/upload-extensions/*.sh; do + . $extension + done + fi + # Upload stub installers upload_stub_installers "$build_dir_stubs" fi -- cgit v1.2.3 From d7e90f4160aaa81e30206c80047b82833c049482 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 7 Feb 2013 11:56:57 -0500 Subject: derive version number from indra/VIEWER_VERSION.txt --- build.sh | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 15f0463aff..e96aec58ec 100755 --- a/build.sh +++ b/build.sh @@ -159,21 +159,6 @@ fi # Check to see if we're skipping the platform eval '$build_'"$arch" || pass -# Run the version number update script -# File no longer exists in code-sep branch, so let's make sure it exists in order to use it. -if test -f scripts/update_version_files.py ; then - begin_section UpdateVer - eval $(python scripts/update_version_files.py \ - --channel="$viewer_channel" \ - --server_channel="$server_channel" \ - --revision=$revision \ - --verbose \ - | sed -n -e "s,Setting viewer channel/version: '\([^']*\)' / '\([^']*\)',VIEWER_CHANNEL='\1';VIEWER_VERSION='\2',p")\ - || fail update_version_files.py - echo "{\"Type\":\"viewer\",\"Version\":\"${VIEWER_VERSION}\"}" > summary.json - end_section UpdateVer -fi - if [ -z "$AUTOBUILD" ] then export autobuild_dir="$here/../../../autobuild/bin/" -- cgit v1.2.3 From 8c7bc4d8636fafafab573051662987af8d05eb4d Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 12 Feb 2013 13:16:47 -0500 Subject: remove setting login channel from build script --- build.sh | 1 - 1 file changed, 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index e96aec58ec..638ec33281 100755 --- a/build.sh +++ b/build.sh @@ -71,7 +71,6 @@ pre_build() -DPACKAGE:BOOL=ON \ -DRELEASE_CRASH_REPORTING:BOOL=ON \ -DVIEWER_CHANNEL:STRING="\"$viewer_channel\"" \ - -DVIEWER_LOGIN_CHANNEL:STRING="\"$viewer_login_channel\"" \ -DGRID:STRING="\"$viewer_grid\"" \ -DLL_TESTS:BOOL="$run_tests" \ -DTEMPLATE_VERIFIER_OPTIONS:STRING="$template_verifier_options" $template_verifier_master_url -- cgit v1.2.3 From 70ae613209bdc03f7ff45075e673e225447ec7a5 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 13 Mar 2013 14:04:50 -0400 Subject: remove obsolete debugging messages and commented out code --- build.sh | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 638ec33281..8fde4f3fab 100755 --- a/build.sh +++ b/build.sh @@ -65,7 +65,7 @@ pre_build() && [ -r "$master_message_template_checkout/message_template.msg" ] \ && template_verifier_master_url="-DTEMPLATE_VERIFIER_MASTER_URL=file://$master_message_template_checkout/message_template.msg" - check_for "Before 'autobuild configure'" ${build_dir}/packages/dictionaries + check_for "Confirm dictionaries are installed before 'autobuild configure'" ${build_dir}/packages/dictionaries "$AUTOBUILD" configure -c $variant -- \ -DPACKAGE:BOOL=ON \ @@ -75,8 +75,6 @@ pre_build() -DLL_TESTS:BOOL="$run_tests" \ -DTEMPLATE_VERIFIER_OPTIONS:STRING="$template_verifier_options" $template_verifier_master_url - check_for "After 'autobuild configure'" ${build_dir}/packages/dictionaries - end_section "Pre$variant" } @@ -109,7 +107,6 @@ build() if $build_viewer then begin_section "Viewer$variant" - check_for "Before 'autobuild build'" ${build_dir}/packages/dictionaries "$AUTOBUILD" build --no-configure -c $variant viewer_build_ok=$? @@ -122,8 +119,6 @@ build() else echo false >"$build_dir"/build_ok fi - check_for "After 'autobuild configure'" ${build_dir}/packages/dictionaries - fi } @@ -181,27 +176,11 @@ then fi # load autbuild provided shell functions and variables -# Merov: going back to the previous code that passes even if it fails catching a failure -# TODO: use the correct code here under and fix the llbase import in python code -#if "$AUTOBUILD" source_environment > source_environment -#then -# . source_environment -#else - # dump environment variables for debugging -# env|sort -# record_failure "autobuild source_environment failed" -# cat source_environment >&3 -# exit 1 -#fi eval "$("$AUTOBUILD" source_environment)" # dump environment variables for debugging env|sort -check_for "Before 'autobuild install'" ${build_dir}/packages/dictionaries - - -check_for "After 'autobuild install'" ${build_dir}/packages/dictionaries # Now run the build succeeded=true build_processes= -- cgit v1.2.3 From 06baa6bf9cf7bb8b787f10705a3109ab00866d79 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Fri, 18 Jan 2013 21:22:18 +0000 Subject: Moving appearance utility deb to private repo --- build.sh | 54 ++++++++++++++++-------------------------------------- 1 file changed, 16 insertions(+), 38 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 307dda85eb..d779a1a34b 100755 --- a/build.sh +++ b/build.sh @@ -334,51 +334,29 @@ then done fi # Move any .deb results. - mv ${build_dir}/packages/*.deb ../ 2>/dev/null || true + mkdir -p ../packages_public + mkdir -p ../packages_private + mv ${build_dir}/packages/*.deb ../packages_public 2>/dev/null || true + mv ${build_dir}/packages/packages_private/*.deb ../packages_private 2>/dev/null || true # upload debian package and create repository begin_section "Upload Debian Repository" - for deb_file in ../*.deb; do + for deb_file in `/bin/ls ../packages_public/*.deb ../*.deb 2>/dev/null`; do upload_item debian $deb_file binary/octet-stream done - if [ -d "$build_log_dir/debian_repo" ] - then - pushd "$build_log_dir/debian_repo" - cat > Release < Packages.gz \ - && dpkg-scansources . /dev/null | gzip -9c > Sources.gz - then - begin_section Packages.gz - gunzip --stdout Packages.gz - for file in *.deb - do - stat "$file" | sed 2q - md5sum "$file" - done - end_section Packages.gz - - for file in * - do - upload_item debian_repo "$file" binary/octet-stream - done - else - record_failure 'Unable to generate Packages.gz or Sources.gz' - fi - popd - - process_pending_uploads + for deb_file in `/bin/ls ../packages_private/*.deb 2>/dev/null`; do + upload_item debian_private $deb_file binary/octet-stream + done - # Rename the local debian_repo directory so that the master buildscript - # doesn't make a remote repo again. + create_deb_repo - mv $build_log_dir/debian_repo $build_log_dir/debian_repo_pushed - fi + # Rename the local debian_repo* directories so that the master buildscript + # doesn't make a remote repo again. + for debian_repo_type in debian_repo debian_repo_private; do + if [ -d "$build_log_dir/$debian_repo_type" ]; then + mv $build_log_dir/$debian_repo_type $build_log_dir/${debian_repo_type}_pushed + fi + done end_section "Upload Debian Repository" else -- cgit v1.2.3 From b13d0b7a658784f015256576b71643827c572bb5 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Sat, 19 Jan 2013 02:00:39 +0000 Subject: Adding stub for private artifacts --- build.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'build.sh') diff --git a/build.sh b/build.sh index d779a1a34b..964f9ef0a6 100755 --- a/build.sh +++ b/build.sh @@ -312,6 +312,7 @@ then if $build_viewer_deb && [ "$last_built_variant" == "Release" ] then begin_section "Build Viewer Debian Package" + local have_private_repo=false # mangle the changelog dch --force-bad-version \ --distribution unstable \ @@ -346,6 +347,7 @@ then done for deb_file in `/bin/ls ../packages_private/*.deb 2>/dev/null`; do upload_item debian_private $deb_file binary/octet-stream + have_private_repo=true done create_deb_repo @@ -357,6 +359,14 @@ then mv $build_log_dir/$debian_repo_type $build_log_dir/${debian_repo_type}_pushed fi done + + if [ $have_private_repo = true ]; then + eval "$python_command \"$redirect\" '\${private_S3PROXY_URL}${S3PREFIX}repo/$repo/rev/$revision/index.html'"\ + >"$build_log_dir/private.html" || fatal generating redirect + upload_item global_redirect "$build_log_dir/private.html" text/html + + fi + end_section "Upload Debian Repository" else -- cgit v1.2.3 From c13d75dc386db883c35624a92ca452e04cc1365a Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 21 May 2013 12:45:44 -0400 Subject: CHOP-947: create summary.json (really python) metadata file for TeamCity results --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 1275f41fe1..a78f368e47 100755 --- a/build.sh +++ b/build.sh @@ -357,7 +357,7 @@ then else upload_item installer "$package" binary/octet-stream upload_item quicklink "$package" binary/octet-stream - [ -f summary.json ] && upload_item installer summary.json text/plain + [ -f $build_dir/summary.json ] && upload_item installer $build_dir/summary.json text/plain case "$last_built_variant" in Release) -- cgit v1.2.3