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

Toggle LDAP/ACL #40

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

Conversation

RobertNorthard
Copy link
Contributor

@RobertNorthard RobertNorthard commented Feb 23, 2017

As a platform user,
I want to be able to toggle ACL.

This is dependent on ADOP_ACL_ENABLED environment variable for adop-docker-compose for Jenkins.

Dependent on;

}
credentialsBinding {
usernamePassword("LDAP_ADMIN_USER", "LDAP_ADMIN_PASSWORD", "adop-ldap-admin")
if("${ADOP_LDAP_ENABLED}" == "true")
Copy link
Contributor

Choose a reason for hiding this comment

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

This variable ADOP_LDAP_ENABLED needs to appear:
a) In the compose file for jenkins
b) Injected as a global env variable here: https://github.com/Accenture/adop-jenkins/blob/master/resources/init.groovy.d/adop_general.groovy

Copy link
Contributor Author

@RobertNorthard RobertNorthard Feb 23, 2017

Choose a reason for hiding this comment

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

  • It'll also need the ACL env variable defined in the compose file and injected.
  • Strings should also use content rather than reference equality.

@RobertNorthard RobertNorthard force-pushed the feature/adop-acl-toggle branch 4 times, most recently from 41d55e2 to 1bc4911 Compare February 23, 2017 19:49
@nickdgriffin
Copy link
Contributor

nickdgriffin commented Feb 27, 2017

I'm wondering if we should flip the logic in the interest of backwards compatibility? If someone is on an older version of the Jenkins image they won't have the environment variables which means the jobs will be generated with sections missing and it won't be obvious why.

${WORKSPACE}/common/gerrit/create_user.sh -g http://gerrit:8080/gerrit -u "${username}" -p "${username}"
done''')
dsl {
external("workspaces/jobs/**/*.groovy")
Copy link
Contributor

Choose a reason for hiding this comment

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

We need this line!

# Generate second permission repo with enabled code-review
source ${WORKSPACE}/projects/gerrit/configure.sh -r permissions-with-review''')
dsl {
external("projects/jobs/**/*.groovy")
Copy link
Contributor

Choose a reason for hiding this comment

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

We need this line!

@RobertNorthard RobertNorthard force-pushed the feature/adop-acl-toggle branch 5 times, most recently from 0449df1 to c6113bf Compare February 27, 2017 23:55
@ghost
Copy link

ghost commented Feb 28, 2017

PR submitted for Load_Platform to read global variables instead of environment variables:

Going to test ACL/LDAP toggling.

@RobertNorthard RobertNorthard force-pushed the feature/adop-acl-toggle branch 2 times, most recently from d5b806b to 97a827b Compare March 1, 2017 11:22
@RobertNorthard
Copy link
Contributor Author

RobertNorthard commented Mar 8, 2017

I have tested the following scenarios.

  • ADOP ACL and LDAP enabled environment variables set to true.
  • ADOP ACL set to false and LDAP true.
  • ADOP LDAP set to false and ACL false.
  • ADOP LDAP/ACL set to false.

The ADOP LDAP environment variable is set in the adop-docker-compose for Jenkins.

This PR can be merged on it's own.

@RobertNorthard
Copy link
Contributor Author

@SachinKSingh28 I've merged Maris changes so this will need another review.

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

Successfully merging this pull request may close these issues.

4 participants