Skip to content

Instantly share code, notes, and snippets.

Mohamad Al Sayadi sayadi

Block or report user

Report or block sayadi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View spring-maven-profiles-medium
spring.profiles.include=@spring.profile.from.maven@
View maven-profiles-medium
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<spring.profile.from.maven/>
</properties>
<dependencies>
View config.yml
version: 2
general:
branches:
only:
- dev
- staging
- prod
jobs:
build:
docker:
@sayadi
sayadi / bash.sh
Last active Aug 1, 2019
How to SSH to an AWS EC2 Instance Running Linux from a CircleCI Build
View bash.sh
# 1- Install AWS CLI
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
./awscli-bundle/install -b ~/bin/aws
# 2- Get the public IP of the current CircleCI runner
PUBLIC_IP=$(curl ipinfo.io/ip)
# 3- Get AWS Region
# TODO Don't forget to replcae with your own Region
View config.yml
version: 2
general:
branches:
only:
- dev
- staging
- prod
jobs:
build:
docker:
@sayadi
sayadi / .1-Instructions.md
Last active May 19, 2018
How to SSH to an AWS EC2 Instance Running Linux from a CircleCI 2 Build
View .1-Instructions.md

How to SSH to an AWS EC2 Instance Running Linux from a CircleCI 2 Build

The Problem

If you use EC2 to host your application, and a tool like CircleCI to automate the deployment of new versions of your application, chances are, you've run into the problem of Circle not being able to SSH into your servers.

The problem is Circle could change the public IP of your runner for every new Build which prevents it from being able to access (SSH) the EC2 Instance. Unfortunately, Circle is not able to provide a list of public IP addresses to whitelist on a Security Group attached to the EC2 Instance. More on this here: https://discuss.circleci.com/t/circleci-source-ip/1202

You can’t perform that action at this time.