Skip to content
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

repository hosting platform #7

Open
vs1682 opened this issue Oct 18, 2017 · 6 comments
Open

repository hosting platform #7

vs1682 opened this issue Oct 18, 2017 · 6 comments

Comments

@vs1682
Copy link

vs1682 commented Oct 18, 2017

Coming from here siddharthkp/bundlesize#158 I checked if we can get the platform where the repository is actually hosted.

Travis : From here we can conclude that Travis supports only github.com.

Circle : There's an env variable CIRCLE_REPOSITORY_URL. Check here.

Wercker : They have WERCKER_GIT_DOMAIN. Check here

Drone : I'm not sure between DRONE_REMOTE_URL and DRONE_REPO_LINK. Check here.

We can either send repo url or the name of the hosting platform.

@siddharthkp
Copy link
Owner

Passing the platform makes more sense to me 🙂

@vs1682
Copy link
Author

vs1682 commented Oct 18, 2017

@siddharthkp - one quick question. The generic environment variables for custom ci , how do get them?
Actually I'm thinking of using CI_REMOTE_REPO_URL for the repo url. Please let me know if it's okay.

@siddharthkp
Copy link
Owner

siddharthkp commented Oct 18, 2017

I don't think it's useful to use repo url, platform would be better (example: github, gitlab, bitbucket, etc.)

So in the case of custom, it would be CI_PLATFORM

@vs1682
Copy link
Author

vs1682 commented Oct 18, 2017

Sorry, I didn't put my question correctly. Actually most of CI platforms provide repo url environment variable and i'm thinking of extracting the platform using regular expression. So I asked for the CI_REMOTE_REPO_URL.
I'm thinking of using this pattern const pattern = new RegExp(/https:\/\/([a-z]+)/i).

@siddharthkp
Copy link
Owner

Ah, understood!

I think in custom CI, we follow the rule of directly asking for the information we need. So it makes more sense to ask for ci platform rather than ask for URL and then infer it.

@vs1682
Copy link
Author

vs1682 commented Oct 19, 2017

Yes, I think that will be good idea. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants