I am learning about Pipelines. My objective is to use a pipeline to deploy the code to a Digitalocean server. The SSH and the Server is set.
The pipeline runs without errors but when I go to the server there is nothing there. How can I make cloned repository show up in the destination server?
My Pipeline:
image: node:12.13.0
pipelines:
default:
- step:
name: Deploy to Staging
deployment: staging
script:
- apt-get update && apt-get install -y unzip git
- sh script_CloneOnly.sh
definitions:
services:
mongo:
image: mongo
The script:
#!/bin/bash
git clone --bare git@bitbucket.org:team1/myrepo.git
cd myrepo.git
git fetch origin --tags
Then I get the following output:
+ sh script_CloneOnly.sh
Checking out the source repository
Cloning into bare repository 'myrepo.git'...
Warning: Permanently added the RSA host key for IP address '18.205.93.0' to the list of known hosts.
Entering the checked out repository
Downloading the source repository
Warning: Permanently added the RSA host key for IP address '18.205.93.1' to the list of known hosts.
From bitbucket.org:team1/myrepo
* branch HEAD -> FETCH_HEAD
I expected to find the cloned repository in the server but there is nothing there. What is going wrong with my pipeline? Why I can't clone the repo to the server and keep it there?