Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Commit

Permalink
Prepare release v0.5.1. (#124)
Browse files Browse the repository at this point in the history
* Project import generated by Copybara.

PiperOrigin-RevId: 228321763

* Project import generated by Copybara.

PiperOrigin-RevId: 334857822

* Project import generated by Copybara.

PiperOrigin-RevId: 334861372

* Docker upgrade release branch with static linking. (#123)

* Removed bad slack link; whitespace.

* Revert most of 90365b6.

* Placate gcloud with 1200s timeout.

* Restore build subdir.

* Fixed startup script for ubuntu 2004-lts.

Cloud SDK and docker are now easy to install.

* nil build just calls "true".

* Fixed integration tests.

Co-authored-by: Cloud Build Team <cloud-build-contact@google.com>
  • Loading branch information
bendory and Cloud Build Team authored Oct 2, 2020
1 parent d31c8a3 commit 9a7d746
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 57 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
execution of builds on your own hardware, and integration into local build and
test workflows.


--------------------------------------------------------------------------------

## Prerequisites
Expand Down Expand Up @@ -73,9 +74,10 @@ See the
## Support
File issues here on gitHub, email `google-cloud-dev@googlegroups.com`, or join
our [Slack channel] if you have general questions about Local Builder or
Container Builder.
Our documentation has a [page on getting
support](https://cloud.google.com/cloud-build/docs/getting-support). If you have
general questions about Local Builder or Cloud Build, you can file issues here
on GitHub, email `google-cloud-dev@googlegroups.com`, or join our.
[Google Cloud Build]: http://cloud.google.com/cloud-build/
[Slack channel]: https://googlecloud-community.slack.com/messages/C4KCRJL4D/details/
* [Google Cloud Build documentation](http://cloud.google.com/cloud-build/)
* [Slack channel](https://googlecloud-community.slack.com/messages/C4KCRJL4D/details/)
4 changes: 1 addition & 3 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ steps:
entrypoint: 'bash'
args: ['-c', './integration_tests/run_tests_on_vm.sh']

timeout: '20m'


timeout: '1200s'
1 change: 1 addition & 0 deletions cloudbuild_tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ steps:
# Create an archive with the latest binaries; that enables a single download url.
- name: 'gcr.io/cloud-builders/go:debian'
entrypoint: 'bash'
env: ['CGO_ENABLED=0']
args:
- '-c'
- |
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/cloudbuild_nil.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
steps:
- name: 'busybox'
args: ['sleep', '0']
args: ['true']
49 changes: 5 additions & 44 deletions integration_tests/gce_startup_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,52 +19,13 @@ trap uploadLogs EXIT INT TERM

set -x

# Install the Cloud SDK
# Ensure Cloud SDK is installed.
export CLOUDSDK_CORE_DISABLE_PROMPTS=1
snap refresh google-cloud-sdk || exit
gcloud info || exit

function install_sdk() {
export CLOUDSDK_CORE_DISABLE_PROMPTS=1
export CLOUDSDK_INSTALL_DIR=/usr/lib

# We use the public installer.
rm -rf "$CLOUDSDK_INSTALL_DIR/google-cloud-sdk"
curl https://sdk.cloud.google.com | bash || exit

# Install needed components.
gcloud components install docker-credential-gcr --quiet || exit
}
install_sdk&
export PATH=/usr/lib/google-cloud-sdk/bin:$PATH

# add the install_sdk PID to the list for waiting.
pids="$! $pids"

function install_docker() {
# https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#uninstall-old-versions
echo "Installing docker..."
sudo apt-get update || exit
sudo apt-get install -y \
linux-image-extra-$(uname -r) \
linux-image-extra-virtual \
apt-transport-https \
ca-certificates \
curl \
software-properties-common || exit
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - || exit
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable" || exit
sudo apt-get update || exit
sudo apt-get install -y docker-ce || exit
# Test.
docker --version || exit
}
install_docker&
# add the install_docker PID to the list for waiting.
pids="$! $pids"

wait $pids || exit
# Ensure Docker is installed.
docker --version || snap install docker || exit
successful_startup=1

# Set gcloud zone
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/run_tests_on_vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ gsutil -m copy ./integration_tests/* $GCS_PATH/
gcloud config set compute/zone us-central1-f
instance_name=ubuntu-integration-tests-$DATE
gcloud compute instances create $instance_name \
--image-family=ubuntu-1404-lts \
--image-family=ubuntu-2004-lts \
--image-project=ubuntu-os-cloud \
--machine-type=n1-standard-2 \
--scopes default,userinfo-email,cloud-platform \
Expand Down
3 changes: 0 additions & 3 deletions integration_tests/test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
# Set project.
gcloud config set project $PROJECT_ID

# Configure docker with gcr credentials.
docker-credential-gcr configure-docker || exit

# Flags tests.
cloud-build-local --version || exit
cloud-build-local --help || exit
Expand Down

0 comments on commit 9a7d746

Please sign in to comment.