Skip to content

CI/CD to build and sanity check docker container and release executables #231

@CMCDragonkai

Description

@CMCDragonkai

The final built executables coming out of vercel/pkg are not tested when uploaded as pre-release executables.

We should run a final test on those, maybe a simplified test that runs just the --version or --help page to ensure that the executable actually runs on the target environment. This can help us know whether the final packaged executables are actually working mostly.

This requires our CI/CD to expand to include all environments:

We have these stages:

  stages:
    - check
    - build
    - release

This might work as an extra stage: qa to mean "quality assurance". And it needs to use raw environments (not based on our Nix image that we use to build things).

Tasks

  1. - Investigate adding an extra stage qa that enables Linux, Windows, and Mac environment runners, that means this stage runs on an entirely different runner compared to check, build and release.
  2. - Download the executables from the release point. This tests whether our release point is up and running. If the release point is down, the test should retry after some time, as this depends on network availability.
  3. - Run a sanity check over the executables such as --help and --version to get the help page and the version page respectively.
  4. - Ensure that this job is interruptible.

Regarding docker:

  1. - Create the docker image with nix-build ./release.nix -A docker
    • test that this container works with docker run -it name-version:hash.
    • example: docker run -it matrixai_typescript-demo-lib-1.0.0:f3wf1wxvkdbbmrhxx9rhr5qw2skbrah6
    • see TypeScript-Demo-Live README.md for more details
    • the TMPDIR may be used by PK, if so, use this https://gist.github.com/CMCDragonkai/94e6550302aa7ebc175c06819927605a
    • inspect the image contents for correctness by using this https://gist.github.com/CMCDragonkai/d7a652ada27289ab59e28bc914c942f6
    • do we need a cacert and tzdata?
      • cacert may be needed in case we want to contact external websites, but this is not a thing for the PK agents hosted on testnet.polykey.io
      • tzdata shouldn't be necessary since we don't operate on any timezones, we assume OS time is UTC time

Metadata

Metadata

Assignees

Labels

epicBig issue with multiple subissuesprocedureAction that must be executed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions