Skip to content

Instantly share code, notes, and snippets.

View bsima's full-sized avatar
drinking coffee

Ben Sima bsima

drinking coffee
View GitHub Profile

notes on gerrit and gitlab

  • Here are some scripts to integrate Gitlab CI with Gerrit: mobimentum/gitlab-ci-gerrit. They are php, so will need to be rewritten in Python or something, but it’s a nice starting point.
  • There is a ridiculous alternative called gerritlab, which just recreates the patch-driven workflow in GitLab. It’s interesting but let’s not use this.
  • Here is a nice explainer of gerrit: Gerrit Code Review, section “3. Installation” describes how to replicate a Gitlab repo.
- system: `"x86_64-linux"`
- host os: `Linux 4.15.0-1037-gcp, Ubuntu, 16.04.6 LTS (Xenial Xerus)`
- multi-user?: `yes`
- sandbox: `relaxed`
- version: `nix-env (Nix) 2.2`
- channels(root): `"nixpkgs-19.09pre186545.f11ce8683e1"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
@bsima
bsima / error.md
Created January 17, 2019 20:11
haskell, cabal, nix err

cabal file

name: hero-server
version: 2
license: AllRightsReserved
license-file: LICENSE
cabal-version: >= 1.18
build-type: Simple
ben@neb:~$ curl -I https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png
HTTP/2 200
accept-ranges: bytes
content-type: image/png
content-length: 5969
date: Fri, 13 Jul 2018 21:52:02 GMT
expires: Fri, 13 Jul 2018 21:52:02 GMT
cache-control: private, max-age=31536000
last-modified: Thu, 08 Dec 2016 01:00:57 GMT
x-content-type-options: nosniff
#!/usr/bin/env stack
-- stack --nix --resolver lts-11.7 script
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
import Data.List
import Control.Monad
import Control.Exception (assert)
[ben@lithium:~/src/pprjam]$ nixops modify -d pprjam ops/production.nix && nixops deploy -d pprjam
Warning: Permanently added '138.68.225.65' (ED25519) to the list of known hosts.
building all machine configurations...
building path(s) ‘/nix/store/jz1rq5fvi19idr126fpfj9c2sf1bal87-pprjam’
unpacking sources
unpacking source archive /nix/store/7f0rfvihfq5qlckls5rrxiazi7ifhra8-pprjam
source root is pprjam
patching sources
generated pprjam.cabal
installing
@bsima
bsima / production.nix
Last active December 8, 2019 22:41
production.nix
{
resources.sshKeyPairs.ssh-key = {};
pprjam =
{ config, pkgs, ... }:
let
pprjam = (import ../release.nix { inherit pkgs; }).pprjam // {
preInstall = ''
echo "======================================================="
echo "======================================================="
case msg of
AddUserResponse newUsers ->
let
(newUserList, cmd) =
RemoteData.update \(ls -> (List.append ls newUsers, Cmd.none)) model.users
in
( { model | users = newUserList }, cmd )
----