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

Gitlab CI support #180

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

swapnilmishra
Copy link

@swapnilmishra swapnilmishra commented Nov 4, 2017

Description

For now added a check for gitlab so that the message which shows up for github doesn't show up in gitlab CI. Please see screenshots attached for the difference.

I wanted to make few other changes also so that few code paths which are still getting executed, shouldn't but that requires quite a bit of refactoring.

Gitlab has its own CI so we don't need to set the build status explicitly as it's done for other cases.

Motivation and Context

This PR along with siddharthkp/ci-env#10 tries to address #19.

Screenshots (if appropriate):

Given below is sample project which was used to just run gitlab CI and use bundlesize.
Repo: https://gitlab.com/swapnilmishra/test-ci

Failed CI

image

Passing CI

image

Message which is shown for github in above screenshots will not be shown for gitlab after the PR.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I created an issue for the Pull Request

@SaraVieira
Copy link
Collaborator

@siddharthkp Have a problem with adding this ? I think this a great fix for now

@siddharthkp
Copy link
Owner

Yeah, just the one tiny comment here and in ci-env

@swapnilmishra
Copy link
Author

Let me know the comments @siddharthkp. Would be happy to make them quickly.

src/api.js Outdated
@@ -12,11 +12,13 @@ let enabled = false

if (repo && token) enabled = true
else if (ci) {
warn(`github token not found
if (ci !== 'gitlab') {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why specifically gitlab?

CI === github makes more sense to me

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually ci variable never takes the value as github its values are travis, circle etc (referring to this file). This is because while github doesn't have a platform CI, gitlab it has CI also built into it. Please correct me in case I have understood it wrong.

Might have to to introduce a platform variable in ci-envmodule which would denote the platform on which the code is hosted and based on whether its value is github or gitlab.

Copy link
Owner

@siddharthkp siddharthkp Nov 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding plaform makes the most sense to me 😄

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I shall make that change soon 😊

@siddharthkp
Copy link
Owner

I always forget to hit submit on my review comments 🙈

@swapnilmishra
Copy link
Author

@siddharthkp @SaraVieira I am done with my changes here and in ci-env PR.

@SaraVieira
Copy link
Collaborator

SaraVieira commented Nov 5, 2017 via email

@narendrashetty
Copy link

@siddharthkp This looks ready to be merged. Are we waiting on any changes?

@weslleyaraujo
Copy link

🙏🙏🙏

@siddharthkp
Copy link
Owner

Depends on siddharthkp/ci-env#10

@swapnilmishra
Copy link
Author

siddharthkp/ci-env#10 is merged 🚀

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

Successfully merging this pull request may close these issues.

5 participants