Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hack: add google cloud build steps (#88)
- Dockerfile: build environment - cloudbuild*.yaml: steps for building and pushing artifacts Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
- Loading branch information
Showing
4 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2018 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Used by cloudbuild*.yaml to build in Google Cloud Build. | ||
FROM golang:1-alpine | ||
RUN apk add -q --no-cache bash git zip | ||
RUN go get github.com/mitchellh/gox | ||
|
||
ENV PROJECT_ROOT /go/src/github.com/GoogleContainerTools/krew | ||
RUN mkdir -p $(dirname $PROJECT_ROOT) && \ | ||
ln -s /workspace $PROJECT_ROOT | ||
WORKDIR $PROJECT_ROOT | ||
ENTRYPOINT $PROJECT_ROOT/hack/build-cross-releases.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2018 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Used to push tagged releses to Google Cloud Storage with the tag name | ||
# as well as "latest" | ||
steps: | ||
- name: 'gcr.io/cloud-builders/docker' | ||
args: ['build', '-t', 'builder', '-f', 'hack/Dockerfile.build', '.'] | ||
- name: 'builder' | ||
- name: 'gcr.io/cloud-builders/gsutil' | ||
args: ['-m', 'cp', '-r', 'out/*', 'gs://krew/$TAG_NAME/'] | ||
- name: 'gcr.io/cloud-builders/gsutil' | ||
args: ['-m', 'cp', '-r', 'out/*', 'gs://krew/latest/'] | ||
options: | ||
machineType: 'N1_HIGHCPU_8' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2018 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Used to push builds to Google Cloud Storage. | ||
steps: | ||
- name: 'gcr.io/cloud-builders/docker' | ||
args: ['build', '-t', 'builder', '-f', 'hack/Dockerfile.build', '.'] | ||
- name: 'builder' | ||
- name: 'gcr.io/cloud-builders/gsutil' | ||
args: ['-m', 'cp', '-r', 'out/*', 'gs://krew/builds/$SHORT_SHA/'] | ||
options: | ||
machineType: 'N1_HIGHCPU_8' |