Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Adding support for docker property in project.yml #90

Closed
wants to merge 16 commits into from

Conversation

jthomas
Copy link
Contributor

@jthomas jthomas commented Apr 6, 2021

Here is an example of what this would look like:

packages:
  - name: default
    actions:
      - name: hello
        main: 'main'
        docker: 'myregistry/actionloop-python-v3.7ai'

The code changes were very simple but I've taken the chance to setup unit testing for the deployer code and add this into the build pipeline. Going forward - we'll want to keep adding unit tests for new features.

This is a WIP as the OpenWhisk type for "Exec" is missing the main property. I'm going to fix that upstream so we can merge this. The tests currently have to use a temporary // @ts-ignore to build and run locally.

In terms of testing - I have run the unit tests for this new feature, run the deployer tests and deployed a sample project using the YAML definition above. All works so far.

Set up bats test framework to run shell-script based tests.
Started ported internal tests to public repo.
Re-wrote tests to ensure no side-effects.
Fixing small errors when running all tests together.
Having a single repos means if the deploy stage fails one runtime -
it breaks all the other tests. This is not ideal.
- Add empty dir to incremental test
- Use templated diff for directory
- Remove unnecessary package.json info
Calculate correct 'kind' value when docker property is present.
Added unit tests for this new feature and set up the testing pipeline.

project.yml now supports the following:
```yaml
packages:
  - name: default
    actions:
      - name: hello
        main: 'main'
        docker: 'us.gcr.io/nimgcp/actionloop-python-v3.7ai'
```
@jthomas
Copy link
Contributor Author

jthomas commented Apr 6, 2021

@jthomas
Copy link
Contributor Author

jthomas commented May 25, 2021

We've now got a new version of the OpenWhisk Client JS available which unblocks this PR BUT the deployer code is now in a separate repo: https://github.com/nimbella/nimbella-deployer.

I'll need to move these changes over there....

jthomas added a commit to nimbella/nimbella-deployer that referenced this pull request Jun 7, 2021
@jthomas
Copy link
Contributor Author

jthomas commented Jun 7, 2021

This has now been done in nimbella/nimbella-deployer@fb9c21f

@jthomas jthomas closed this Jun 7, 2021
@rabbah
Copy link
Contributor

rabbah commented Jun 7, 2021

oh nice 🎉 - might need an example in the docs? i'm not sure how to use it.

@jthomas
Copy link
Contributor Author

jthomas commented Jun 8, 2021

nimbella/docs#58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants