github.com/demonoid81/containerd@v1.3.4/script/release/deploy-cri (about)

     1  #!/usr/bin/env bash
     2  
     3  #   Copyright The containerd Authors.
     4  
     5  #   Licensed under the Apache License, Version 2.0 (the "License");
     6  #   you may not use this file except in compliance with the License.
     7  #   You may obtain a copy of the License at
     8  
     9  #       http://www.apache.org/licenses/LICENSE-2.0
    10  
    11  #   Unless required by applicable law or agreed to in writing, software
    12  #   distributed under the License is distributed on an "AS IS" BASIS,
    13  #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14  #   See the License for the specific language governing permissions and
    15  #   limitations under the License.
    16  
    17  #
    18  # Deploy the cri-containerd release tarball to gcs.
    19  #
    20  set -eu -o pipefail
    21  
    22  ROOT=${GOPATH}/src/github.com/containerd/containerd
    23  BUCKET="gs://cri-containerd-release"
    24  
    25  rm -rf "${HOME}/google-cloud-sdk"
    26  export CLOUDSDK_CORE_DISABLE_PROMPTS=1
    27  curl https://sdk.cloud.google.com | bash > /dev/null
    28  gcloud version
    29  
    30  openssl aes-256-cbc -K $encrypted_5a565171e51f_key -iv $encrypted_5a565171e51f_iv -in "${ROOT}/script/release/gcp-secret.json.enc" -out gcp-secret.json -d
    31  gcloud auth activate-service-account --key-file gcp-secret.json --project=k8s-cri-containerd
    32  
    33  for file in $(ls "${ROOT}"/releases/cri/*.tar.gz.sha256); do
    34    output="$(gsutil cp -n "${file}" "${BUCKET}" 2>&1)"
    35    if [[ "$output" =~ "Skipping existing item" ]];then
    36      echo "$(basename ${file}) already exists, skip the release tarball"
    37      continue
    38    fi
    39    gsutil cp "${file%.sha256}" "${BUCKET}"
    40  done