parent
951f1a918f
commit
c8ec1aaf0e
3 changed files with 81 additions and 32 deletions
|
|
@ -11,33 +11,41 @@ steps:
|
|||
ATTIC_PUSH_TOKEN:
|
||||
from_secret: attic_push_token
|
||||
commands:
|
||||
- |
|
||||
export green="$(echo -e '\e[1;32m')"
|
||||
export yellow="$(echo -e '\e[1;33m')"
|
||||
export reset="$(echo -e '\e[0m')"
|
||||
- |
|
||||
cat > /etc/nix/nix.conf << EOF
|
||||
# default settings in the docker image
|
||||
build-users-group = nixbld
|
||||
sandbox = false
|
||||
|
||||
# additional settings
|
||||
experimental-features = nix-command flakes
|
||||
substituters = https://attic.hailsatan.eu/xyno https://cache.nixos.org/
|
||||
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= xyno:l2mXaEYOj2kSjxT1dbP1iVya1bBXmKuO7jRXUZohi8c=
|
||||
trusted-substituters =
|
||||
EOF
|
||||
- nix build ".#nix" --print-build-logs --out-link nix --no-update-lock-file
|
||||
- nix profile remove lix
|
||||
- ./nix/bin/nix profile install ".#nix" --no-update-lock-file
|
||||
- nix profile install ".#nix-fast-build" ".#attic-client" --no-update-lock-file
|
||||
- nix --version
|
||||
- attic login default $${ATTIC_ENDPOINT} $${ATTIC_PUSH_TOKEN}
|
||||
- attic use $${ATTIC_CACHE}
|
||||
# - attic watch-store $${ATTIC_CACHE} &
|
||||
# - nix build .#nixosConfigurations.ds9.config.system.build.toplevel .#nixosConfigurations.picard.config.system.build.toplevel .#nixosConfigurations.theseus.config.system.build.toplevel
|
||||
- nix flake archive --to https://attic.hailsatan.eu/xyno .
|
||||
- nix-fast-build --attic-cache xyno --flake .#hydraJobs.systems
|
||||
# - attic push $${ATTIC_CACHE} $(nix path-info .#nixosConfigurations.ds9.config.system.build.toplevel .#nixosConfigurations.picard.config.system.build.toplevel .#nixosConfigurations.theseus.config.system.build.toplevel)
|
||||
|
||||
- |
|
||||
export green="$(echo -e '\e[1;32m')"
|
||||
export yellow="$(echo -e '\e[1;33m')"
|
||||
export reset="$(echo -e '\e[0m')"
|
||||
- |
|
||||
cat > /etc/nix/nix.conf << EOF
|
||||
# default settings in the docker image
|
||||
build-users-group = nixbld
|
||||
sandbox = false
|
||||
|
||||
# additional settings
|
||||
experimental-features = nix-command flakes
|
||||
substituters = https://attic.hailsatan.eu/xyno https://cache.nixos.org/
|
||||
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= xyno:l2mXaEYOj2kSjxT1dbP1iVya1bBXmKuO7jRXUZohi8c=
|
||||
trusted-substituters = https://attic.hailsatan.eu/xyno
|
||||
EOF
|
||||
- nix build ".#nix" --print-build-logs --out-link nix --no-update-lock-file
|
||||
- nix profile remove lix
|
||||
- ./nix/bin/nix profile install ".#nix" --no-update-lock-file
|
||||
- nix profile install ".#nix-fast-build" ".#attic-client" ".#jq" --no-update-lock-file
|
||||
- nix --version
|
||||
- attic login default $${ATTIC_ENDPOINT} $${ATTIC_PUSH_TOKEN}
|
||||
- attic use $${ATTIC_CACHE}
|
||||
- attic watch-store $${ATTIC_CACHE} &
|
||||
# - nix build .#nixosConfigurations.ds9.config.system.build.toplevel .#nixosConfigurations.picard.config.system.build.toplevel .#nixosConfigurations.theseus.config.system.build.toplevel
|
||||
- attic push xyno $(nix flake archive --json . | jq -r '[.. | .path? | select(. != null)] | unique | .[]')
|
||||
- mkdir /tmp/reports
|
||||
- nix-fast-build --no-nom --skip-cached --result-file /tmp/reports/junit.xml --result-format junit --attic-cache xyno --flake .#hydraJobs.systems
|
||||
- name: junit-reports
|
||||
image: ghcr.io/wgroeneveld/woodpecker-ascii-junit:main
|
||||
settings:
|
||||
log-level: debug
|
||||
path: /tmp/reports/**/*.xml
|
||||
when:
|
||||
status: [
|
||||
'success',
|
||||
'failure',
|
||||
]
|
||||
|
|
|
|||
39
.woodpecker/dependency-pr.yaml
Normal file
39
.woodpecker/dependency-pr.yaml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
when:
|
||||
- event: cron
|
||||
con: dependency_update
|
||||
|
||||
steps:
|
||||
- name: nix-flake-update
|
||||
image: ghcr.io/lix-project/lix:latest
|
||||
commands:
|
||||
- |
|
||||
cat > /etc/nix/nix.conf << EOF
|
||||
# default settings in the docker image
|
||||
build-users-group = nixbld
|
||||
sandbox = false
|
||||
|
||||
# additional settings
|
||||
experimental-features = nix-command flakes
|
||||
substituters = https://attic.hailsatan.eu/xyno https://cache.nixos.org/
|
||||
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= xyno:l2mXaEYOj2kSjxT1dbP1iVya1bBXmKuO7jRXUZohi8c=
|
||||
trusted-substituters = https://attic.hailsatan.eu/xyno
|
||||
EOF
|
||||
- nix flake update
|
||||
- name: create-pr
|
||||
image: johnwalkerx/gitea-pull-request-create-plugin:latest
|
||||
pull: true
|
||||
settings:
|
||||
gitea_address: https://git.xyno.systems
|
||||
gitea_token:
|
||||
from_secret: forge_token
|
||||
owner: ${CI_REPO_OWNER}
|
||||
repo: ${CI_REPO_NAME}
|
||||
branch: ${CI_COMMIT_BRANCH}
|
||||
base_branch: main
|
||||
pr_title: Dependency Update
|
||||
pr_body: PR automatically created by Woodpecker CI
|
||||
skip_on_missing_branch: true
|
||||
skip_on_empty_branch: true
|
||||
close_pr_if_empty: true
|
||||
delete_branch_if_pr_empty: true
|
||||
delete_branch_after_merge: true
|
||||
|
|
@ -132,12 +132,15 @@
|
|||
host: config:
|
||||
lib.foldl' lib.recursiveUpdate { } ([
|
||||
{
|
||||
inherit (config.config.system.build) initialRamdisk;
|
||||
inherit (config.config.system.build) toplevel;
|
||||
kernel = config.config.boot.kernelPackages.kernel;
|
||||
}
|
||||
])
|
||||
) self.nixosConfigurations)
|
||||
];
|
||||
hydraJobs.fods = {
|
||||
caddy = self.nixosConfigurations.ds9.config.services.caddy.package;
|
||||
};
|
||||
|
||||
packages."x86_64-linux" =
|
||||
let
|
||||
|
|
@ -145,8 +148,7 @@
|
|||
in
|
||||
{
|
||||
nix = pkgs.unstable.lixPackageSets.latest.lix;
|
||||
nix-fast-build = pkgs.nix-fast-build;
|
||||
attic-client = pkgs.attic-client;
|
||||
inherit (pkgs) nix-fast-build attic-client jq;
|
||||
};
|
||||
checks."x86_64-linux"."nixos" =
|
||||
let
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue