From 88282647ec696417ee9d94cf2cb04ddc57a34201 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 15 Jun 2020 09:11:14 +0200 Subject: [PATCH] chore(gitlab-ci): provide ssh key to all haskell stages --- .gitlab-ci.yml | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a3cc9c5b7..2af09823a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -88,7 +88,7 @@ yesod:build:dev: - stack build --copy-bins --local-bin-path $(pwd)/bin --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic needs: - frontend:build - before_script: + before_script: &haskell - apt-get update -y - apt-get install -y --no-install-recommends locales-all - apt-get install openssh-client -y @@ -115,13 +115,7 @@ yesod:build: - stack build --copy-bins --local-bin-path $(pwd)/bin --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic needs: - frontend:build - before_script: - - apt-get update -y - - apt-get install -y --no-install-recommends locales-all - - apt-get install -y --no-install-recommends openssh-client - - install -v -m 0700 -d ~/.ssh - - install -v -T -m 0644 ${SSH_KNOWN_HOSTS} ~/.ssh/known_hosts - - install -v -T -m 0400 ${SSH_DEPLOY_KEY} ~/.ssh/deploy && echo "IdentityFile ~/.ssh/deploy" >> ~/.ssh/config; + before_script: *haskell artifacts: paths: - bin/ @@ -162,9 +156,7 @@ hlint:dev: needs: - frontend:build - yesod:build:dev # For caching - before_script: - - apt-get update -y - - apt-get install -y --no-install-recommends locales-all + before_script: *haskell dependencies: - frontend:build @@ -185,9 +177,7 @@ yesod:test:dev: needs: - frontend:build - yesod:build:dev # For caching - before_script: - - apt-get update -y - - apt-get install -y --no-install-recommends locales-all + before_script: *haskell dependencies: - frontend:build @@ -203,9 +193,7 @@ hlint: - stack test --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic uniworx:test:hlint needs: - frontend:build - before_script: - - apt-get update -y - - apt-get install -y --no-install-recommends locales-all + before_script: *haskell dependencies: - frontend:build @@ -226,9 +214,7 @@ yesod:test: - stack test --coverage --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic --skip hlint needs: - frontend:build - before_script: - - apt-get update -y - - apt-get install -y --no-install-recommends locales-all + before_script: *haskell dependencies: - frontend:build