From 0ce899fdb0ee81b0e1b231083ac9fe8c78211bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Vallv=C3=A9=20Navarro?= <jvallve@iri.upc.edu> Date: Fri, 19 Nov 2021 08:53:23 +0100 Subject: [PATCH] Testing push from CI --- .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9189c7260..c9e8c4f42 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,10 +10,31 @@ - make install stages: + - license - build_and_test - deploy - final +license_header: + stage: license + image: labrobotica/wolf_deps:16.04 + before_script: + - 'which ssh-agent || ( apt-get update -qy && apt-get install openssh-client -qqy )' + - eval `ssh-agent -s` + - echo "${SSH_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null # add ssh ke + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - echo "$SSH_PUBLIC_KEY" >> ~/.ssh/id_rsa.pub + - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' + script: + - git config --global user.email "${CI_EMAIL}" + - git config --global user.name "${CI_USERNAME}" + - touch prova.txt + - git add -f prova.txt + - git commit -m "added prova.txt" || echo "No changes, nothing to commit!" + - git remote rm origin && git remote add origin git@gitlab.com:$CI_PROJECT_PATH.git + - git push origin HEAD:$CI_COMMIT_REF_NAME # Pushes to the same branch as the trigger + build_and_test:xenial: stage: build_and_test image: labrobotica/wolf_deps:16.04 -- GitLab