Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Tecnonucleous
Tecnonucleous Bot
Commits
6b47b53d
Commit
6b47b53d
authored
Oct 30, 2019
by
Daniel Pérez Fernández
🕶
Browse files
CD First Test
parent
ce5fc191
Pipeline
#92500320
failed
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
.gitlab-ci.yml
.gitlab-ci.yml
+23
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
6b47b53d
image
:
ubuntu:latest
variables
:
WORK_DIR
:
${CI_PROJECT_NAME}
BRANCH
:
${CI_COMMIT_REF_NAME}
REPO
:
https://gitlab.com/Tecnonucleous/open-telegram-bot-nodejs.git
stages
:
-
deploy
deply
:
# Within before_script what we are doing is creating and adding ssh key, also we are disabling command line to ask for password. 'StrictHostKeyChecking no'
before_script
:
-
'
which
ssh-agent
||
(
apt-get
update
-y
&&
apt-get
install
openssh-client
-y
)'
-
mkdir -p ~/.ssh
-
eval $(ssh-agent -s)
-
'
[[
-f
/.dockerenv
]]
&&
echo
-e
"Host
*\n\tStrictHostKeyChecking
no\n\n"
>
~/.ssh/config'
script
:
-
ssh-add <(echo "$PRIVATE_KEY")
-
ssh -o StrictHostKeyChecking=no "$ssh_username"@"$server_ip" -p "$server_port" "cd ${WORK_DIR}; git init; git clone -b ${BRANCH} ${REPO};"
only
:
-
master
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment