Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Building on Google cloud from pipeline

Deleted user December 17, 2020

Hi I am trying to run a build from the bitbucket pipeline. 

 

Somehow my syntax isn't accepted and I can't really find in documentation what is going wrong. So just a few questions, is it possible since I am pretty new to bitbucket pipelines, is it possible to launch some shell scripts that are in the repo on a remote server? And is it possible to turn build machines on and off in google cloud engine? 

 

Here is my pipeline:

 

pipelines: - pipe: atlassian/google-app-engine-deploy:0.7.2 - parallel: - step: name: 'gcr.io/cloud-builders/gcloud' variables: KEY_FILE: build-server-project-fbac12490bcc.json  args: ['compute', 'instances', 'start', ' build-server-turnoff-when-unused', '--zone', 'europe-west4-a'] - step: name: 'gcr.io/cloud-builders/gcloud' entrypoint: 'bash' dir: 'Project/build' args: ['/mnt/disks/sdb/Project-dev/build-dev.sh'] - step: #Stop Instance name: 'gcr.io/cloud-builders/gcloud' args: ['compute', 'instances', 'stop', build-server-turnoff-when-unused, '--zone', 'europe-west4-a']

 

1 answer

0 votes
Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 22, 2020

@[deleted] could you please share this in formatted string just as you write in your pipeline , with identation etc.?

I tried to order it, but did not succeed.

Thanks

 

Cheers, Galyna

Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 22, 2020

Regarding your questions:

1) is it possible to launch some shell scripts that are in the repo on a remote server

>> yes, it is possible right now, you pipe ssh-run , if it is that what you want https://bitbucket.org/atlassian/ssh-run/src/master/

2) is it possible to turn build machines on and off in google cloud engine

>> Do you mean google app engine?

Or just gcp instance?

If first - no, this is PAAS, if second - we will think about this ability, but right now having ssh to it, you can try with our existing pipes.

 

Regards, Galyna

Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 22, 2020

Or you can directly use gcloud tool, and simply follow docs https://cloud.google.com/compute/docs/instances/stop-start-instance#gcloud

I guess, this is much cleaner way to properly start-stop instance

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events