feature/resync #6
@ -63,8 +63,7 @@ following:
|
|||||||
.. other configuration ..
|
.. other configuration ..
|
||||||
location /hydra/ {
|
location /hydra/ {
|
||||||
|
|
||||||
proxy_pass http://127.0.0.1:3000;
|
proxy_pass http://127.0.0.1:3000/;
|
||||||
proxy_redirect http://127.0.0.1:3000 https://example.com/hydra;
|
|
||||||
|
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
@ -74,6 +73,9 @@ following:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Note the trailing slash on the `proxy_pass` directive, which causes nginx to
|
||||||
|
strip off the `/hydra/` part of the URL before passing it to hydra.
|
||||||
|
|
||||||
Populating a Cache
|
Populating a Cache
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
22
flake.lock
generated
22
flake.lock
generated
@ -3,16 +3,16 @@
|
|||||||
"nix": {
|
"nix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1745420957,
|
"lastModified": 1748154947,
|
||||||
"narHash": "sha256-ZbB3IH9OlJvo14GlQZbYHzJojf/HCDT38GzYTod8DaU=",
|
"narHash": "sha256-rCpANMHFIlafta6J/G0ILRd+WNSnzv/lzi40Y8f1AR8=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nix",
|
"repo": "nix",
|
||||||
"rev": "70921714cb3b5e6041b7413459541838651079f3",
|
"rev": "d761dad79c79af17aa476a29749bd9d69747548f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "2.28-maintenance",
|
"ref": "2.29-maintenance",
|
||||||
"repo": "nix",
|
"repo": "nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -20,11 +20,11 @@
|
|||||||
"nix-eval-jobs": {
|
"nix-eval-jobs": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744370057,
|
"lastModified": 1748211873,
|
||||||
"narHash": "sha256-n220U5pjzCtTtOJtbga4Xr/PyllowKw9anSevgCqJEw=",
|
"narHash": "sha256-AJ22q6yWc1hPkqssXMxQqD6QUeJ6hbx52xWHhKsmuP0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-eval-jobs",
|
"repo": "nix-eval-jobs",
|
||||||
"rev": "1260c6599d22dfd8c25fea6893c3d031996b20e1",
|
"rev": "d9262e535e35454daebcebd434bdb9c1486bb998",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -35,16 +35,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1745408698,
|
"lastModified": 1748124805,
|
||||||
"narHash": "sha256-JT1wMjLIypWJA0N2V27WpUw8feDmTok4Dwkb0oYXDS4=",
|
"narHash": "sha256-8A7HjmnvCpDjmETrZY1QwzKunR63LiP7lHu1eA5q6JI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "eea3403f7ca9f9942098f4f2756adab4ec924b2b",
|
"rev": "db1aed32009f408e4048c1dd0beaf714dd34ed93",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-24.11-small",
|
"ref": "nixos-25.05-small",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
description = "A Nix-based continuous build system";
|
description = "A Nix-based continuous build system";
|
||||||
|
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11-small";
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05-small";
|
||||||
|
|
||||||
inputs.nix = {
|
inputs.nix = {
|
||||||
url = "github:NixOS/nix/2.28-maintenance";
|
url = "github:NixOS/nix/2.29-maintenance";
|
||||||
# We want to control the deps precisely
|
# We want to control the deps precisely
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
@ -228,8 +228,8 @@ in
|
|||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
trusted-users = [ "hydra-queue-runner" ];
|
trusted-users = [ "hydra-queue-runner" ];
|
||||||
gc-keep-outputs = true;
|
keep-outputs = true;
|
||||||
gc-keep-derivations = true;
|
keep-derivations = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.hydra-dev.extraConfig =
|
services.hydra-dev.extraConfig =
|
||||||
|
@ -50,7 +50,7 @@ static std::unique_ptr<SSHMaster::Connection> openConnection(
|
|||||||
auto remoteStore = machine->storeUri.params.find("remote-store");
|
auto remoteStore = machine->storeUri.params.find("remote-store");
|
||||||
if (remoteStore != machine->storeUri.params.end()) {
|
if (remoteStore != machine->storeUri.params.end()) {
|
||||||
command.push_back("--store");
|
command.push_back("--store");
|
||||||
command.push_back(shellEscape(remoteStore->second));
|
command.push_back(escapeShellArgAlways(remoteStore->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include <nix/util/signals.hh>
|
#include <nix/util/signals.hh>
|
||||||
#include "state.hh"
|
#include "state.hh"
|
||||||
#include "hydra-build-result.hh"
|
#include "hydra-build-result.hh"
|
||||||
#include <nix/store/store-api.hh>
|
#include <nix/store/store-open.hh>
|
||||||
#include <nix/store/remote-store.hh>
|
#include <nix/store/remote-store.hh>
|
||||||
|
|
||||||
#include <nix/store/globals.hh>
|
#include <nix/store/globals.hh>
|
||||||
@ -832,7 +832,7 @@ void State::run(BuildID buildOne)
|
|||||||
<< metricsAddr << "/metrics (port " << exposerPort << ")"
|
<< metricsAddr << "/metrics (port " << exposerPort << ")"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
Store::Params localParams;
|
Store::Config::Params localParams;
|
||||||
localParams["max-connections"] = "16";
|
localParams["max-connections"] = "16";
|
||||||
localParams["max-connection-age"] = "600";
|
localParams["max-connection-age"] = "600";
|
||||||
localStore = openStore(getEnv("NIX_REMOTE").value_or(""), localParams);
|
localStore = openStore(getEnv("NIX_REMOTE").value_or(""), localParams);
|
||||||
|
@ -492,8 +492,14 @@ Step::ptr State::createStep(ref<Store> destStore,
|
|||||||
runnable while step->created == false. */
|
runnable while step->created == false. */
|
||||||
step->drv = std::make_unique<Derivation>(localStore->readDerivation(drvPath));
|
step->drv = std::make_unique<Derivation>(localStore->readDerivation(drvPath));
|
||||||
{
|
{
|
||||||
auto parsedDrv = ParsedDerivation{drvPath, *step->drv};
|
auto parsedOpt = StructuredAttrs::tryParse(step->drv->env);
|
||||||
step->drvOptions = std::make_unique<DerivationOptions>(DerivationOptions::fromParsedDerivation(parsedDrv));
|
try {
|
||||||
|
step->drvOptions = std::make_unique<DerivationOptions>(
|
||||||
|
DerivationOptions::fromStructuredAttrs(step->drv->env, parsedOpt ? &*parsedOpt : nullptr));
|
||||||
|
} catch (Error & e) {
|
||||||
|
e.addTrace({}, "while parsing derivation '%s'", localStore->printStorePath(drvPath));
|
||||||
|
throw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
step->preferLocalBuild = step->drvOptions->willBuildLocally(*localStore, *step->drv);
|
step->preferLocalBuild = step->drvOptions->willBuildLocally(*localStore, *step->drv);
|
||||||
|
@ -172,7 +172,7 @@ struct Step
|
|||||||
nix::StorePath drvPath;
|
nix::StorePath drvPath;
|
||||||
std::unique_ptr<nix::Derivation> drv;
|
std::unique_ptr<nix::Derivation> drv;
|
||||||
std::unique_ptr<nix::DerivationOptions> drvOptions;
|
std::unique_ptr<nix::DerivationOptions> drvOptions;
|
||||||
std::set<std::string> requiredSystemFeatures;
|
nix::StringSet requiredSystemFeatures;
|
||||||
bool preferLocalBuild;
|
bool preferLocalBuild;
|
||||||
bool isDeterministic;
|
bool isDeterministic;
|
||||||
std::string systemType; // concatenation of drv.platform and requiredSystemFeatures
|
std::string systemType; // concatenation of drv.platform and requiredSystemFeatures
|
||||||
|
Loading…
x
Reference in New Issue
Block a user