The subject basically says it all.
I am using gcloud app deploy but I'd like to tweak the build process, is there a way to get the cloudbuild.yaml file that is used by default to have something to start from?
Follow below steps if you already have a app deployed to find the 'cloudbuild.yaml' file:
Open Cloud shell.
On the Cloud Shell window menu bar click 'Open Terminal' and click 'Open in a New Window'.
In the new Editor window, you have Search option on the left pane, use it to find the file.
To create a basic build config file follow this guide:
https://cloud.google.com/build/docs/configuring-builds/create-basic-configuration
Related
Yesterday I tried to delete folders in the cloud shell editor, being impossible to delete.
This morning I have decided to remove all the files from the main directory:
sudo rm -rf $ HOME
Now I click on the button -> Open workspace and it does nothing.
It also does not receive repositories from GitHub.
Any ideas?.
Thank you.
I understand that you deleted all your files from the home folder and now you are unable to use Cloud Shell, please correct me if this is not your situation.
If this is the case you can try to restart your Cloud Shell by pressing in the three dots on the top right corner and select ´Restart´. If this doesn't help you can also try to boot in Safe Mode.
If your problem is selecting a workspace keep in mind that after you used the command ´sudo rm -rf $ HOME´ you most likely deleted your workspace folder that is usually inside of the home dir. You will have to create a new folder and select it as your new workspace in the ´Open Workspace´ menu
I need to change my default project (deleted the previous one). Can't find documentation for how to do this from either the console or the cli. Seems to be a pretty common requirement but ....
Navigate to the GCP Console via the url https://console.cloud.google.com/ will open the project selected during the last connection. (probably cached on your browser local storage).
For gcloud commands, you can change the default project with :
gcloud config set project PROJECT_ID
or initialize a new environment with:
gcloud init
Also note that you can create multiple configurations and then switch between them easily :
gcloud config configurations create CONFIG_NAME
gcloud config configurations activate CONFIG_NAME
I would like to know if there is a way to rename an existing 'gcloud topic configurations' e.g. I would like rename 'foo' to 'bar' in the below example.
I couldn't find anything on this in the gcloud reference documents.
Technically, it is not possible to change the name of that configuration using the gcloud command.
However, you can change it doing this little workaround:
Use gcloud config configurations activate [YOUR_CONFIG_NAME] to activate the configuration you wish.
Use gcloud info --format='get(config.paths.active_config_path)' to find the directory where your configurations are stored. You will get the path of the file of that specific configuration, looking like this /tmp/tmp.XAfddVDdg/configurations/[YOUR_CONFIG_NAME]
If you cd into the directory /tmp/tmp.XAfddVDdg/configurations/, you will find all your configurations there. Every configuration will be named there like this config_[YOUR_CONFIG_NAME]. Modifying the part that matches the name of your configuration will successfully change its name. DO NOT delete the config_ part of the name.
After this, is you print all the configurations using gcloud config configurations list, you will find your configuration renamed, but none will be active now. Just activate it with gcloud config configurations activate [YOUR_CONFIG_NAME], and you will be good to go.
Don't know when this was added, but there is a remame command for configurations. So no more need to jump through hoops by deleting and recreating configurations or directly editing the file.
gcloud config configurations rename CONFIGURATION_NAME --new-name=NEW_NAME
https://cloud.google.com/sdk/gcloud/reference/config/configurations/rename
Does anyone know how to view the contents of a directory in gcloud.
I ran
gcloud compute ssh --zone=us-west1-b cs231-vm
from powershell and connected to my instance.
I am trying to navigate to like this:
cd cs231n/datasets
according to a tutorial here:
http://cs231n.github.io/assignments2018/assignment1/
But it says no such file or directory and so I want to know what is in the current directory. I tried ls and dir but get nothing.
ls or dir definitely works on gcloud, it seems probably you might have missed few steps of downloading folder/data. Please see if you have completed First time setup from http://cs231n.github.io/gce-tutorial/
You can also 'view gcloud command' by clicking ssh dropdown available at list of vm-instances page. Additionally you can pass --project='project-name' to your gcloud ssh command.
Hi Jenkins and AWS Guru's
I already look online for any possible solutions but not getting a solution for my problem. I just issued an "eb --version" on Jenkins execute shell under a test project but getting "eb: command not found" during the execution.
Wierd thing is if I issue the same command on the Jenkins box via CLI I'm getting a good response from it. Any suggestions for the fix please? thanks in advance
Your Jenkins setup has a different path than the user you logged in with.
There are two solutions:
Add the path to the executable in the PATH environment variable. Use where eb to find the correct path. Then in Jenkins, click on
Manage Jenkins -> Configure System, Global Properties. Check Environment Variables. Set Name to PATH. Set Value to $PATH:/path/to/eb. Then restart Jenkins.
Call the eb command with its fully qualified path.
EDIT: Added steps to update path in Jenkins.
this is now fixed, need to create a properties file that was basically a copy of /var/lib/jenkins/.bash_profile file which would have the correct paths and add that in Jenkins settings. Allowing it to get the required paths. After properties file is created you need to set it on Jenkins-Configure section, Place a check on Prepare jobs environment then set the full path of the properties file (/var/lib/jenkins/environment_variables.properties) on the Properties File Path and restart Jenkins