interscript / interscript-api

API for interscript endpoint
1 stars 1 forks source link

Create release for interscript-api so we can deploy a deterministic version #3

Closed ronaldtse closed 3 years ago

ronaldtse commented 4 years ago

As title. We should manage the API as packages. What is the best way to do this? ping @phuonghuynh @CAMOBAP

phuonghuynh commented 4 years ago

@ronaldtse packages mean Ruby gem ?

We should manage the API as packages.

CAMOBAP commented 4 years ago

@ronaldtse we need something similar as in https://github.com/interscript/interscript/pull/319 , right?

ronaldtse commented 4 years ago

Yes, but not as a ruby gem, it should be integrated with a release (upload): https://github.com/metanorma/mn2pdf/blob/master/.github/workflows/release.yml

Because the zip package should be deployed like this: https://docs.aws.amazon.com/lambda/latest/dg/ruby-package.html

phuonghuynh commented 4 years ago

@ronaldtse Got it, so we should publish to GitHub Package for this lambda api

CAMOBAP commented 4 years ago

@ronaldtse ok to be on the same page, the requirements are:

Please confirm.


Got it, so we should publish to GitHub Package for this lambda api

@phuonghuynh to me it looks like no, AWS have special requirements for ruby package, @ronaldtse could you please confirm

phuonghuynh commented 4 years ago

IMO,

triggered on the release of interscript/interscript

I think we should not trigger this, since the processed should be separated

we preparing zip package according to https://docs.aws.amazon.com/lambda/latest/dg/ruby-package.html requirements

Yes, you can check build script for reference in this repository, https://github.com/interscript/infrastructure/blob/master/lambda/build.tf

upload this package to AWS

No need, since this action belongs to infrastructure project. The infrastructure project will be updated to download ZIP from GitHub Package and do deploy to lambda.

Also, this repository is public, so ppl could use GitHub package for quick deploy their own lambda if they want

Any thoughts, @ronaldtse ?

ronaldtse commented 4 years ago

I think we should not trigger this, since the processed should be separated

I think we can trigger a release but use a derived version. Eg. interscript gem version X.Y will build a release of X.Y.0 of interscript-api.

If interscript-api needs updating, it can do X.Y.Z (eg 1.4.6). This will require interscript-api repo to be tagged as release/v1.4.6.

No need, since this action belongs to infrastructure project. The infrastructure project will be updated to download ZIP from GitHub Package and do deploy to lambda.

Right. No need to upload to AWS.

Also, this repository is public, so ppl could use GitHub package for quick deploy their own lambda if they want

Yes, that’s fine for now since it is an open source project.

Thanks!

ronaldtse commented 3 years ago

@phuonghuynh I've updated INTERSCRIPT_CI_PAT to the new token now.

ronaldtse commented 3 years ago

@phuonghuynh is this completed? If so can you close this? Thanks.

phuonghuynh commented 3 years ago

Yes, it done with manual release workflow. Need to test with auto-release workflow with Gem Interscript.