Code update to set the default project and comment out steps 2 and 3.
Co-authored-by: jmhbnz <mail@jamesblair.net>
This commit is contained in:
		
							
								
								
									
										8
									
								
								.github/workflows/blank.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/blank.yml
									
									
									
									
										vendored
									
									
								
							@ -27,11 +27,11 @@ jobs:
 | 
			
		||||
      - name: Install utilities
 | 
			
		||||
        run: ./1-install-utilities.sh
 | 
			
		||||
 | 
			
		||||
      - name: Configuregcp project
 | 
			
		||||
        run: ./2-configure-gcp-project.sh
 | 
			
		||||
      #- name: Configuregcp project
 | 
			
		||||
      # run: ./2-configure-gcp-project.sh
 | 
			
		||||
 | 
			
		||||
      - name: Create github secrets
 | 
			
		||||
        run: ./3-create-github-secrets.sh
 | 
			
		||||
      #- name: Create github secrets
 | 
			
		||||
      # run: ./3-create-github-secrets.sh
 | 
			
		||||
 | 
			
		||||
      - name: Login
 | 
			
		||||
        uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
 | 
			
		||||
 | 
			
		||||
@ -10,7 +10,7 @@
 | 
			
		||||
# #+NAME: Create a new google cloud project
 | 
			
		||||
 | 
			
		||||
# Create a project id based on date
 | 
			
		||||
export gcp_project_id="gitlab-gcp-ci-cd"
 | 
			
		||||
export gcp_project_id="gitlab-gcp-ci"
 | 
			
		||||
 | 
			
		||||
# Create new project using a random project id
 | 
			
		||||
gcloud projects create $gcp_project_id
 | 
			
		||||
 | 
			
		||||
@ -6,6 +6,9 @@
 | 
			
		||||
# Tangle the shell block below to a shell script by pressing *, b t* in emacs command mode:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Set default project
 | 
			
		||||
gcloud config set project "gitlab-gcp-ci"
 | 
			
		||||
 | 
			
		||||
# Ensure compute engine apis are enabled in the project
 | 
			
		||||
gcloud services enable compute.googleapis.com
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -69,7 +69,7 @@ Tangle the shell block below to a shell script by pressing *, b t* in emacs comm
 | 
			
		||||
#+NAME: Create a new google cloud project
 | 
			
		||||
#+begin_src bash :shebang #!/bin/bash :tangle 2-configure-gcp-project.sh
 | 
			
		||||
# Create a project id based on date
 | 
			
		||||
export gcp_project_id="gitlab-gcp-ci-cd"
 | 
			
		||||
export gcp_project_id="gitlab-gcp-ci"
 | 
			
		||||
 | 
			
		||||
# Create new project using a random project id
 | 
			
		||||
gcloud projects create $gcp_project_id
 | 
			
		||||
@ -120,6 +120,9 @@ Once we have a project we can create a new virtual machine. To create a virtual
 | 
			
		||||
Tangle the shell block below to a shell script by pressing *, b t* in emacs command mode:
 | 
			
		||||
 | 
			
		||||
#+begin_src bash :shebang #!/bin/bash :tangle 4-create-virtual-machine.sh
 | 
			
		||||
# Set default project
 | 
			
		||||
gcloud config set project "gitlab-gcp-ci"
 | 
			
		||||
 | 
			
		||||
# Ensure compute engine apis are enabled in the project
 | 
			
		||||
gcloud services enable compute.googleapis.com
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user