mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Step 1 of 2: Renaming localbuild.sh to cloudbuild-local.sh (preserve commit history) to make way for new localbuild.sh which will actually be entirely local, since this script is still very specific to Cloud Build.
This commit is contained in:
54
releasing/cloudbuild-local.sh
Normal file
54
releasing/cloudbuild-local.sh
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# To test the release process, this script attempts
|
||||
# to use a Google cloudbuild configuration to create
|
||||
# release artifacts locally.
|
||||
#
|
||||
# See https://cloud.google.com/cloud-build/docs/build-debug-locally
|
||||
#
|
||||
# Usage: from the repo root, enter:
|
||||
#
|
||||
# ./releasing/cloudbuild-local.sh kustomize/v1.2.3
|
||||
#
|
||||
# or some other valid tag value.
|
||||
#
|
||||
# IMPORTANT:
|
||||
# The process clones the repo at the given tag,
|
||||
# so the repo must have the tag applied upstream.
|
||||
# Either use an old tag, or disable the cloud build
|
||||
# trigger so that a new testing tag can be applied
|
||||
# without setting off a cloud build.
|
||||
|
||||
set -e
|
||||
|
||||
config=$(mktemp)
|
||||
cp releasing/cloudbuild.yaml $config
|
||||
|
||||
# Add the --snapshot flag to suppress the
|
||||
# github release and leave the build output
|
||||
# in the kustomize/dist directory.
|
||||
sed -i "s|# - '--snapshot|- '--snapshot|" $config
|
||||
|
||||
echo "Executing cloud-build-local with config file $config :"
|
||||
echo "========================="
|
||||
cat $config
|
||||
echo "========================="
|
||||
|
||||
workspace=~/cloud-build-local-workspace
|
||||
|
||||
cloud-build-local \
|
||||
--config=$config \
|
||||
--substitutions=TAG_NAME=$1 \
|
||||
--write-workspace=$workspace \
|
||||
--dryrun=false \
|
||||
.
|
||||
|
||||
# --bind-mount-source \
|
||||
|
||||
echo " "
|
||||
echo "Result of local build:"
|
||||
echo "##########################################"
|
||||
tree ./$module/dist
|
||||
echo "##########################################"
|
||||
tree ./$workspace
|
||||
echo "##########################################"
|
||||
Reference in New Issue
Block a user