Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gcloud deploy specific files

I am serving some static js files with app engine. I am deploying code via with gcloud preview app deploy . This currently deploys all of my static files, is there a method to upload just a single js file in my static directory to app engine? Maybe a app.yaml config? I basically just need to scp file.js -> gcloud instance but would like to use gcloud tool if possible.

Here is my app.yaml:

version: 1
runtime: python27
api_version: 1
threadsafe: true
default_expiration: "30d"
- url: /(.*\.js)
  mime_type: text/javascript
  static_files: static/\1
  upload: static/(.*\.js)
like image 866
Rick Chen Avatar asked Oct 02 '14 16:10

Rick Chen


People also ask

How do I deploy a script in GCP?

Open the script whose Cloud project you want to replace. At the left, click Project Settings settings. Under Google Cloud Platform (GCP) Project, click Change project. Enter the new project number and click Set project.

What is Gcloudignore?

gcloudignore file to tell gcloud which files should be not be uploaded for Cloud Build, without it, it defaults to .


1 Answers

There is no way to upload a single random file to GAE, but take a look carefully at the logs when the app is being deployed: only the files that were changed since last deployment are being uploaded, so unless all your static files were edited - they are not going to be re-deployed every single time.

like image 168
Mihail Russu Avatar answered Sep 28 '22 01:09

Mihail Russu