Trouble Shooting CircleCI Builds - Enterprise-CMCS/eAPD GitHub Wiki
One of the easiest ways to troubleshoot a failed build is to SSH the CircleCI container. CircleCI uses the same SSH key that GitHub uses.
Generate Key in GitHub
- Go into your personal settings
- Choose SSH and GPG Keys
- Click New SSH Key
- Add the Title and the Key
Add Key to CircleCI
- Go to CircleCI and change from All Projects to eAPD
- Click Project Settings in the top right corner of CircleCI
- Click SSH Keys
- Under "Additional SSH Keys" click "Add SSH Key"
- Leave Hostname blank
- Paste your Private Key into the box and click "Add SSH Key"
Enable SSH in CircleCI Build
- If/When your build fails, click on the failed job
- Find the Rerun drop down and select "Rerun Job with SSH"
- It'll restart the build with SSH enabled
SSHing into CircleCI Container
- Once the Enable SSH job has finished, expand it and it'll give you SSH instructions
You can now SSH into this box if your SSH public key is added:
$ ssh -p 12345 1.2.3.4
- Copy that command and paste it on the command line, add -i ~/.ssh/yoursshkey
$ ssh -p 12345 1.2.3.4 -i ~/.ssh/yoursshkey
You should now be SSHed into the container.
From the container you can run Linux commands. The container will have the variables already imported.