Comments (7)
Hey!
We don’t have an integrated solution as of today, but here are a few solutions coming from users:
- Create a Github token with “repo” scope, then use this syntax in the
package.json
:
"my-private-module": "git+https://<github_token>:[email protected]/<user>/<repo>.git"
- Use a Deploy or User Key that you could store in GCS for example, and pull it as a previous build step.
I hope this helps.
from cloud-builders.
This newly-published doc on Using Encrypted Files in your build should be helpful.
from cloud-builders.
I have a "hack" not what I would call a "solution" to this problem. It involves,
- Make a copy of package.json
- Download private repo, using either gcloud builder or git buider.
- remove private repo from package.json
- run npm install.
- copy private repo to node_modules.
- replace package.json with original.
- run npm rebuild.
- build image.
It's not elegant.
from cloud-builders.
Thanks, @Philmod, the only problem with that approach, is that if you don't commit the url including the github token to GitHub, you will have to do some kind of "sed" like replacement in package.json. You would have to do it both on the developer side and the builder side, or .gitignore package.json and copy package.json.builder to package.json, all of which is messy. I think i'll need to do the same thing that i did with kubectl bring the git auth in from GCS and configure git. Like it is on my dev box.
from cloud-builders.
Wow, thanks @bendory, that is simple and effective. Way better than storing the account.json file in gs//.
from cloud-builders.
Great! So glad you like it!
Shall we close this issue?
from cloud-builders.
I'm closing this issue with the assumption that our doc on Using Encrypted Files resolves this issue. Please re-open if that does not provide you with what you need.
from cloud-builders.
Related Issues (20)
- [FR] Update bazel to 6.0.0
- Running container on GCP instance via GirLab
- [BUG] Java Builder doc currently recommends openjdk (DEPRECATED) should recommend Temurin HOT 1
- Docker build squash HOT 1
- [BUG] Bazel image missing `python3-distutils`
- [BUG] kubectl - memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused HOT 3
- [FR] xp.zen.one.zip.MAXFIELD.dev.GT.snapdragon.K3M.oxford.USNRx.fugk.ZoeOzone.ZOZANZI.xia.xiu.BuGzLoPœvzg.opus.hummingbird.circa.VELOTRIX.sexpixel.clarity.verity 609 https://t.co/gadgetgreen
- [BUG] Recent commit for 'latest' tag was a breaking change for many
- [BUG] Latest gcloud image throws (AttributeError): 'bool' object has no attribute 'lower' HOT 2
- [BUG] Cloud Build Error
- [BUG] npm 9.7.0 HOT 2
- Docs refer to stale bazel-provided images, new images aren't compatible with Cloud Build HOT 2
- [BUG] gke-deploy generated files fail deployment HOT 2
- yarn image has outdated node versions
- [FR] Add labels to cloud-builder images
- [BUG] gke-deploy does not respect the declared ApiVersion
- How to pass credentials to GKE-DEPLOY HOT 1
- [FR] Update Bazel to 7.x HOT 2
- [FR] Remove mandatory dependence on gsutil HOT 1
- [BUG] kubectl builder finds wrong context when executed in parallel HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloud-builders.