Skip to content

noahgift/gcp-from-zero

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Python application test with Github Actions

gcp-from-zero

This is a new repo

First thing to do is DevOps Workflow

  • Get SSH-Keys setup in a Cloud Environment

ssh-keygen -t rsa

Give github this content: cat /home/ec2-user/.ssh/id_rsa.pub

Then checkout the code.

  • Python Scaffold
  1. Create virtualenv

virtualenv ~/.gcp-from-zero

  1. Source it

source ~/.gcp-from-zero/bin/activate

  • Setup Continuous Integration

To integrate Cloud Build instead of Github Actions

Example here: cloudbuild.yaml

steps:
- name: python:3.7
  id: INSTALL
  entrypoint: python3
  args:
  - '-m'
  - 'pip'
  - 'install'
  - '-t'
  - '.'
  - '-r'
  - 'requirements.txt'
- name: python:3.7
  entrypoint: ./pylint_runner
  id: LINT
  waitFor:
  - INSTALL
- name: "gcr.io/cloud-builders/gcloud"
  args: ["app", "deploy"]
timeout: "1600s"
images: ['gcr.io/$PROJECT_ID/pylint']

About

This is a new repo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published