Commit Graph

12 Commits

Author SHA1 Message Date
Daniel Harvey
8b34768c27 Revert "More general nix build" (#1273)
Reverts hasura/v3-engine#1265

Tried this for a bit and it seems to have made our cache usage worse, so
let's not.

V3_GIT_ORIGIN_REV_ID: cb1e33d568da49a9af80591ec1db111fb62bf6ca
2024-10-25 11:14:35 +00:00
Daniel Harvey
cff4920552 More general nix build (#1265)
<!-- The PR description should answer 2 important questions: -->

### What

This was building more often than I'd expected - looking at the crane
docs we'll get more cache sharing if we build all the deps.

https://crane.dev/examples/quick-start.html?highlight=cargoArtifacts#

V3_GIT_ORIGIN_REV_ID: b6e29d8daa8b77b76324819607f0c50c1a00df70
2024-10-23 15:29:13 +00:00
Daniel Harvey
eabc3966db Make sleep available in Docker images (#1026)
<!-- The PR description should answer 2 important questions: -->

### What

Add `coreutils` to Docker images.

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: a614c47758b726729208428890586d5aabac0797
2024-08-28 12:14:08 +00:00
Anon Ray
16d2d5223f nix/ci: checking if adding bash/sh helps with multitenant docker (#1022)
<!-- The PR description should answer 2 important questions: -->

### What

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

<!-- Does this PR introduce new validation that might break old builds?
-->

<!-- Consider: do we need to put new checks behind a flag? -->

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: c09d42519cdd4946527e72a8066d7aa60a75a4cf
2024-08-28 09:43:13 +00:00
Samir Talwar
288c973ac7 Build Cloud services with Nix. (#1019)
Changes to the Nix build to support Hasura cloud services.

V3_GIT_ORIGIN_REV_ID: 39fc7e0a005c30ed6ecbfed8dbcd0cd3839aafbd
2024-08-27 09:25:16 +00:00
Samir Talwar
ef31a4ca84 Abstract over the binaries in flake.nix. (#1012)
### What

Use powerful constructs such as loops to avoid duplication in
`flake.nix`.

We are able to iterate over the list of binaries and list of target
systems and produce a list of packages from there.

### How

We generate a `targets` tree (see the `flake.nix` file comments for
details), and then generate the list of packages from there.

When using `nix run`, you'll get a package, which is usually what you
want.

The scripts that build Docker images run `nix build
'.#targets.x86_64-linux.<binary>.<arch>.docker`, which is verbose but
explicit.

V3_GIT_ORIGIN_REV_ID: 2a13fb31a41829f9804dfdb7c1a51a9e54e0922e
2024-08-26 09:50:15 +00:00
Daniel Harvey
a47327a9bf Add cacert to docker image (#782)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

Allow engine to connect to NDCs via HTTPS.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

Add `cacert` to Docker image using Nix.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: 52458920236f3868cc8daf18e140f8536d9bc674
2024-06-28 10:06:18 +00:00
Samir Talwar
52f82d52c1 Use "dev" as the version in development for Nix builds. (#665)
This means we can use the cache far more often.

Pull requests will also use "dev" so as to avoid rebuilding
unnecessarily. Only builds on the `main` branch and tags will set a
version (using the short Git commit hash).

V3_GIT_ORIGIN_REV_ID: 37acaec3d369eef6df6487f9612f6d2da3e3ba5a
2024-06-05 08:20:49 +00:00
Daniel Harvey
7dfb9d1a1f Build dev-auth-webhook Docker image with Nix (#544)
<!-- Thank you for submitting this PR! :) -->

## Description

We'd like to speed up creation of all these Docker images, so this adds
`dev-auth-webhook` to the Nix flake. Functional no-op.

---------

Co-authored-by: Samir Talwar <samir.talwar@hasura.io>
V3_GIT_ORIGIN_REV_ID: 384eb467b2fe7fba1644f5b4cc6224cdc043ce01
2024-05-02 14:23:28 +00:00
Daniel Harvey
4ea88180d7 create Docker images with Nix (#507)
<!-- Thank you for submitting this PR! :) -->

## Description

In order to test things quicker, we'd like to be able to build custom
connector and friends in Nix, and then use the containers when running
tests. First step here is to be able to build Docker containers in Nix,
and add a CI job to ensure it still works.

Then we'll move onto publishing and using these images.

No-op build times:

<img width="336" alt="Screenshot 2024-04-25 at 15 53 56"
src="https://github.com/hasura/v3-engine/assets/4729125/47cbc0c5-6e54-4583-aa01-0528d4a21080">

Functional no-op.

V3_GIT_ORIGIN_REV_ID: 8f9d609e26cdd3b0801e61fd361c241ad504dcdf
2024-04-26 08:44:04 +00:00
Samir Talwar
078b0d3487 Get the Nix build working. (#335)
V3_GIT_ORIGIN_REV_ID: e70e2a42b2445b4bcf4e9ee7db771b475c32d2f9
2024-03-06 17:51:17 +00:00
Daniel Harvey
353b0d1ca6 basic Nix flake for deps (#333)
Co-authored-by: Samir Talwar <samir.talwar@hasura.io>
V3_GIT_ORIGIN_REV_ID: 013207c169f31db363b7cfb072570c5b8246ba60
2024-03-06 11:39:19 +00:00