Closed kawasin73 closed 5 years ago
git rev-parse --abbrev-ref HEAD
https://makandracards.com/makandra/12107-git-show-current-branch-name-only
it is not able to mount host directory to remote docker container.
It is not possible to mount a folder from your job space into a container in Remote Docker (and vice versa).
https://circleci.com/docs/2.0/building-docker-images/#mounting-folders
https://circleci.com/docs/2.0/docker-compose/#using-docker-compose-with-docker-executor
USE Machine Executor in which docker-compose works fully as expected.
https://circleci.com/docs/2.0/docker-compose/#using-docker-compose-with-machine-executor
the default ssh key set by circle ci is read only. I need to use writable ssh key.
https://circleci.com/docs/2.0/add-ssh-key/#steps
ssh-keygen -m pem -f $(pwd)/sample
Copy ssh private key to circle ci ( https://circleci.com/gh/kawasin73/rails_docker_template/edit#ssh )
github.com
cat sample | pbcopy
Add ssh public key to github as deploy key ( https://github.com/kawasin73/rails_docker_template/settings/keys )
Revoke default ssh key from circle ci ( https://circleci.com/gh/kawasin73/rails_docker_template/edit#checkout )
Revoke default ssh key from github ( https://github.com/kawasin73/rails_docker_template/settings/keys )
DONE
build new branch and push it automatically in CI.
scripts : #2