add Nix flake and use it for CI builds

More deterministic and stable build.

Also added build.json for easy version checking.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2024-09-30 19:42:05 +02:00
parent 743479cab0
commit 064c7b0a5d
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
4 changed files with 89 additions and 16 deletions

22
Jenkinsfile vendored
View File

@ -1,3 +1,6 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.10'
pipeline {
agent {
label 'linux'
@ -22,23 +25,24 @@ pipeline {
stages {
stage('Deps') {
steps {
sh 'npm install'
}
steps { script {
nix.develop('npm install')
} }
}
stage('Build') {
steps {
sh 'npx quartz build'
}
steps { script {
nix.develop('npx quartz build')
jenkins.genBuildMetaJSON('public/build.json')
} }
}
stage('Publish Prod') {
steps {
steps { script {
sshagent(credentials: ['status-im-auto-ssh']) {
sh 'ghp-import -p public'
nix.develop('ghp-import -c roadmap.logos.co -p public', pure: false)
}
}
} }
}
}
}

View File

@ -1,19 +1,19 @@
# Logos Collective Project Roadmaps
## Overview
This repository contains the aggregated technical roadmaps of projects under and associated with the Logos Collective. It is an attempt to provide easy access to what we're all actively working on, and how it's going.
This repository contains the aggregated technical roadmaps of projects under and associated with the Logos Collective. It is an attempt to provide easy access to what we're all actively working on, and how it's going.
In its current form, it is an implementation of a [Quartz]() "mind-garden", which is a [Hugo]() theme that allows for easy text and graph-based searching of markdown files. This repository is built and served to https://roadmap.logos.co
In its current form, it is an implementation of a [Quartz]() "mind-garden", which is a [Hugo]() theme that allows for easy text and graph-based searching of markdown files. This repository is built and served to https://roadmap.logos.co
The content, today, contains the definition of work planned by various projects, broken up via:
`Project --> Milestones --> Epics --> Issues`
Each project is given as much autonomy as possible to work as they see fit, with a minimal reporting scheme that sits on top that allows for aggregation of information and project tracking.
Each project is given as much autonomy as possible to work as they see fit, with a minimal reporting scheme that sits on top that allows for aggregation of information and project tracking.
In a nutshell, projects give a definitions of their roadmap up-front, which includes the mapping of issues to epics, and epics to milestones. They also provide perceived risks and dependencies associated with their work.
In a nutshell, projects give a definitions of their roadmap up-front, which includes the mapping of issues to epics, and epics to milestones. They also provide perceived risks and dependencies associated with their work.
The projects then report a weekly "diff" associated with the work they did each week, which is ostensibly a stand-up. The Insights team can work from there to do what they need.
The projects then report a weekly "diff" associated with the work they did each week, which is ostensibly a stand-up. The Insights team can work from there to do what they need.
## Contribution
The bulk of the content is added by the Insights team within the Logos Collective, which is a team that works to keep track of activity within the projects in order to provide analysis and insight based on that work to various stakeholders, including the projects themselves.
@ -24,10 +24,18 @@ 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 :)
## CI/CD
[CI builds](https://ci.infra.status.im/job/website/job/roadmap.logos.co/) `master` and pushes to `gh-pages` branch, which is hosted at <https://roadmap.logos.co/>.
The hosting is done using [Caddy server with Git plugin for handling GitHub webhooks](https://github.com/status-im/infra-sites/blob/master/ansible/roles/caddy-git).
Information about deployed build can be also found in `/build.json` available on the website.
### 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.
First and foremost, Quartz uses links references with `content` as the root directory, so when opening in Obsidian, open the `content` folder, and _not_ the repo directory.
First and foremost, Quartz uses links references with `content` as the root directory, so when opening in Obsidian, open the `content` folder, and _not_ the repo directory.
Then the following vault settings need to be configured
@ -43,6 +51,6 @@ In order to use the templates in the `Templates` folder for auto populating comm
- enable `automatic jump to cursor`
- enable `Trigger Templater on new file creation`
- enable `Folder templates`
- 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.

26
flake.lock Normal file
View 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
View 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
];
};
});
};
}