Comments (3)
I'm having the same issue, and I solved it using a custom image, inspired from CircleCI-Public
FROM circleci/python:3.7
ARG GCLOUD_VERSION=268.0.0
# Downloading gcloud package
RUN cd ~
# Downloading gcloud package
RUN curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${GCLOUD_VERSION}-linux-x86_64.tar.gz > /tmp/google-cloud-sdk.tar.gz
# Installing the package
RUN sudo mkdir -p /usr/local/gcloud
RUN sudo tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz
RUN sudo /usr/local/gcloud/google-cloud-sdk/install.sh
# Adding the package path to local
ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin
This works well for the orbs' commands, but I believe to use the orbs' job, but it's not suitable for the orb's jobs, as far as I know (you can't specify an executor or docker image when using the job direclty in the workflow, can you?)
I feel the orbs should offer a way to execute the job with a docker image that already has the tools installed...
from gcp-gcr-orb.
Hello all, as described in your initial post, the orb will only install the GCP CLI if it is not found within the execution environment. Installing is an option but if the image provided to the job has the GCP CLI installed that will be the fastest solution.
While CircleCI does not yet supply any docker images with the GCP CLI installed, we do intend to release a suite of deployment images in the future.
Currently, it would be recommended to build a custom docker image using our next-generation base image as the base for your docker image. Simply install the GCP CLI and build and that should shave quite a bit of time assuming you hit the cache for the base image (which is growing daily).
https://circleci.com/docs/2.0/circleci-images/#circleci-base-image
@benjlevesque provided a great example, the new base image is newer than this post.
For any suggestions to the platform directly (rather than an orb) please feel free to open a new idea or vote for an existing one on our ideas portal: https://ideas.circleci.com/ideas
Thank you.
from gcp-gcr-orb.
Hey @KyleTryon I've sent a PR to fix the part I mentioned regarding jobs and executors.
This enables to have a very short and use the build-and-push-image
job, while enjoying the optimizations of a custom image.
from gcp-gcr-orb.
Related Issues (20)
- How do I tag the branch name slug in gcp-gcr/tag-image? HOT 2
- Config files using the gcp-gcr orb are invalid HOT 4
- Need a timeout parameter, just like in the AWS ECR Orb HOT 2
- Add option to set version parameter of setup_remote_docker
- Support artifact registry Docker repository. HOT 6
- `extra_build_args` parameter causes docker build error
- Build and push multiple tags HOT 3
- Orb needs storage.buckets.create
- Google Cloud SDK is Unavailable HOT 1
- Not working anymore under Ubuntu 22.04 HOT 2
- Option to use buildkit HOT 2
- Artifact Registry Push Docker Images HOT 1
- docker push failing with 0.15.1 patch HOT 4
- Unable to use interpolated var for pipeline values for "image:" in build-and-push-image job HOT 1
- Using gcp-gcr orb with OIDC auth from gcp-cli orb? HOT 8
- tag-image command doesn't expand envvars
- The version installed (451.0.0) differs from the version requested (451.0.1)
- The version installed (458.0.1) differs from the version requested (459.0.0). Uninstalling v458.0.1 HOT 3
- Change image used because of depreciation HOT 3
- Not working with standard Artifact Registry repositories
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 gcp-gcr-orb.