mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
Cloud build adjustments.
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
# Script to run http://goreleaser.com
|
||||
|
||||
module=$1
|
||||
shift
|
||||
|
||||
configFile=$(mktemp)
|
||||
cat <<EOF >$configFile
|
||||
project_name: $module
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
- GO111MODULE=on
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
- Merge pull request
|
||||
- Merge branch
|
||||
release:
|
||||
github:
|
||||
owner: kubernetes-sigs
|
||||
name: kustomize
|
||||
builds:
|
||||
- binary: $module
|
||||
ldflags: >
|
||||
-s
|
||||
-X sigs.k8s.io/kustomize/api/provenance.version={{.Version}}
|
||||
-X sigs.k8s.io/kustomize/api/provenance.gitCommit={{.Commit}}
|
||||
-X sigs.k8s.io/kustomize/api/provenance.buildDate={{.Date}}
|
||||
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
- windows
|
||||
goarch:
|
||||
- amd64
|
||||
EOF
|
||||
|
||||
cat $configFile
|
||||
|
||||
/bin/goreleaser release --config=$configFile --rm-dist --skip-validate $@
|
||||
@@ -1,48 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
# Script to run http://goreleaser.com
|
||||
|
||||
module=$1
|
||||
shift
|
||||
|
||||
configFile=$(mktemp)
|
||||
cat <<EOF >$configFile
|
||||
project_name: $module
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
- GO111MODULE=on
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
- Merge pull request
|
||||
- Merge branch
|
||||
release:
|
||||
github:
|
||||
owner: kubernetes-sigs
|
||||
name: kustomize
|
||||
builds:
|
||||
- binary: $module
|
||||
ldflags: >
|
||||
-s
|
||||
-X sigs.k8s.io/kustomize/api/provenance.version={{.Version}}
|
||||
-X sigs.k8s.io/kustomize/api/provenance.gitCommit={{.Commit}}
|
||||
-X sigs.k8s.io/kustomize/api/provenance.buildDate={{.Date}}
|
||||
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
- windows
|
||||
goarch:
|
||||
- amd64
|
||||
EOF
|
||||
|
||||
cat $configFile
|
||||
|
||||
/bin/goreleaser release --config=$configFile --rm-dist --skip-validate $@
|
||||
@@ -7,6 +7,8 @@ set -x
|
||||
module=$1
|
||||
shift
|
||||
|
||||
cd $module
|
||||
|
||||
configFile=$(mktemp)
|
||||
cat <<EOF >$configFile
|
||||
project_name: $module
|
||||
@@ -3,7 +3,7 @@ steps:
|
||||
args: [fetch, --tags, --depth=100]
|
||||
- name: goreleaser/goreleaser
|
||||
entrypoint: /bin/sh
|
||||
args: ["cloudbuild.sh", "api"]
|
||||
args: ["releasing/cloudbuild.sh", "api"]
|
||||
secretEnv: ['GITHUB_TOKEN']
|
||||
secrets:
|
||||
- kmsKeyName: projects/kustomize-199618/locations/global/keyRings/github-tokens/cryptoKeys/gh-release-token
|
||||
@@ -3,7 +3,7 @@ steps:
|
||||
args: [fetch, --tags, --depth=100]
|
||||
- name: goreleaser/goreleaser
|
||||
entrypoint: /bin/sh
|
||||
args: ["../releasing/cloudbuild.sh", "kustomize"]
|
||||
args: ["releasing/cloudbuild.sh", "kustomize"]
|
||||
secretEnv: ['GITHUB_TOKEN']
|
||||
secrets:
|
||||
- kmsKeyName: projects/kustomize-199618/locations/global/keyRings/github-tokens/cryptoKeys/gh-release-token
|
||||
@@ -3,7 +3,7 @@ steps:
|
||||
args: [fetch, --tags, --depth=100]
|
||||
- name: goreleaser/goreleaser
|
||||
entrypoint: /bin/sh
|
||||
args: ["../releasing/cloudbuild.sh", "pluginator"]
|
||||
args: ["releasing/cloudbuild.sh", "pluginator"]
|
||||
secretEnv: ['GITHUB_TOKEN']
|
||||
secrets:
|
||||
- kmsKeyName: projects/kustomize-199618/locations/global/keyRings/github-tokens/cryptoKeys/gh-release-token
|
||||
@@ -1,10 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Usage - from the module (kustomize|pluginator|api) of
|
||||
# your choice, enterthe repository root, enter
|
||||
# Usage - from repo root, enter:
|
||||
#
|
||||
# cd module
|
||||
# ../releasing/localbuild.sh
|
||||
# module=(kustomize|pluginator|api)
|
||||
# ./releasing/localbuild.sh $module
|
||||
#
|
||||
# The script attempts to use cloudbuild configuration
|
||||
# to create a release "locally".
|
||||
@@ -19,7 +18,7 @@
|
||||
# applied to the kustomize repo, the cloud builder
|
||||
# reads the repository-relative file
|
||||
#
|
||||
# ${module}/cloudbuild.yaml
|
||||
# releasing/cloudbuild_${module}.yaml
|
||||
#
|
||||
# where module is one of kustomize, pluginator or api.
|
||||
#
|
||||
@@ -50,7 +49,7 @@ case "$module" in
|
||||
esac
|
||||
|
||||
config=$(mktemp)
|
||||
cp cloudbuild.yaml $config
|
||||
cp releasing/cloudbuild_${module}.yaml $config
|
||||
|
||||
# Delete the cloud-builders/git step, which isn't needed
|
||||
# for a local run.
|
||||
@@ -76,5 +75,5 @@ cloud-build-local \
|
||||
echo " "
|
||||
echo "Result of local build:"
|
||||
echo "##########################################"
|
||||
tree ./dist
|
||||
tree ./$module/dist
|
||||
echo "##########################################"
|
||||
|
||||
Reference in New Issue
Block a user