-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Circle CI to Build pull requests from forked repositories #99
Comments
Given #96 , here are the full workarounds/patches used to get Circle CI running locally; the
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 42a657e..8cd8626 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -30,6 +30,19 @@ jobs:
PGSLICE_URL: "postgres://root@localhost:5432/rideshare_test"
steps:
- checkout
+ - run:
+ name: Add github.com ssh keys
+ command: |
+ mkdir -p ~/.ssh
+ touch ~/.ssh/known_hosts
+ if ! grep github.com ~/.ssh/known_hosts > /dev/null
+ then
+ echo "github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" >> ~/.ssh/known_hosts
+ echo "github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=" >> ~/.ssh/known_hosts
+ echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=" >> ~/.ssh/known_hosts
+ fi
+ git config --global url."https://github.com".insteadOf git://github.com
+ bundle config github.https true
- ruby/install-deps
- run:
name: Wait for DB
diff --git a/Gemfile b/Gemfile
index 1c18d99..e459369 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
-gem 'rails', git: '[email protected]:rails/rails.git'
+gem 'rails', github: 'rails/rails'
gem 'pg'
gem 'puma'
gem 'geocoder'
@@ -8,15 +8,15 @@ gem 'strong_migrations'
gem 'fast_jsonapi'
gem 'jwt' # Json Web Token
gem 'bcrypt' # Use ActiveModel has_secure_password
-gem 'pghero', git: '[email protected]:andyatkinson/pghero.git'
+gem 'pghero', github: 'andyatkinson/pghero'
gem 'fx' # manage DB Functions
gem 'scenic' # manage DB Views
gem 'whenever', require: false # manage scheduled jobs
gem 'prosopite' # identify N+1 queries
gem 'pg_query', '~> 4.2'
gem 'pg_search'
-gem 'pgslice', git: '[email protected]:andyatkinson/pgslice.git'
-gem 'fast_count', git: 'https://github.com/fatkodima/fast_count.git'
+gem 'pgslice', github: 'andyatkinson/pgslice'
+gem 'fast_count', github: 'fatkodima/fast_count'
gem 'activerecord-import'
# assets gems default Rails 7 app
|
Holy smokes @momer - this is really cool and I didn't know was possible to do. I'll take a look into that capability and get some feedback to you. |
Hi @momer I gave this a shot and had mixed results. I've just merged in this PR: #112
I updated Docker on Mac OS, and installed the circleci CLI with homebrew. I was getting "invalid UTS mode" running https://discuss.circleci.com/t/circleci-cli-error-response-from-daemon-invalid-uts-mode/48081/9 I was able to run Running the I'd love to get the local execution working properly. If you are able to spend time on it and get it working, and want to reply here or with a PR, I'd welcome it. Thanks! |
Related to #93, #98
Description
#93 introduced a regression in the CI suite, due to a configuration change that didn't make its way into the
.circleci/config.yml
file - later resolved via #98.This could have been identified in the PR if the CI ran before merge!
Resolution
If possible, enable Circle CI to build forked repository branches (details @ https://circleci.com/docs/oss/#build-pull-requests-from-forked-repositories)
The text was updated successfully, but these errors were encountered: