From 03364341edc1cf8097579c94c5c7f4e416a9793b Mon Sep 17 00:00:00 2001 From: Nico Vermaas <vermaas@astron.nl> Date: Tue, 23 Mar 2021 13:57:58 +0100 Subject: [PATCH] adding CI/CD pipeline for acceptance --- .gitlab-ci.yml | 20 ++++++++++++++++++++ src/routes/Routes.js | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bb75e53..bd398ce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,3 +38,23 @@ deploy-esap-gui: when: manual only: - esap-gui-dev + - master + +deploy-esap-gui-acceptance: + stage: deploy + before_script: + - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' + - eval $(ssh-agent -s) + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - ssh-keyscan dop457.astron.nl >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + script: + - echo "Deploying to server" + - scp -r build/static/* vermaas@dop457.astron.nl:/data/shared/static + - scp -r build/* vermaas@dop457.astron.nl:/data/shared/public_html/esap-gui + - echo "Deployed" + when: manual + only: + - acceptance diff --git a/src/routes/Routes.js b/src/routes/Routes.js index 6f02266..de53a54 100644 --- a/src/routes/Routes.js +++ b/src/routes/Routes.js @@ -51,7 +51,7 @@ export default function Routes() { </Route> <Route exact path="/samp" component={SampPage} /> </Switch> - <footer><small>esap-gui version 23 feb 2021 15:00</small></footer> + <footer><small>esap-gui version 23 march 2021 14:00</small></footer> </Router> ); } -- GitLab