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

Add GitLab integration #46

Merged
merged 1 commit into from Mar 13, 2019

Conversation

4 participants
@ivanayov
Copy link
Member

ivanayov commented Jan 25, 2019

This adds GitLab as possible SCM and enables authorisation for it as well

Signed-off-by: Ivana Yovcheva iyovcheva@vmware.com

Closes #27

How Has This Been Tested?

Without auth:
screen shot 2019-01-30 at 16 10 09

screen shot 2019-01-30 at 16 10 17

screen shot 2019-01-30 at 16 48 07

===================================
With auth:

screen shot 2019-01-31 at 16 17 05

===================================
With TLS:

screen shot 2019-02-07 at 18 24 01

screen shot 2019-02-07 at 13 57 08

Checklist:

I have:

  • checked my changes follow the style of the existing code / OpenFaaS repos
  • updated the documentation and/or roadmap in README.md
  • read the CONTRIBUTION guide
  • signed-off my commits with git commit -s
  • added unit tests
Show resolved Hide resolved pkg/stack/stack.go Outdated
Show resolved Hide resolved README.md
Show resolved Hide resolved init.yaml Outdated

@ivanayov ivanayov force-pushed the ivanayov:ivanayov/gitlab branch 4 times, most recently from c2c352c to a6b7aa2 Jan 30, 2019

@ivanayov ivanayov changed the title [WIP] Add GitLab integration Add GitLab integration Jan 30, 2019

@alexellis

This comment has been minimized.

Copy link
Member

alexellis commented Jan 31, 2019

Is the auth portion of this WIP?

Show resolved Hide resolved README.md Outdated

@ivanayov ivanayov force-pushed the ivanayov:ivanayov/gitlab branch from a6b7aa2 to 1e5c131 Jan 31, 2019

@ivanayov

This comment has been minimized.

Copy link
Member Author

ivanayov commented Jan 31, 2019

So we tested it both with and without Auth now

@alexellis

This comment has been minimized.

Copy link
Member

alexellis commented Feb 5, 2019

@ivanayov can you confirm?

  • tested with auth on/off
  • tls on/off
@ivanayov

This comment has been minimized.

Copy link
Member Author

ivanayov commented Feb 7, 2019

@alexellis I confirm with auth on/off.
Now testing with TLS

@ivanayov

This comment has been minimized.

Copy link
Member Author

ivanayov commented Feb 7, 2019

Build with TLS on and issuer prod:

screen shot 2019-02-07 at 13 57 08

@ivanayov ivanayov force-pushed the ivanayov:ivanayov/gitlab branch from 1e5c131 to 4410916 Feb 7, 2019

@martindekov martindekov referenced this pull request Feb 10, 2019

Closed

Add secrets filter #68

3 of 5 tasks complete

@ivanayov ivanayov force-pushed the ivanayov:ivanayov/gitlab branch from 4410916 to ec30fdf Feb 15, 2019

Show resolved Hide resolved pkg/types/types.go Outdated
Show resolved Hide resolved pkg/types/types.go Outdated
Show resolved Hide resolved templates/stack.yml Outdated

@ivanayov ivanayov force-pushed the ivanayov:ivanayov/gitlab branch from ec30fdf to 2163c19 Feb 20, 2019

Show resolved Hide resolved example.init.yaml Outdated

@ivanayov ivanayov force-pushed the ivanayov:ivanayov/gitlab branch from 2163c19 to cd3cace Feb 22, 2019

@ivanayov

This comment has been minimized.

Copy link
Member Author

ivanayov commented Feb 22, 2019

@alexellis I addressed all comments and tested with TLS and OAuth.
Removed the stack.yml from templates. @zeerorg gave very good proposal, so the gitlab-specific secret is added to git-tar with the gitlab deployment now.

I specified scm config in the init.yaml and removed oauth_provider as it might be confusing when auth is disabled. In code oauth_provider is now taken from the scm.

screen shot 2019-02-22 at 18 59 15

With the dashboard after authorising I have Internal server error creating JWT. Mike Whitehead wrote in slack that he had the same issue and I think it's not ofc-bootstrap related. Might be some problem with the OAuth app. Both jwt-private-key and jwt-public-key are properly created.

@alexellis

This comment has been minimized.

Copy link
Member

alexellis commented Mar 13, 2019

Sounds like we have what we need now 👍 thank you

The last part will be to look at the changes that @martindekov made in #72 and replicate that hear too. A rebase is now needed too.

Alex

Add GitLab integration
This adds GitLab as possible SCM and enables authorisation for it
as well

Signed-off-by: Ivana Yovcheva <iyovcheva@vmware.com>

@ivanayov ivanayov force-pushed the ivanayov:ivanayov/gitlab branch from cd3cace to 4191343 Mar 13, 2019

@ivanayov

This comment has been minimized.

Copy link
Member Author

ivanayov commented Mar 13, 2019

@alexellis it's now rebased

@alexellis

This comment has been minimized.

Copy link
Member

alexellis commented Mar 13, 2019

Thank you for rebasing.

@martindekov

This comment has been minimized.

Copy link
Member

martindekov commented Mar 13, 2019

Hey @ivanayov in types.go I have added the filter scm_gitlab and in main.go you need to derive the feature (scm_gitlab or scm_github) depending on the configuration you chose in init.yaml. You can check the tests for more context I think you might need to fix them in case they fail.

Otherwise if it is too much I can pick that up for you no problems 👍

@alexellis
Copy link
Member

alexellis left a comment

Approved.

@alexellis

This comment has been minimized.

Copy link
Member

alexellis commented Mar 13, 2019

I'll merge Martin please can you take over the final piece?

Alex

@alexellis alexellis merged commit 0ced0df into openfaas-incubator:master Mar 13, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@martindekov martindekov referenced this pull request Mar 14, 2019

Merged

Add secrets filter functionality for GitLab #84

4 of 5 tasks complete

@martindekov martindekov moved this from Review to Merge in Triage - Code/Review/Merge Mar 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.