diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 1be9adc7afcd45f5c139e1beca4e1596a2a13f68..0000000000000000000000000000000000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright 2019 PrivateStorage.io, LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -version: 2 - -jobs: - test: - docker: - - image: "nixorg/nix:circleci" - steps: - - "checkout" - - - run: - name: "Run Tests" - command: | - nix-shell --run 'nix-build nixos/unit-tests.nix' && cat result - - system-tests-driver: - # Cannot actually run the system tests on CircleCI but we can build - # everything that makes them up. This by itself can catch a lot of - # problems. - docker: - - image: "nixorg/nix:circleci" - steps: - - "checkout" - - - restore_cache: - # Get all of Nix's state relating to the particular revision of - # nixpkgs we're using. It will always be the same. CircleCI - # artifacts and nixpkgs store objects are probably mostly hosted in - # the same place (S3) so there's not a lot of difference for - # anything that's pre-built. For anything we end up building - # ourselves, though, this saves us all of the build time (less the - # download time). - # - # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ - name: "Restore Nix Store Paths" - keys: - # Construct cache keys that allow sharing as long as nixpkgs - # revision is unchanged. - # - # If nixpkgs changes then potentially a lot of cached packages for - # the base system will be invalidated so we may as well drop them - # and make a new cache with the new packages. - - privatestorageio-nix-store-v2-{{ checksum "nixpkgs.json" }} - - privatestorageio-nix-store-v2- - - - run: - name: "Build System Test Driver" - command: | - nix-shell --run 'nix-build --max-jobs 1 --cores 1 nixos/system-tests.nix -A driver' - - # Give it a good long while. PaymentServer and its dependencies, in - # particular, can take a while to build. - no_output_timeout: "20m" - - - save_cache: - name: "Cache Nix Store Paths" - key: privatestorageio-nix-store-v2-{{ checksum "nixpkgs.json" }} - paths: - - "/nix" - - build: - docker: - - image: "nixorg/nix:circleci" - steps: - - "checkout" - - - restore_cache: - # See comments for nix store caching in `build` job. - name: "Restore Nix Store Paths" - keys: - - privatestorageio-docs-nix-store-v1-{{ checksum "nixpkgs.json" }} - - privatestorageio-docs-nix-store-v1- - - - run: - name: "Nix Build" - command: | - nix-shell --run 'nix-build docs.nix' - - - save_cache: - name: "Cache Nix Store Paths" - key: privatestorageio-docs-nix-store-v1-{{ checksum "nixpkgs.json" }} - paths: - - "/nix" - - - store_artifacts: - path: "result/docs" - destination: "docs" - -workflows: - version: 2 - everything: - jobs: - - "test" - - "build" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..152a4d7c42ca5d3431defe5e9b7dc545d7236513 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,32 @@ +docs: + stage: "build" + script: + - "nix-shell --run 'nix-build docs.nix'" + +unit-tests: + stage: "test" + script: + - "nix-shell --run 'nix-build nixos/unit-tests.nix' && cat result" + +system-tests: + stage: "test" + timeout: "3 hours" + script: + - "nix-shell --run 'nix-build nixos/system-tests.nix'" + +deploy-to-staging: + stage: "deploy" + only: + - "staging" + script: + - echo -n "Hello $GITLAB_USER_LOGIN from $CI_JOB_NAME. I was triggered by $CI_PIPELINE_SOURCE " + - echo "and would like to deploy the $CI_COMMIT_BRANCH branch to the staging environment." + +deploy-to-production: + stage: "deploy" + only: + - "production" + script: + - echo -n "Hello $GITLAB_USER_LOGIN from $CI_JOB_NAME. I was triggered by $CI_PIPELINE_SOURCE " + - echo "and would like to deploy the $CI_COMMIT_BRANCH branch to the production environment." + diff --git a/morph/lib/bootstrap-configuration.nix b/morph/lib/bootstrap-configuration.nix index c639fb97b1e598c0f68a8c2e7a9cd6a2d0d9e93e..e26e345780d0d4da2d65e7b79af9c5e445a35e98 100644 --- a/morph/lib/bootstrap-configuration.nix +++ b/morph/lib/bootstrap-configuration.nix @@ -85,7 +85,7 @@ in ]; # Configure the bootloader how we like. - boot.loader.timeout = 1; + boot.loader.timeout = 10; boot.loader.grub.enable = true; boot.loader.grub.version = 2; boot.loader.grub.device = "/dev/disk/by-id/${grubDeviceID}"; diff --git a/nixos/modules/100tb.nix b/nixos/modules/100tb.nix index 1bcb6ba176714ca3cfa5c527450dd9a3bc60684d..a8db0e8be56798e4491033bfaeec3e4d48c01a8f 100644 --- a/nixos/modules/100tb.nix +++ b/nixos/modules/100tb.nix @@ -105,7 +105,7 @@ in { boot.loader.grub.version = 2; boot.loader.grub.device = "/dev/disk/by-id/${cfg.grubDeviceID}"; - boot.loader.timeout = 1; + boot.loader.timeout = 10; networking.firewall.enable = false; networking.hostId = cfg.hostId;