reg-publish-gcsapp-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

reg-publish-gcsapp-plugin

reg-suit plugin to fetch and publish snapshot images to Google Cloud Storage. This plugin is same as aws s3 version reg-publish-s3app-plugin. This plugin provides the facility to approve or reject changes in comparison reports in Google Cloud Storage. By using this plugin you can do the below tasks.

  1. Approve the changed image and make new image as expected image.
  2. Reject the changed image and make the previous image as expected image.
  3. Add the new image as expected image.
  4. Ignore the new image from reg-suit report.
  5. Recover the deleted image.
  6. Delete the image permanently that is deleted by reg-suit.

Install

npm i reg-publish-gcsapp-plugin -D
reg-suit prepare -p publish-gcsapp

Authorizing GCP

This plugin to be authorized using GCP's Application Default Credentials.

If you run this plugin in your CI service, it to be recommended to create an Service Account. Visit https://cloud.google.com/iam/docs/creating-managing-service-accounts to see more details.

Configure

{
  bucketName: string;
  pathPrefix?: string;
}

Using google cloud service account to manage the reg-suit report.

Set the isGCPServiceAccountActiveNonSecure:true in regconfig file. This is not recommended because It will expose google cloud service account config json file to public. Use this in case your google cloud storage is not public.

{
  bucketName: string;
  pathPrefix?: string;
  isGCPServiceAccountActiveNonSecure?: boolean
}
  • bucketName - Required - GCS bucket name to publish the snapshot images to.
  • pathPrefix - Optional - Specify paths. For example if you set some_dir, the report is published with URL such as https://storage.googleapis.com/your-bucket/some_dir/xxxxxxxxxindex.html.

Accept / Reject changes in reg-suit report on google cloud.

To work with reg-suit report in google cloud, you need to activate the app with google api key and OAuth 2.0 client id. To activate the app please follow the below steps.

  1. Go to google cloud platform and create google api key and OAuth 2.0 client id. https://console.cloud.google.com/apis/credentials
  2. Now open reg-suit report on google cloud. Click on "Authentication" button on top right corner of the app.
  3. Enter google api key and OAuth 2.0 client id
  4. Click on "Activate app" button
  5. It will than open a popup to sign in with your google account.
  6. Sign in into your google account and provide basic access requeted by app to your google account.

Package Sidebar

Install

npm i reg-publish-gcsapp-plugin

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

659 kB

Total Files

14

Last publish

Collaborators

  • azohra-core