Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

251 Commits

Repository files navigation

Flexbase github resources


Workflows

deploy.gcr

Usage

jobs:
deploy-service:
uses: flexbase-eng/.github/.github/workflows/deploy.gcr.yml@main
with:
service_name: 'id-poc'
project_id: 'flexbase-api-development'

Inputs

InputTypeDefaultRequired
service_namestringfalsetrue
project_idstringfalsetrue

Steps

  1. Authenticate with appropriate workload identity provider and service impersonation token auth dance
  2. set up cloud sdk
  3. push container to google cloud registry with github sha as tag
  4. deploy the registered container to the appropriate project namespace

Workflows

openapi.client.generator

Usage

jobs:
generate-typescript-sdk:
uses: flexbase-eng/.github/.github/workflows/openapi.client.generator.yml@main
with:
swagger_url: 'https://petstore3.swagger.io/api/v3/openapi.json'

Inputs

InputTypeDefaultRequired
swagger_urlstringhttps://petstore3.swagger.io/api/v3/openapi.jsontrue
client_typestringtypescript-axiosfalse
additional_optionsstringsupportsES6=true,withNodeImports=true,withInterfaces=truefalse

Steps

  1. Set up generator tool
  2. generate client base sdk utilizing the openapi hosted json file

typescript.build

Builds typescript using yarn

Usage

jobs:
build:
uses: flexbase-eng/.github/.github/workflows/typescript.build.yml@main
with:
package_folder: output
revision: ${{github.run_number}}

Inputs

InputTypeDefaultRequired
package_folderstringno
use_packrbooleanfalseno
major_version1integerno
minor_version1integerno
revision1integerno

Steps

  1. Yarn install
  2. Yarn build
  3. Yarn lint
  4. Yarn test
  5. Packr (use_packr but be set to true)
  6. Store build artifacts
  7. Store coverage artifacts

typescript.sonarcloud

Pushes coverage to sonarcloud

Usage

 coverage:
needs: build
uses: flexbase-eng/.github/.github/workflows/typescript.sonarcloud.yml@main
with:
project_key: flexbase-eng_<repo-name>
secrets: inherit

Inputs

InputTypeDefaultRequired
project_keystring*

Steps

  1. Retreive coverage artifacts
  2. Run sonarcloud

typescript.publish.npm

Pushes node package to npm under the @flexbase scope and organization. Takes the package.json value and utilizes this with the standard npm publish methodology. Optional beta tag as seen below for PR based publishes, to publish a beta version before main branch publish. This is useful if you'd like to test your changes within the package before making a formal release with merge to main.

Usage

publishing a beta on PR with the npm package management system:

 publish:
needs: coverage
uses: flexbase-eng/.github/.github/workflows/typescript.publish.yml@main
with:
tag: beta
package_manager: npm
secrets: inherit

publishing to production with the yarn package management system:

 publish:
needs: coverage
uses: flexbase-eng/.github/.github/workflows/typescript.publish.yml@main
secrets: inherit

Inputs

InputTypeDefaultRequired
tagstringlatestno
build_artifactstringlatestno
package_managerstringyarnno
package_visibilitystringpublicno

Steps

  1. Retreive build artifacts
  2. Setup yarn
  3. Publish to npm

release.notifier

Workflow to utilize a common pattern for release notifications when publishing a release via github. Notifier aggregates the release notes and pushes this to a release channel. gha_deployment_failure_url defines the URL you would like to set for log review of the production deployment failure.

Usage

Entire workflow for reference to add to indidivual repository.

 name: Notify Slack Release Channel
on:
release:
types: [released]
workflow_dispatch:
prod-notify:
needs: <production deploy worfklow name>
uses: flexbase-eng/.github/.github/workflows/release.notifier.yml@main
with:
gha_deployment_failure_url: https://github.com/flexbase-eng/flexbase-web/actions/workflows/deploy-prod.yml
production_url: https://www.flexbase.app
release_title: Flexbase Web
secrets: inherit

or minimally:

 name: Notify Slack Release Channel
on:
release:
types: [released]
workflow_dispatch:
prod-notify:
needs: <production deploy worfklow name>
uses: flexbase-eng/.github/.github/workflows/release.notifier.yml@main
with:
gha_deployment_failure_url: https://github.com/flexbase-eng/flexbase-web/actions/workflows/deploy-prod.yml
secrets: inherit

Inputs

InputTypeDefaultRequired
gha_deployment_failure_urlstringnoneyes
production_urlstringhttps://www.flexbase.appno
release_titlestringrepository.nameno

Steps

Assumptions: production deployment triggered based on published release notes. Deployment has completed (either succeeded or failed).

  1. Get the repositories latest published release
  2. if success, post slack notification to release channel
  3. if failure, post slack notificaiton to release channel with the gha_deployment_failure_url to help developers identify root cause.

release.drafter

Drafts merged PR's into a github release draft format, aggregating labels to various sections.

Usage

Entire worfklow for reference to add to individual repository.

 name: Release draft workflow
on:
push:
branches:
- main
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
update_release_draft:
uses: flexbase-eng/.github/.github/workflows/release.drafter.yml@main
secrets: inherit

Inputs

InputTypeDefaultRequired

Steps

  1. on merge to main, updates Release draft

References


run.postman.api.tests

Runs Postman API tests and outputs junit and html reports.

Usage

Entire worfklow for reference to add to individual repository.

name: Run Postman API Tests Workflow
on:
push:
branches: 'main'
jobs:
run-postman-api-tests:
uses: flexbase-eng/.github/.github/workflows/postman.api.test.yml@main
with:
postman_collection_directory: <your postman collection directory goes here>
postman_environment_directory: <your post man environment directory goes here>

Inputs

InputTypeDefaultRequired
postman_collection_directorystringnoneyes
postman_environment_directorystringnoneyes

Steps

  1. Determine the directory for Postman collection where API tests are located
  2. Determine the directory for Postman environment file needed to run the tests

Footnotes

  1. Packr must be used for version support 23

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

12 watching

Forks

Releases

Packages

Used by

Contributors