A few days ago, my pipeline (which was working right until then) stopped working. My files are the following:
name: Deploy develop to DigitalOcean.
- cat deploy-develop.sh | ssh (Droplet URI)
docker stop projectContainer
docker rm projectContainer
docker build --build-arg enviroment=develop -t project .
docker run -d -p 4200:4200 --restart on-failure --name projectContainer project .
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
As I said, it was working perfect for months, but in the last days, every time I run the pipeline, I get the following console output:
+ cat deploy-develop.sh | ssh (DROPLET URI)
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added the RSA host key for IP address ('IPADDRESS') to the list of known hosts.
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-142-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
Get cloud support with Ubuntu Advantage Cloud Guest:
121 packages can be updated.
0 updates are security updates.
New release '18.04.2 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
-bash: line 3: cd: projectFolder
: No such file or directory
' is not a git command. See 'git --help'.
Did you mean this?
Error response from daemon: No such container: projectContainer
Apparently, simple command as "cd" or "git pull" are not working well now.
If I ssh into my droplet and run the script, it works right. The problem appears when the pipelines tries to run it.
that `cd` command failed not because cd is not present on the image, but because `
projectFolder` is not a subdirectory of current working directory.
git should be installed on atlassian/default-image:2 as per https://hub.docker.com/r/atlassian/default-image/
not sure how `docker stop projectContainer` ever worked given that the container is likely not running or present at the start of the step. Unless you have some additional script entries before the listed shell script.
Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster ! While we’re all excited about the new improvements to Bitbucket ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events