diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c3c313d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,20 @@ +name: Build +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] +jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/openstack_registration/openstack_registration/settings.py b/openstack_registration/openstack_registration/settings.py index 8e12e3e..caa609d 100755 --- a/openstack_registration/openstack_registration/settings.py +++ b/openstack_registration/openstack_registration/settings.py @@ -156,10 +156,6 @@ AUTH_LDAP_SERVER_URI = config.get('AUTH', 'server') AUTH_LDAP_BIND_DN = config.get('AUTH', 'bind_dn') AUTH_LDAP_BIND_PASSWORD = config.get('AUTH', 'password') -# AUTH_LDAP_USER_SEARCH = LDAPSearch(config.get('AUTH', -# 'user_search'), -# ldap.SCOPE_SUBTREE, -# "(samaccountname=%(user)s)") AUTH_LDAP_USER_SEARCH = LDAPSearch(config.get('AUTH', 'user_search'), ldap.SCOPE_SUBTREE, diff --git a/sonar-project.properties b/sonar-project.properties index 5f37f3e..0519529 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,14 +1,15 @@ -# must be unique in a given SonarQube instance -sonar.projectKey=os-registration -# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1. -sonar.projectName=OpenStack Registration -sonar.projectVersion=1.0 +sonar.projectKey=guillaume-philippon_openstack-register +sonar.organization=guillaume-philippon-github + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=openstack-register +#sonar.projectVersion=1.0 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. -# Since SonarQube 4.2, this property is optional if sonar.modules is set. -# If not set, SonarQube starts looking for source code from the directory containing -# the sonar-project.properties file. -sonar.sources=openstack_registration +#sonar.sources=. + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8 # Exclude static directory sonar.exclusions=openstack_registration/registration/static/**