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

nixos/buildkite: add option to configure user, add nix-required packages to runtime, add test #78045

Merged
merged 5 commits into from Jan 20, 2020

Conversation

flokli
Copy link
Contributor

@flokli flokli commented Jan 19, 2020

Motivation for this change
commit 933ca9d8216447a82b3bfa60852341cef31b7ce0
Author: Florian Klink <flokli@flokli.de>
Date:   Mon Jan 20 10:28:47 2020 +0100

    nixos/buildkite: make privateSshKeyPath optional
    
    When only cloning public repos, or when the ssh key is provided by
    different means, we don't need to manage it here.

commit a208e6eb994b997542528371ffa483c7deda98fe
Author: Florian Klink <flokli@flokli.de>
Date:   Sun Jan 19 21:50:52 2020 +0100

    nixosTests.buildkite: add test

commit 70308a7daf3e1d555de42f7bb557caa4fdd8b542
Author: Florian Klink <flokli@flokli.de>
Date:   Sun Jan 19 21:49:19 2020 +0100

    nixos/buildkite-agent: add gnutar, gzip and git to runtimePackages
    
    These are required for nix to do builtins.fetchTarball and
    builtins.fetchGit, so most likely we want them to be around.

commit 7838f0082491e1835221419b3adba0467a4446ce
Author: Florian Klink <flokli@flokli.de>
Date:   Sun Jan 19 21:48:59 2020 +0100

    nixos/buildkite: stop using deprecated option

commit 8c6b1c3eaaa8b555bddaced3ab6f02695bef1541
Author: Florian Klink <flokli@flokli.de>
Date:   Sun Jan 19 21:19:35 2020 +0100

    nixos/buildkite-agent: add "user" option
    
    This allows buildkite-agent to run as another user.
    
    It'll still run builds from /var/lib/buildkite-agent and setup things in
    there.
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This allows buildkite-agent to run as another user.

It'll still run builds from /var/lib/buildkite-agent and setup things in
there.
These are required for nix to do builtins.fetchTarball and
builtins.fetchGit, so most likely we want them to be around.
@flokli flokli force-pushed the buildkite-agent-user-runtime-test branch from 3c7d5c3 to 933ca9d Compare January 20, 2020 09:35
When only cloning public repos, or when the ssh key is provided by
different means, we don't need to manage it here.
@flokli flokli force-pushed the buildkite-agent-user-runtime-test branch from 933ca9d to 4b73d3c Compare January 20, 2020 10:11
@mrkkrp
Copy link
Member

mrkkrp commented Jan 20, 2020

I tested it, seems to work fine.

@zimbatm zimbatm merged commit e20de6b into NixOS:master Jan 20, 2020
@flokli flokli deleted the buildkite-agent-user-runtime-test branch January 20, 2020 13:53
@flokli
Copy link
Contributor Author

flokli commented Jan 20, 2020

🎉

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

Successfully merging this pull request may close these issues.

None yet

3 participants