mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #6360 from GoogleCloudPlatform/revert-6196-parallel_arch
Revert "Parallelize architectures in both the building and packaging pha...
This commit is contained in:
		@@ -513,9 +513,8 @@ function kube::release::package_client_tarballs() {
 | 
			
		||||
  platforms=($(cd "${LOCAL_OUTPUT_BINPATH}" ; echo */*))
 | 
			
		||||
  for platform in "${platforms[@]}" ; do
 | 
			
		||||
    local platform_tag=${platform/\//-} # Replace a "/" for a "-"
 | 
			
		||||
    kube::log::status "Starting tarball: client $platform_tag"
 | 
			
		||||
    kube::log::status "Building tarball: client $platform_tag"
 | 
			
		||||
 | 
			
		||||
    (
 | 
			
		||||
    local release_stage="${RELEASE_STAGE}/client/${platform_tag}/kubernetes"
 | 
			
		||||
    rm -rf "${release_stage}"
 | 
			
		||||
    mkdir -p "${release_stage}/client/bin"
 | 
			
		||||
@@ -535,11 +534,7 @@ function kube::release::package_client_tarballs() {
 | 
			
		||||
 | 
			
		||||
    local package_name="${RELEASE_DIR}/kubernetes-client-${platform_tag}.tar.gz"
 | 
			
		||||
    kube::release::create_tarball "${package_name}" "${release_stage}/.."
 | 
			
		||||
    ) &
 | 
			
		||||
  done
 | 
			
		||||
 | 
			
		||||
  kube::log::status "Waiting on tarballs"
 | 
			
		||||
  wait || { kube::log::error "client tarball creation failed"; exit 1; }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Package up all of the server binaries
 | 
			
		||||
 
 | 
			
		||||
@@ -313,11 +313,10 @@ kube::golang::build_binaries() {
 | 
			
		||||
    local binaries
 | 
			
		||||
    binaries=($(kube::golang::binaries_from_targets "${targets[@]}"))
 | 
			
		||||
 | 
			
		||||
    kube::log::status "Building go targets for ${platforms[@]} in parallel (output will appear in a burst when complete):" "${targets[@]}"
 | 
			
		||||
    local platform
 | 
			
		||||
    for platform in "${platforms[@]}"; do (
 | 
			
		||||
    for platform in "${platforms[@]}"; do
 | 
			
		||||
      kube::golang::set_platform_envs "${platform}"
 | 
			
		||||
        kube::log::status "${platform}: Parallel go build started"
 | 
			
		||||
      kube::log::status "Building go targets for ${platform}:" "${targets[@]}"
 | 
			
		||||
 | 
			
		||||
      local -a statics=()
 | 
			
		||||
      local -a nonstatics=()
 | 
			
		||||
@@ -370,19 +369,6 @@ kube::golang::build_binaries() {
 | 
			
		||||
                "${statics[@]:+${statics[@]}}"
 | 
			
		||||
          fi
 | 
			
		||||
      fi
 | 
			
		||||
        kube::log::status "${platform}: Parallel go build finished"
 | 
			
		||||
      ) &> "/tmp//${platform//\//_}.build" &
 | 
			
		||||
    done
 | 
			
		||||
 | 
			
		||||
    local fails=0
 | 
			
		||||
    for job in $(jobs -p); do
 | 
			
		||||
      wait ${job} || let "fails+=1"
 | 
			
		||||
    done
 | 
			
		||||
 | 
			
		||||
    for platform in "${platforms[@]}"; do
 | 
			
		||||
      cat "/tmp//${platform//\//_}.build"
 | 
			
		||||
    done
 | 
			
		||||
 | 
			
		||||
    exit ${fails}
 | 
			
		||||
  )
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user