nginxinc / nginx-s3-gateway

NGINX S3 Caching Gateway
Apache License 2.0
496 stars 126 forks source link

Build multi-architecture images #197

Closed 4141done closed 8 months ago

4141done commented 8 months ago

What

Allows us to push multi-architecture builds for linux/amd64 and linux/arm64 on merge to master. Fixes: https://github.com/nginxinc/nginx-s3-gateway/issues/196

The flow looks like this:

                                   ┌──────────────────┐        ┌────────────────┐      ┌────────────────┐
    ┌─────────┐     ┌─────────┬────► Build Latest NJS ├────────►Test Latest NJS ├─────►│Push Latest NJS │
    │Build OSS├────►│Test OSS │    └──────────────────┘        └────────────────┘      └────────────────┘
    └─────────┘     └──┬──────┤
                       │      │    ┌──────────────────┐       ┌──────────────────┐     ┌─────────────────┐
                       │      └────►Build Unprivileged├───────►Test Unprivileged ├────►│Push Unprivileged│
                       │           └──────────────────┘       └──────────────────┘     ├────────┬────────┘
                       │                                                               ├────────┤
                       └──────────────────────────────────────────────────────────────►│Push OSS│
                                                                                       └────────┘

Tests are performed by building the relevant image and tagging it with the image name the tests expect. This follows the original implementation in test.sh. This will likely change to an explicit image name specification as we move the test suite in to Javascript but it's being maintained for now in the interest of simplicity.

Goals

Notes