Merge branch 'master' of gitlab.uniworx.de:fradrive/fradrive

This commit is contained in:
Steffen Jost 2023-05-22 16:44:56 +00:00
commit 1f6f0de10e
20 changed files with 41 additions and 108 deletions

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de> # SPDX-FileCopyrightText: 2022-2023 Sarah Vaupel <sarah.vaupel@uniworx.de>, Gregor Kleen <gregor@kleen.consulting>
# #
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
@ -10,14 +10,18 @@ workflow:
default: default:
image: image:
name: registry.uniworx.de/fradrive/fradrive/nix-unstable:0.2.0 name: registry.uniworx.de/uniworx/containers/nix-attic:latest
variables: variables:
NIX_PATH: "nixpkgs=http://nixos.org/channels/nixos-21.05/nixexprs.tar.xz" NIX_PATH: "nixpkgs=http://nixos.org/channels/nixos-21.05/nixexprs.tar.xz"
AWS_SHARED_CREDENTIALS_FILE: "/etc/aws/credentials" AWS_SHARED_CREDENTIALS_FILE: "/etc/aws/credentials"
TRANSFER_METER_FREQUENCY: "2s" TRANSFER_METER_FREQUENCY: "2s"
NIX_CONFIG: |-
extra-substituters = https://cache.iog.io
extra-trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
stages: stages:
- frontend:build - frontend:build
- backend:build - backend:build
@ -25,7 +29,7 @@ stages:
- docker - docker
- prepare release - prepare release
- release - release
node dependencies: node dependencies:
stage: frontend:build stage: frontend:build
script: script:
@ -33,16 +37,10 @@ node dependencies:
- nix -L build -o result "${FLAKE}#uniworxNodeDependencies" - nix -L build -o result "${FLAKE}#uniworxNodeDependencies"
- nix-store --export $(nix-store -qR result) | xz -T0 -2 > node-dependencies.nar.xz - nix-store --export $(nix-store -qR result) | xz -T0 -2 > node-dependencies.nar.xz
before_script: &nix-before before_script: &nix-before
- mkdir -p /etc/nix
- install -m 0644 .gitlab-ci/nix-bootstrap.conf /etc/nix/nix.conf
- .gitlab-ci/write-minio-creds.sh
- .gitlab-ci/make-minio-bucket.sh
- cp -pr --reflink=auto -L .gitlab-ci/upload-to-cache.sh /etc/nix/upload-to-cache.sh
- install -m 0644 .gitlab-ci/nix.conf /etc/nix/nix.conf
- git config --global init.defaultBranch master - git config --global init.defaultBranch master
- install -v -m 0700 -d ~/.ssh - install -v -m 0700 -d ~/.ssh
- install -v -T -m 0644 "${SSH_KNOWN_HOSTS}" ~/.ssh/known_hosts - install -v -T -m 0644 "${SSH_KNOWN_HOSTS}" ~/.ssh/known_hosts
- install -v -T -m 0400 "${SSH_DEPLOY_KEY}" ~/.ssh/deploy && echo "IdentityFile ~/.ssh/deploy" >> ~/.ssh/config; - install -v -T -m 0400 "${SSH_DEPLOY_KEY}" ~/.ssh/deploy && echo "IdentityFile ~/.ssh/deploy" >> ~/.ssh/config;
- install -v -T -m 0644 "${FONTAWESOME_NPM_AUTH_FILE}" /etc/fontawesome-token - install -v -T -m 0644 "${FONTAWESOME_NPM_AUTH_FILE}" /etc/fontawesome-token
- install -v -T -m 0644 "${NIX_NETRC}" /etc/nix/netrc - install -v -T -m 0644 "${NIX_NETRC}" /etc/nix/netrc
- | - |

View File

@ -1,5 +0,0 @@
sandbox = true
experimental-features = nix-command flakes
substituters = https://cache.iog.io https://cache.nixos.org/
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
require-sigs = true

View File

@ -1,3 +0,0 @@
SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>
SPDX-License-Identifier: AGPL-3.0-or-later

View File

@ -1,6 +0,0 @@
sandbox = true
experimental-features = nix-command flakes
substituters = https://cache.iog.io https://cache.nixos.org/ s3://nix-cache?scheme=http&endpoint=minio-gitlab-runner-cache
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= minio-gitlab-runner-cache:ZN5neq93MHqpnieHSBlxGgWvCL0WKrZ2S9QS+U5Bnro=
require-sigs = true
post-build-hook = /etc/nix/upload-to-cache.sh

View File

@ -1,3 +0,0 @@
SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>
SPDX-License-Identifier: AGPL-3.0-or-later

View File

@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [27.4.4](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/v27.4.3...v27.4.4) (2023-05-20)
## [27.4.3](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/v27.4.2...v27.4.3) (2023-05-12) ## [27.4.3](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/v27.4.2...v27.4.3) (2023-05-12)
## [27.4.2](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/v27.4.1...v27.4.2) (2023-05-09) ## [27.4.2](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/v27.4.1...v27.4.2) (2023-05-09)

View File

@ -151,22 +151,6 @@
"url": "https://gitlab.ifi.lmu.de/uni2work/haskell/cryptonite.git" "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/cryptonite.git"
} }
}, },
"docker-nixpkgs": {
"flake": false,
"locked": {
"lastModified": 1678089139,
"narHash": "sha256-cK0RDcxR4eWMrdZIcqNVqnjo9k2LwVmNZO3qj1ctDXU=",
"owner": "nix-community",
"repo": "docker-nixpkgs",
"rev": "2205fb4968adf683324e6d0401b74b9d250d8f56",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "docker-nixpkgs",
"type": "github"
}
},
"encoding": { "encoding": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -520,7 +504,6 @@
"conduit-resumablesink": "conduit-resumablesink", "conduit-resumablesink": "conduit-resumablesink",
"cryptoids": "cryptoids", "cryptoids": "cryptoids",
"cryptonite": "cryptonite", "cryptonite": "cryptonite",
"docker-nixpkgs": "docker-nixpkgs",
"encoding": "encoding", "encoding": "encoding",
"esqueleto": "esqueleto", "esqueleto": "esqueleto",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen <gregor@kleen.consulting>, Sarah Vaupel <sarah.vaupel@uniworx.de> # SPDX-FileCopyrightText: 2022-2023 Sarah Vaupel <sarah.vaupel@uniworx.de>, Gregor Kleen <gregor@kleen.consulting>
# #
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
@ -28,11 +28,6 @@
ref = "main"; ref = "main";
}; };
docker-nixpkgs = {
url = "github:nix-community/docker-nixpkgs";
flake = false;
};
encoding = { encoding = {
url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/encoding.git?ref=uni2work"; url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/encoding.git?ref=uni2work";
flake = false; flake = false;
@ -91,7 +86,7 @@
}; };
}; };
outputs = inputs@{ self, nixpkgs, nixpkgs-recent, docker-nixpkgs, flake-utils, haskell-nix, ... }: flake-utils.lib.eachSystem ["x86_64-linux"] outputs = inputs@{ self, nixpkgs, nixpkgs-recent, flake-utils, haskell-nix, ... }: flake-utils.lib.eachSystem ["x86_64-linux"]
(system: (system:
let frontendSource = pkgs.lib.sourceByRegex ./. [ let frontendSource = pkgs.lib.sourceByRegex ./. [
"^(assets|frontend)(/.*)?$" "^(assets|frontend)(/.*)?$"
@ -116,8 +111,6 @@
}; };
overlays = [ overlays = [
(import "${docker-nixpkgs}/overlay.nix")
(final: prev: let (final: prev: let
pkgs-recent = import nixpkgs-recent { inherit system; }; pkgs-recent = import nixpkgs-recent { inherit system; };
in { inherit (pkgs-recent) dockerTools node2nix stack glibcLocalesUtf8 tzdata chromium minio minio-client skopeo; inherit (pkgs-recent.stdenv) fetchurlBoot; }) in { inherit (pkgs-recent) dockerTools node2nix stack glibcLocalesUtf8 tzdata chromium minio minio-client skopeo; inherit (pkgs-recent.stdenv) fetchurlBoot; })
@ -134,9 +127,9 @@
mkPushDocker = { imageName, dockerImage, defaultRegistry ? "docker://registry.uniworx.de/fradrive/fradrive" }: pkgs.writeScriptBin "push-${dockerImage.imageName}" '' mkPushDocker = { imageName, dockerImage, defaultRegistry ? "docker://registry.uniworx.de/fradrive/fradrive" }: pkgs.writeScriptBin "push-${dockerImage.imageName}" ''
#!${pkgs.zsh}/bin/zsh -xe #!${pkgs.zsh}/bin/zsh -xe
target=''${1-${defaultRegistry}/${imageName}:${dockerImage.imageTag}} target=''${1:-${defaultRegistry}/${imageName}:${dockerImage.imageTag}}
[[ -n "''${1}" ]] && shift [[ -n "''${1}" ]] && shift
${pkgs.skopeo}/bin/skopeo ''${@} --insecure-policy copy docker-archive://${dockerImage} ''${target} ${pkgs.skopeo}/bin/skopeo --tmpdir ''${TMPDIR:-/var/tmp} ''${@} --insecure-policy copy docker-archive://${dockerImage} ''${target}
''; '';
inherit (pkgs.lib) recursiveUpdate; inherit (pkgs.lib) recursiveUpdate;
@ -146,10 +139,9 @@
}; };
apps = haskellFlake.apps // { apps = haskellFlake.apps // {
pushUniworxDemoDocker = flake-utils.lib.mkApp { drv = mkPushDocker { imageName = "uniworx-demo"; dockerImage = pkgs.uniworxDemoDocker; defaultRegistry = "docker://registry.gitlab.com/fradrive/fradrive"; }; }; pushUniworxDemoDocker = flake-utils.lib.mkApp { drv = mkPushDocker { imageName = "uniworx-demo"; dockerImage = pkgs.uniworxDemoDocker; }; };
pushUniworxDocker = flake-utils.lib.mkApp { drv = mkPushDocker { imageName = "uniworx"; dockerImage = pkgs.uniworxDocker; defaultRegistry = "docker://registry.gitlab.com/fradrive/fradrive" }; }; pushUniworxDocker = flake-utils.lib.mkApp { drv = mkPushDocker { imageName = "uniworx"; dockerImage = pkgs.uniworxDocker; }; };
pushCIDocker = flake-utils.lib.mkApp { drv = mkPushDocker { imageName = "nix-unstable"; dockerImage = pkgs.ciDocker; }; }; calculateMaterializedSha = flake-utils.lib.mkApp { drv = pkgs.uniworx.stack-nix.passthru.calculateMaterializedSha; exePath = ""; };
calculateMaterializedSha = flake-utils.lib.mkApp { drv = pkgs.uniworx.stack-nix.passthru.calculateMaterializedSha; execPath = ""; };
jqChangelogJson = flake-utils.lib.mkApp { drv = pkgs.jqChangelogJson; }; jqChangelogJson = flake-utils.lib.mkApp { drv = pkgs.jqChangelogJson; };
}; };

View File

@ -1,3 +0,0 @@
{
"version": "0.2.0"
}

View File

@ -1,3 +0,0 @@
SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>
SPDX-License-Identifier: AGPL-3.0-or-later

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Steffen Jost <jost@cip.ifi.lmu.de>,Steffen Jost <jost@tcs.ifi.lmu.de> # SPDX-FileCopyrightText: 2022-2023 Gregor Kleen <gregor@kleen.consulting>, Sarah Vaupel <sarah.vaupel@ifi.lmu.de>, Steffen Jost <jost@tcs.ifi.lmu.de>
# #
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
@ -13,35 +13,35 @@ let
printf '%s' $(date -Is -d '@${toString self.lastModified}') > $out printf '%s' $(date -Is -d '@${toString self.lastModified}') > $out
''); '');
in if self ? lastModified then fromDate else "1970-01-01T00:00:01Z"; in if self ? lastModified then fromDate else "1970-01-01T00:00:01Z";
mkUniworxDocker = { isDemo }: prev.dockerTools.buildImage { mkUniworxDocker = { isDemo }: prev.dockerTools.buildImage {
name = "uniworx${optionalString isDemo "-demo"}"; name = "uniworx${optionalString isDemo "-demo"}";
tag = tag =
let let
versionFile = if isDemo then ./demo-version.json else ./version.json; versionFile = if isDemo then ./demo-version.json else ./version.json;
in (builtins.fromJSON (prev.lib.readFile versionFile)).version; in (builtins.fromJSON (prev.lib.readFile versionFile)).version;
inherit created; inherit created;
contents = with final; [ contents = with final; [
uniworx.uniworx.components.exes.uniworx uniworx.uniworx.components.exes.uniworx
prev.dockerTools.binSh findutils coreutils prev.dockerTools.binSh findutils coreutils
iana-etc iana-etc
# for PDF creation with Pandoc and LuaTeX # for PDF creation with Pandoc and LuaTeX
#cups # needed for interface with print center -- did not work as intended, requires lpd running #cups # needed for interface with print center -- did not work as intended, requires lpd running
busybox # should provide a working lpr -- to be tested busybox # should provide a working lpr -- to be tested
htop htop
pdftk # for encrypting pdfs pdftk # for encrypting pdfs
#texlive.combined.scheme-medium # too large for container in LMU build environment. #texlive.combined.scheme-medium # too large for container in LMU build environment.
(texlive.combine { (texlive.combine {
inherit (texlive) scheme-basic inherit (texlive) scheme-basic
babel-german babel-english booktabs textpos babel-german babel-english booktabs textpos
enumitem eurosym koma-script parskip xcolor dejavu enumitem eurosym koma-script parskip xcolor dejavu
# required fro LuaTeX # required fro LuaTeX
luatexbase lualatex-math unicode-math selnolig luatexbase lualatex-math unicode-math selnolig
; ;
}) })
# just for manual testing within the pod, may be removef for production? # just for manual testing within the pod, may be removef for production?
curl wget netcat openldap curl wget netcat openldap
unixtools.netstat htop gnugrep unixtools.netstat htop gnugrep
locale locale
] ++ optionals isDemo [ postgresql_12 memcached uniworx.uniworx.components.exes.uniworxdb ]; ] ++ optionals isDemo [ postgresql_12 memcached uniworx.uniworx.components.exes.uniworxdb ];
@ -61,7 +61,7 @@ let
install -d -g uniworx -o uniworx -m 0755 /var/log/uniworx install -d -g uniworx -o uniworx -m 0755 /var/log/uniworx
# just to see how to create directories here # just to see how to create directories here
mkdir -p /testdir mkdir -p /testdir
${optionalString isDemo '' ${optionalString isDemo ''
install -d -g uniworx -o uniworx -m 0750 /var/lib/postgres install -d -g uniworx -o uniworx -m 0750 /var/lib/postgres
@ -148,26 +148,7 @@ let
}; };
}; };
in in
{ mapAttrs (_name: mkUniworxDocker) {
ciDocker = prev.dockerTools.buildImageWithNixDb rec {
name = "uniworx-ci";
inherit created;
tag = (builtins.fromJSON (prev.lib.readFile ./ci-version.json)).version;
fromImage = prev.docker-nixpkgs.nix-unstable;
contents = with final; [
bash coreutils
minio-client
xz
];
runAsRoot = ''
#!${final.stdenv.shell}
${final.coreutils}/bin/install -v -m 0777 -d /var/tmp
'';
};
} // mapAttrs (_name: mkUniworxDocker) {
uniworxDemoDocker = { isDemo = true; }; uniworxDemoDocker = { isDemo = true; };
uniworxDocker = { isDemo = false; }; uniworxDocker = { isDemo = false; };
} }

View File

@ -1,3 +1,3 @@
{ {
"version": "27.4.3" "version": "27.4.4"
} }

View File

@ -1,3 +1,3 @@
{ {
"version": "27.4.3" "version": "27.4.4"
} }

View File

@ -21,6 +21,6 @@
''; '';
outputHashMode = "recursive"; outputHashMode = "recursive";
outputHash = "sha256-zntsIUu13s5doijk3C8ZniYDlDdHZ5Isbv0SQLNgt08="; outputHash = "sha256-18MfdmJX3q826Q4p2F3SnwS2fCjLN0LUpIV/jqUPH4I==";
}; };
} }

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "uni2work", "name": "uni2work",
"version": "27.4.3", "version": "27.4.4",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "uni2work", "name": "uni2work",
"version": "27.4.3", "version": "27.4.4",
"description": "", "description": "",
"keywords": [], "keywords": [],
"author": "", "author": "",

View File

@ -1,5 +1,5 @@
name: uniworx name: uniworx
version: 27.4.3 version: 27.4.4
dependencies: dependencies:
- base - base
- yesod - yesod

View File

@ -48,5 +48,5 @@ $# SPDX-License-Identifier: AGPL-3.0-or-later
. .
<br /> <br />
Der Quellcode der Uni2work-Software ist über folgenden Link öffentlich verfügbar: # Der Quellcode der Uni2work-Software ist über folgenden Link öffentlich verfügbar: #
<a href="https://gitlab.com/fradrive/fradrive"> <a href="https://gitlab.uniworx.de/fradrive/fradrive">
https://gitlab.com/fradrive/fradrive https://gitlab.uniworx.de/fradrive/fradrive

View File

@ -47,5 +47,5 @@ $# SPDX-License-Identifier: AGPL-3.0-or-later
. .
<br /> <br />
The source code of the Uni2work software is publicly available via the following link: # The source code of the Uni2work software is publicly available via the following link: #
<a href="https://gitlab.com/fradrive/fradrive"> <a href="https://gitlab.uniworx.de/fradrive/fradrive">
https://gitlab.com/fradrive/fradrive https://gitlab.uniworx.de/fradrive/fradrive

View File

@ -9,5 +9,5 @@ $# SPDX-License-Identifier: AGPL-3.0-or-later
$forall n <- filter isNavFooter nav $forall n <- filter isNavFooter nav
^{navWidget n} ^{navWidget n}
<li> <li>
<a href="https://gitlab.com/fradrive/fradrive" target="_blank"> <a href="https://gitlab.uniworx.de/fradrive/fradrive" target="_blank">
_{MsgUni2workSource} _{MsgUni2workSource}