mirror of
https://github.com/vacp2p/roadmap.git
synced 2026-01-08 21:27:58 -05:00
add flake.nix and adjust Jenkinsfile to use Nix
More deterministic and stable build. Also adde `build.json` for easy version checking. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
@@ -1,3 +1,6 @@
|
|||||||
|
#!/usr/bin/env groovy
|
||||||
|
library 'status-jenkins-lib@v1.9.10'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent {
|
||||||
label 'linux'
|
label 'linux'
|
||||||
@@ -22,23 +25,24 @@ pipeline {
|
|||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Deps') {
|
stage('Deps') {
|
||||||
steps {
|
steps { script {
|
||||||
sh 'npm install'
|
nix.develop('npm install')
|
||||||
}
|
} }
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps { script {
|
||||||
sh 'npx quartz build'
|
nix.develop('npx quartz build')
|
||||||
}
|
jenkins.genBuildMetaJSON('public/build.json')
|
||||||
|
} }
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Publish Prod') {
|
stage('Publish Prod') {
|
||||||
steps {
|
steps { script {
|
||||||
sshagent(credentials: ['status-im-auto-ssh']) {
|
sshagent(credentials: ['status-im-auto-ssh']) {
|
||||||
sh 'ghp-import -p public'
|
nix.develop('ghp-import -c roadmap.vac.dev -p public', pure: false)
|
||||||
}
|
}
|
||||||
}
|
} }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,14 @@ This repository is built and served to https://roadmap.vac.co
|
|||||||
If you see a type or broken link, PRs are always welcome :)
|
If you see a type or broken link, PRs are always welcome :)
|
||||||
If there is information you'd like to see included that isn't here, create and issue :)
|
If there is information you'd like to see included that isn't here, create and issue :)
|
||||||
|
|
||||||
|
## CI/CD
|
||||||
|
|
||||||
|
[CI builds](https://ci.infra.status.im/job/website/job/roadmap.vac.dev/) `master` and pushes to `gh-pages` branch, which is hosted at <https://roadmap.vac.dev/>.
|
||||||
|
|
||||||
|
The hosting is done using [Caddy server with Git plugin for handling GitHub webhooks](https://github.com/status-im/infra-misc/blob/master/ansible/roles/caddy-git).
|
||||||
|
|
||||||
|
Information about deployed build can be also found in `/build.json` available on the website.
|
||||||
|
|
||||||
### Using Obsidian
|
### Using Obsidian
|
||||||
Quartz is created to serve a static site off of an [Obsidian](https://obsidian.md) vault, and thus is the preferred way to manage content locally. In order for all it to function properly, a few things need to be done properly.
|
Quartz is created to serve a static site off of an [Obsidian](https://obsidian.md) vault, and thus is the preferred way to manage content locally. In order for all it to function properly, a few things need to be done properly.
|
||||||
|
|
||||||
@@ -34,3 +42,4 @@ In order to use the templates in the `Templates` folder for auto populating comm
|
|||||||
- assign whichever templates you want to be triggered when a new file is created in a given folder.
|
- assign whichever templates you want to be triggered when a new file is created in a given folder.
|
||||||
|
|
||||||
Refer the [Templater documentation](https://silentvoid13.github.io/Templater/) for how to create your own templates.
|
Refer the [Templater documentation](https://silentvoid13.github.io/Templater/) for how to create your own templates.
|
||||||
|
|
||||||
|
|||||||
26
flake.lock
generated
Normal file
26
flake.lock
generated
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1721548954,
|
||||||
|
"narHash": "sha256-7cCC8+Tdq1+3OPyc3+gVo9dzUNkNIQfwSDJ2HSi2u3o=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "63d37ccd2d178d54e7fb691d7ec76000740ea24a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-24.05",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
35
flake.nix
Normal file
35
flake.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
description = "Flake file for website build";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "nixpkgs/nixos-24.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{ self, nixpkgs }:
|
||||||
|
let
|
||||||
|
supportedSystems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
forEachSystem = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
pkgsFor = forEachSystem (system: import nixpkgs { inherit system; });
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
formatter = forEachSystem (system: pkgsFor.${system}.nixpkgs-fmt);
|
||||||
|
|
||||||
|
devShells = forEachSystem (system: {
|
||||||
|
default = pkgsFor.${system}.mkShellNoCC {
|
||||||
|
packages = with pkgsFor.${system}.buildPackages; [
|
||||||
|
yarn # 1.22.22
|
||||||
|
nodejs_20 # 20.15.1
|
||||||
|
git # 2.44.1
|
||||||
|
openssh # 9.7p1
|
||||||
|
ghp-import # 2.1.0
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user