dev to basic spring #9

Merged
hirst merged 20 commits from dev into basic-spring 2024-05-31 08:26:27 +02:00
6 changed files with 35 additions and 38 deletions
Showing only changes of commit 64305b10dd - Show all commits

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
result/*
result

View file

@ -1,29 +0,0 @@
{
"enabled": 1,
"hidden": false,
"description": "Server",
"nixexprinput": "generator",
"nixexprpath": "flake.nix",
"checkinterval": 300,
"schedulingshares": 100,
"enableemail": false,
"emailoverride": "",
"keepnr": 3,
"inputs": {
"main": {
"type": "git",
"value": "https://git.4o1x5.dev/learningpulse/server.git dev",
"emailresponsible": false,
"gitea_repo_name": "server",
"gitea_repo_owner": "learningpulse",
"gitea_status_repo": "dev",
"gite_http_url": "https://git.4o1x5.dev"
},
"nixpkgs": {
"type": "git",
"value": "https://github.com/NixOS/nixpkgs.git nixos-unstable",
"emailresponsible": false
}
}
}

View file

@ -5,7 +5,6 @@
}; };
outputs = { self, nixpkgs, ... }: outputs = { self, nixpkgs, ... }:
let let
# TODO add more systems # TODO add more systems
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
@ -30,12 +29,13 @@
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/share/${pname} mkdir -p $out/bin $out/share/${pname}
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}-${version} install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname}- \ makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname} \
--add-flags "-jar $out/share/${pname}/${pname}-${version}.jar" --add-flags "-jar $out/share/${pname}/${pname}-${version}.jar"
''; '';
}; };
learningpulse-eureka = pkgs.maven.buildMavenPackage rec { learningpulse-eureka = pkgs.maven.buildMavenPackage rec {
pname = "eureka"; pname = "eureka";
version = "0.0.1"; version = "0.0.1";
@ -48,9 +48,9 @@
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/share/${pname} mkdir -p $out/bin $out/share/${pname}
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}-${version} install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname}- \ makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname} \
--add-flags "-jar $out/share/${pname}/${pname}-${version}.jar" --add-flags "-jar $out/share/${pname}/${pname}-${version}.jar"
''; '';
}; };
@ -64,17 +64,18 @@
mvnHash = "sha256-YCK1Qujgx73cZdEx2mRip+y+66px5TxL247fBIMyoy4="; mvnHash = "sha256-YCK1Qujgx73cZdEx2mRip+y+66px5TxL247fBIMyoy4=";
nativeBuildInputs = buildPackages; nativeBuildInputs = buildPackages;
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/share/${pname} mkdir -p $out/bin $out/share/${pname}
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}-${version} install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname}- \ makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname} \
--add-flags "-jar $out/share/${pname}/${pname}-${version}.jar" --add-flags "-jar $out/share/${pname}/${pname}-${version}.jar"
''; '';
}; };
}; };
hydraJobs = { hydraJobs = {
inherit (self) inherit (self)
packages; packages;

23
readme.md Normal file
View file

@ -0,0 +1,23 @@
# LearningPulse server
## CI/CD
To check up on builds head to [the hydra server](https://hydra.4o1x5.dev/project/learningpulse)
### Enter developer shell
```bash
nix develop
```
### Build services
```bash
nix build .#learningpulse-dummy
```
### Run service
```bash
nix develop && cd dummy && mvn run spring-boot:run
```

2
result
View file

@ -1 +1 @@
/nix/store/v6lrgj18jgvwli3irsdabgj5nc712gfc-gateway-0.0.1 /nix/store/zmnh05nkqyynsmshiqfhq28bj9iiww0i-gateway-0.0.1

View file