From 8e83893e23131eb659780a116134996e430ead87 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 28 Feb 2019 09:44:28 +0000 Subject: [Gitlab-CI] Creates a deploy-template To be used when pushing an artifact to a github repository --- .gitlab-ci.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1da9be20b..b745b1be5c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -209,6 +209,17 @@ after_script: variables: - $WINDOWS =~ /enabled/ +.deploy-template: &deploy-template + stage: deploy + before_script: + - which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) + - eval $(ssh-agent -s) + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts + - git config --global user.name "coqbot" + - git config --global user.email "coqbot@users.noreply.github.com" + build:base: <<: *build-template variables: @@ -357,7 +368,7 @@ doc:stdlib:dune: - _build/default/doc/stdlib/html doc:refman:deploy: - stage: deploy + <<: *deploy-template environment: name: deployment url: https://coq.github.io/ @@ -368,14 +379,6 @@ doc:refman:deploy: - doc:ml-api:odoc - doc:refman:dune - doc:stdlib:dune - before_script: - - which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) - - eval $(ssh-agent -s) - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts - - git config --global user.name "coqbot" - - git config --global user.email "coqbot@users.noreply.github.com" script: - echo "$DOCUMENTATION_DEPLOY_KEY" | tr -d '\r' | ssh-add - > /dev/null - git clone git@github.com:coq/doc.git _deploy -- cgit v1.2.3 From f70820df5f2da589a302dce5d0cd92988c59ccae Mon Sep 17 00:00:00 2001 From: Théo Zimmermann Date: Mon, 18 Feb 2019 14:05:28 +0100 Subject: When Nix build is finished and pushed to Cachix, update a specific branch. This should allow CI jobs that use our Cachix to only test against Coq versions that are already available in Cachix, avoiding very long build and time outs e.g. in the math-classes CI. Co-authored-by: Vincent Laporte --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b745b1be5c..fd1ea325e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -336,6 +336,21 @@ pkg:nix:deploy: - master - /^v.*\..*$/ +pkg:nix:deploy:channel: + <<: *deploy-template + environment: + name: cachix + url: https://coq.cachix.org + only: + variables: + - $CACHIX_DEPLOYMENT_KEY + dependencies: + - pkg:nix:deploy + script: + - echo "$CACHIX_DEPLOYMENT_KEY" | tr -d '\r' | ssh-add - > /dev/null + - git fetch --unshallow + - git push git@github.com:coq/coq-on-cachix "${CI_COMMIT_REF_NAME}" + pkg:nix: <<: *nix-template except: -- cgit v1.2.3