Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Go Httpbin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Nix
Go Httpbin
Commits
9189f632
Commit
9189f632
authored
4 years ago
by
Will McCutchen
Browse files
Options
Downloads
Patches
Plain Diff
Add bin/gcloud wrapper script
parent
3fadb26d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
bin/gcloud
+15
-0
15 additions, 0 deletions
bin/gcloud
with
16 additions
and
1 deletion
Makefile
+
1
−
1
View file @
9189f632
...
@@ -9,7 +9,7 @@ GCLOUD_PROJECT ?= httpbingo
...
@@ -9,7 +9,7 @@ GCLOUD_PROJECT ?= httpbingo
GCLOUD_ACCOUNT
?=
mccutchen@gmail.com
GCLOUD_ACCOUNT
?=
mccutchen@gmail.com
# Run gcloud in a container to avoid needing to install the SDK locally
# Run gcloud in a container to avoid needing to install the SDK locally
GCLOUD_COMMAND
?=
docker run
--rm
-ti
--workdir
/code
-v
$$
PWD:/code
-v
$$
HOME/.config/gcloud:/root/.config/gcloud google/cloud-sdk
gcloud
GCLOUD_COMMAND
?=
./bin/
gcloud
# Built binaries will be placed here
# Built binaries will be placed here
DIST_PATH
?=
dist
DIST_PATH
?=
dist
...
...
This diff is collapsed.
Click to expand it.
bin/gcloud
0 → 100755
+
15
−
0
View file @
9189f632
#!/bin/bash
#
# A wrapper that executes the gcloud CLI in a docker container, to avoid
# requiring a local installation.
#
# Adapted from this helpful blog post:
# https://blog.scottlowe.org/2018/09/13/running-gcloud-cli-in-a-docker-container/
exec
docker run
\
--rm
\
-ti
\
--workdir
/code
\
-v
$PWD
:/code
\
-v
$HOME
/.config/gcloud:/root/.config/gcloud
\
google/cloud-sdk gcloud
$*
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment