From dd66ce30e09f1a39d8ff6d9dcefad54f71ac1e42 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Thu, 18 Nov 2021 15:41:02 -0800 Subject: [PATCH] Release 0.2.0 This is release 0.2.0, the first stable release of Colmena! --- Colmena is a simple, stateless NixOS deployment tool modeled after NixOps and morph. In particular, it is built from the ground up to support parallelization of the steps in the deployment process. This release contains the following features: - Node Tagging - Local Deployment - Secrets - Ad Hoc Evaluation - Nix Flakes Support - Parallelism We now have a User Manual at containing tutorials, sample configurations as well as a complete listing of supported deployment options. Signed-off-by: Zhaofeng Li --- .github/workflows/manual-stable.nix | 62 +++++++++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- default.nix | 15 ++++--- 4 files changed, 74 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/manual-stable.nix diff --git a/.github/workflows/manual-stable.nix b/.github/workflows/manual-stable.nix new file mode 100644 index 00000000..c4566394 --- /dev/null +++ b/.github/workflows/manual-stable.nix @@ -0,0 +1,62 @@ +name: Manual (Stable) + +on: + push: + branches: + - release-0.2.x +jobs: + deploy: + env: + LATEST_STABLE_API: 0.2 + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2.3.5 + - uses: cachix/install-nix-action@v15 + with: + install_url: https://releases.nixos.org/nix/nix-2.4/install + extra_nix_config: | + experimental-features = nix-command flakes + - uses: cachix/cachix-action@v10 + with: + name: colmena + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + + - name: Check API version + run: echo "api_version=$(nix eval .#colmena.apiVersion)" >> $GITHUB_ENV + + # == Manual + - name: Build manual + run: nix build -o out .#manual -L + + # Ugly hack so it has permission to delete the worktree afterwards + - name: Copy manual + run: cp --no-preserve=mode -r out/ public/ + + - name: Deploy manual + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + branch: gh-pages + folder: public + target-folder: '${{ env.api_version }}' + + # == Redirect Farm for Latest Stable + # /stable -> /api_version + + - name: Build redirect farm + run: nix build -o out .#manual.redirectFarm -L + if: ${{ env.api_version == env.LATEST_STABLE_API }} + + # Ugly hack so it has permission to delete the worktree afterwards + - name: Copy redirect farm + run: cp --no-preserve=mode -r out-redirectFarm/ redirect-farm/ + if: ${{ success() }} + + - name: Deploy redirect farm + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + branch: gh-pages + folder: redirect-farm + target-folder: stable + if: ${{ success() }} diff --git a/Cargo.lock b/Cargo.lock index 530b0724..f9051aa0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -120,7 +120,7 @@ dependencies = [ [[package]] name = "colmena" -version = "0.2.0-pre" +version = "0.2.0" dependencies = [ "ansi-to-html", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 5e3e5600..9928575a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "colmena" -version = "0.2.0-pre" +version = "0.2.0" authors = ["Zhaofeng Li "] edition = "2018" diff --git a/default.nix b/default.nix index ce45229b..4116a6ca 100644 --- a/default.nix +++ b/default.nix @@ -7,12 +7,10 @@ let in { pkgs ? lockedPkgs, }: let - lib = pkgs.lib; - stdenv = pkgs.stdenv; - rustPlatform = pkgs.rustPlatform; + inherit (pkgs) lib stdenv rustPlatform; in rustPlatform.buildRustPackage rec { pname = "colmena"; - version = "0.2.0-pre"; + version = "0.2.0"; # We guarantee CLI and Nix API stability for the same minor version apiVersion = builtins.concatStringsSep "." (lib.take 2 (lib.splitString "." version)); @@ -22,7 +20,7 @@ in rustPlatform.buildRustPackage rec { src = lib.cleanSource ./.; }; - cargoSha256 = "sha256-IiAJ+sQasimcn4nSv4ACBwP1NLGNArtcIbwzkx0v/7w="; + cargoSha256 = "sha256-ZNSg3hXWKHNQ9yHJS1qW3tFYwzU4ZDa1N0yvoGLmWns="; postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' mkdir completions @@ -38,4 +36,11 @@ in rustPlatform.buildRustPackage rec { # Recursive Nix is not stable yet doCheck = false; + + meta = with lib; { + description = "A simple, stateless NixOS deployment tool"; + homepage = "https://zhaofengli.github.io/colmena/${apiVersion}"; + license = licenses.mit; + maintainers = with maintainers; [ zhaofengli ]; + }; }