Skip to content

ksiedlarek/gcp-deployment-validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 

Repository files navigation

Deployment validation workflows

Purpose

This repository holds only GitHub workflows.

It validates GCP deployments triggered from gke-sample-app-deployments repository.

Current validation is simple and can be expanded over time.

Description

There are two ways of triggering pipelines:

  • automatic - if workflow from gke-sample-app-deployments repository finishes successfully, at the very last step payload will be send to this repository.

Current validations

  • run curl on provided IP/app link - check if response code is 200
  • get logs from specific run from gke-sample-app-deployments repository (using GitHub CLI)
  • upload logs from provided workflow run to bucket on GCP platform
  • check if specific workflow run from gke-sample-app-deployments ended successfully (for manual trigger only, using GitHub CLI)

Setup

  1. Fork this repository (or clone and setup on GitHub)

  2. Go to Repository Settings tab -> Secrets, and add:

    • GCP_CREDENTIALS -> base64 encoded json file content (your GCP service account credentials)
    • GH_TOKEN -> on your GitHub account level/organisation level, create access token that can read repository information and trigger workflows - paste it here. This is needed to query logs from other repositories. (if you don't want to do that, you can skip it - comment out section of code in the workflow responsible for log upload)
  3. Navigate to .github/workflows, in triggered-workflow.yml and manual-trigger.yml:

    • change BUCKET_NAME to GCP bucket that exists on your GCP project - here all of the logs will be stored

This repository is only a demo, it does not contain production-ready environment.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published