Commit graph

197 commits

Author SHA1 Message Date
Eelco Dolstra
7ec2d94303
flake.lock: Update
Flake input changes:

* Updated 'nix': 'github:NixOS/nix/73769b28e376cf1fb3e7248bafaa17c35527925d' -> 'github:NixOS/nix/3aaceeb7e2d3fb8a07a1aa5a21df1dca6bbaa0ef'
* Updated 'nix/nixpkgs': 'github:edolstra/nixpkgs/43e283790fbe330b723ac44b584824cf6d85c1ee' -> 'github:NixOS/nixpkgs/b88ff468e9850410070d4e0ccd68c7011f15b2be'
* Updated 'nixpkgs': 'github:edolstra/nixpkgs/54a27fb2fc5fbd8927f9f6dc77fe1de1faa05266' -> 'github:NixOS/nixpkgs/29eddfc36d720dcc4822581175217543b387b1e8'
2020-04-09 17:27:41 +02:00
Eelco Dolstra
73cf003ecc Fix dependency on nixos-channel-native-programs 2020-03-26 08:24:46 +01:00
3cd3da04a1 mirror: Add content-type and content-encoding for .json.br 2020-03-25 15:40:00 -04:00
7d46561471 mirror: Add redirects for json data files 2020-03-25 14:20:05 -04:00
51104d8cde mirror: Use shell-free calls when possible
Passing a list of parameters to `system` automatically gives us peace of
mind with regards to shell escaping. This is because it will not rely on
a shell invocation to run the given parameters, but directly exec to it.

The left-over shell invocations all use redirection.
2020-03-24 22:29:10 -04:00
0568ef3c4a mirror: Download packages.json.br and options.json.br 2020-03-24 22:24:29 -04:00
badde7c674 mirror: allow downloadFile to select a specific product 2020-03-24 22:24:11 -04:00
13154f8e86 mirror: Convert all system use to run* 2020-03-24 20:05:59 -04:00
877e989376 mirror: Cosmetic change to the release info output 2020-03-24 19:59:57 -04:00
84c6a24dac mirror: Add dry-run mode to better test script 2020-03-24 19:59:50 -04:00
f5d04ea038 mirror: Use experimental "nix-command" feature. 2020-03-24 19:59:45 -04:00
ab952e5863 mirror: Introduce two functions for running commands
They are thin wrappers over `system`, but two main points:

 * They log the (unescaped) command.
 * `run` will auto-die.

This removes the need to pepper `== 0 or die` in the script.
2020-03-24 19:59:39 -04:00
f4d04077c6 Split native programs build from the main build for shell use
This way, we can fully run the mirror script in dry-run mode.
2020-03-24 19:59:30 -04:00
55d80937ca Add flake-compat default.nix/shell.nix
Let's keep this repository as accessible to contributors as possible!
2020-03-24 19:59:10 -04:00
9d6f0ceb77 Add .gitignore for result 2020-03-24 19:58:47 -04:00
Eelco Dolstra
10188a5679
Fix OVA redirects 2020-03-20 09:52:04 +01:00
Eelco Dolstra
6ba4a48263 Quick hack to fix status.nixos.org 2020-03-17 13:21:57 +01:00
Eelco Dolstra
faa521b194 Fix redirects 2020-03-10 15:22:54 +01:00
Eelco Dolstra
a55fc2149d Merge branch 'redirect-more' of https://github.com/garbas/nixos-channel-scripts 2020-03-10 13:50:04 +01:00
Rok Garbas
4d53dba964
wrong content 2020-03-10 12:52:59 +01:00
Rok Garbas
15ff4aff86
added error handling 2020-03-10 12:52:09 +01:00
Rok Garbas
0893b43140
channelsDir -> channelName 2020-03-10 12:51:19 +01:00
Rok Garbas
a8671842d9
channelsDir -> channelName 2020-03-10 12:49:52 +01:00
Rok Garbas
1729eb92c8
remove not needed lines 2020-03-10 12:48:11 +01:00
Eelco Dolstra
a49451a4f9 flake.lock: Update
Flake input changes:

* Added 'nix': 'github:NixOS/nix/73769b28e376cf1fb3e7248bafaa17c35527925d'
* Added 'nix/nixpkgs': 'github:edolstra/nixpkgs/43e283790fbe330b723ac44b584824cf6d85c1ee'
* Added 'nixpkgs': 'github:edolstra/nixpkgs/54a27fb2fc5fbd8927f9f6dc77fe1de1faa05266'
2020-03-10 12:18:59 +01:00
Rok Garbas
a3e79347be
my poor attempt at perl 2020-03-10 12:15:53 +01:00
Eelco Dolstra
e6183b61ac
Merge pull request #33 from garbas/push-channels-to-s3-bucket
Push channels to s3 bucket (fix)
2020-03-06 11:23:10 +01:00
Rok Garbas
0ec4463dbd
fixing copy paste typo 2020-03-06 10:32:44 +01:00
Rok Garbas
a055dc2cdc
fix a typo and also add redirect for $channel/nixexprs.tar.xz 2020-03-06 10:24:35 +01:00
Eelco Dolstra
abb56de99f
Merge pull request #32 from garbas/push-channels-to-s3-bucket
Push channels to s3 bucket
2020-03-05 21:57:09 +01:00
Rok Garbas
3ef68861db
Push channels to s3://nix-channels bucket 2020-03-05 21:48:33 +01:00
Rok Garbas
d1fb4bf67a
Upload channels artifacts (or links to those artifacts) to download.nixos.org
This will enable us to move nixos.org website to other location as
described in nixos/nixos-homepage#326
2020-02-17 13:16:22 +01:00
Eelco Dolstra
a04700b949
Merge pull request #25 from worldofpeace/plasma5-rename
rename iso_graphical to iso_plasma5
2020-01-30 14:32:42 +01:00
worldofpeace
751409599d rename iso_graphical to iso_plasma5 2020-01-30 08:28:20 -05:00
Eelco Dolstra
91f79b69a3
Fix adding nix to $PATH 2020-01-03 16:13:08 +01:00
Graham Christensen
579cbfc508
Merge pull request #31 from samueldr/fix/2020-01-02-mirror-issue-2
mirror-branch: Always exit with 1 on nix-instantiate error
2020-01-02 22:08:31 -05:00
c4a61dfe8a mirror-branch: Always exit with 1 on nix-instantiate error
Resolving the values and being fancy is harder than the actual benefits
would give out.

Return all the info we have, and let the pager'd person deal with the
data.
2020-01-02 22:04:43 -05:00
Graham Christensen
5146d2cb25
Merge pull request #30 from samueldr/fix/2020-01-02-mirror-issue
mirror-branch: Bails when failing to run nix-instantiate
2020-01-02 21:24:53 -05:00
cac10f5360 mirror-branch: Bails when failing to run nix-instantiate
A more durable solution would likely be to make a generic function that
wraps backticks and fails when $? is non-zero, rather than doing it
in-situ. There are other backtick uses that may be problematic
2020-01-02 21:19:58 -05:00
Eelco Dolstra
059ee08f5c Use nix-master 2019-12-30 21:51:21 +01:00
Eelco Dolstra
aec148383a Convert to flake 2019-12-30 21:34:49 +01:00
Eelco Dolstra
0df25e1e8f
Merge pull request #28 from NixOS/back-in-time-exit-code
mirror-nixos-branch.pl: exit 0 if the channel would go back in time
2019-11-15 17:06:16 +01:00
Graham Christensen
7ee70fd479
mirror-nixos-branch.pl: exit 0 if the channel would go back in time
Prometheus now has a configured alert if an update job fails for a
while. Going back in time is not so unusual:

1. a hydra evaluation completes with some failed jobs
2. the channel advances to this commit
3. an admin restarts a failed job
4. the channel would go backward because the evaluation is complete

Since it is not a problem, make it a non-problematic exit code.
2019-11-15 11:01:34 -05:00
Eelco Dolstra
fac8ec969e
Revert "Namespace channel pushes in nixpkgs"
This reverts commit 38d2339ca2.
2019-10-29 12:29:31 +01:00
Eelco Dolstra
1856e2be31
Merge pull request #27 from NixOS/grahamc-patch-1
Namespace channel pushes in nixpkgs
2019-10-29 12:28:26 +01:00
Graham Christensen
38d2339ca2
Namespace channel pushes in nixpkgs
PRs to NixOS are a bit confused about if they should PR to release-* or nixos-* or nixpkgs-*. I think namespacing the refs will go a long way in making it more obvious.
2019-10-29 12:17:25 +01:00
Eelco Dolstra
6165ae664d Push to the nixpkgs repo
Fixes https://github.com/NixOS/nixpkgs/issues/71176.
2019-10-17 19:35:28 +02:00
Graham Christensen
3e89acae6a
Merge pull request #24 from samueldr/fix/wrong-hash-format
mirror: sets hash format to base16
2019-04-30 18:26:52 -04:00
81dfa0d65a mirror: sets hash format to base16
From the nix 2.2 changelog:

> nix hash-file and nix hash-path now print hashes in SRI
> format by default. They also use SHA-256 by default
> instead of SHA-512 because that's what we use most of the
> time in Nixpkgs.
2019-04-30 18:24:33 -04:00
Graham Christensen
d7a903d1c2
Merge pull request #23 from samueldr/fix/json-error-handling
file-cache: use the right exception type for parse error
2019-01-30 22:58:33 -05:00