Repository Connectors

Artifactory

Description

Download file(s) from an Artifactory URL.

This repository uses an Artifactory URL. If the URL targets a folder then the Artifactory API is used.

Make sure that the API URL looks like http://your-domain/artifactory/api/storage and the API calls are opened.

  • If in your environment:

    • you use another name for Artifactory, you can change it in the form.xml (baseUri value) with your own.

    • you don’t have a name for Artifactory, you can change it in the form.xml (baseUri value) with the URL without the http.

Usage

Artifactory has the following options:

  • URL (url, mandatory): Specify the Artifactory URL for the files you want to include in the analysis. Example: https://my-url/artifactory/api/storage/myRepo/com/my/organization.

  • What is the URL target ? (isFolder, default: false): Choose whether the URL points towards a file or a folder.

  • Recursive search (searchRecursive, default: true): Find files in directories and sub-directories.

  • Files filtering pattern (filterPattern): Specify a regular expression to filter file(s) to download. Only files with a name matching the regular expression will be downloaded. For example:

    • *.c ⇒ to download all files containing the "c" character

    • *\.c ⇒ to download all files containing the ".c" substring

    • *\.c$ ⇒ to download all files ending with ".c" substring

    • *20211210*xml ⇒ to download all files containing "20211210" and "xml" substrings

  • Unzip files (unzipFile, default: false): Check this box, if zip files have to be unzipped by the repository connector.

  • Authentication (useAccountCredentials, default: NO_CREDENTIALS): Possible values for authentication are:

    • No credentials : Used when authentication is not required.

    • Use my Squore credentials : If the login/password are the same between Squore and the tool authentication.

    • Define credentials : To be prompted for login/password to authenticate with the external tool.

    • Use token : To be prompted for the token to authenticate with the external tool.

  • Username (username):

  • Password (password, mandatory):

  • Token (token, mandatory):

  • Use proxy (useProxy, default: false): If Squore is behind a proxy and needs to access the outside, you can configure the different properties by selecting the checkbox.

  • Hostname (proxyHost): Configure the hostname (it's the same for http or https protocol). Example: my-company-proxy.com.

  • Port (proxyPort): Configure the port (it's the same for http or https protocol). Example: 2892.

  • Proxy user (proxyUser): Configure the proxy user if authentication is required.

  • Proxy password (proxyPassword): Configure the proxy user password if authentication is required.

In addition the following options are avaiable on command line:

  • baseUri(default: artifactory): Specify the base URI without protocol. For example, in https://myArt/artifactory the base URI is myArt/artifactory .

  • logLevel(default: INFO): Specify the log level to be used (ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF, TRACE).

    The default is INFO.

The full command line syntax for Artifactory is:

-r "type=artifactory,url=[text],isFolder=[multipleChoice],searchRecursive=[booleanChoice],filterPattern=[text],unzipFile=[booleanChoice],useAccountCredentials=[multipleChoice],username=[text],password=[password],token=[token],useProxy=[booleanChoice],proxyHost=[text],proxyPort=[text],proxyUser=[text],proxyPassword=[password],baseUri=[text],logLevel=[text]"

ClearCase

Description

IBM Rational ClearCase is a software configuration management solution that provides version control, workspace management, parallel development support, and build auditing. The command executed on the server to check out source code is: $cleartool $view_root_path $view $vob_root_path.

Prior to using this repository connector, the path to the cleartool command has to be configured in the config.xml file located in the root directory of the Squore server or the Squore client:

<path name="cleartool" path="path_to_cleartool_executable"/>

Usage

ClearCase has the following options:

  • View root path (view_root_path, mandatory, default: /view): Specify the absolute path of the ClearCase view.

  • Vob root path (vob_root_path, mandatory, default: /projets): Specify the absolute path of the ClearCase vob.

  • View (view): Specify the label of the view to analyse sources from. If no view is specified, the current ClearCase view will be used automatically, as retrieved by the command cleartool pwv -s.

  • Server display view (server_display_view): When viewing source code from the Explorer after building the project, this parameter is used instead of the view parameter specified earlier. Leave this field empty to use the same value as for view.

  • Sources path (sub_path): Specify a path in the view to restrict the scope of the source code to analyse. The value of this field must not contain the vob nor the view. Leave this field empty to analyse the code in the entire view. This parameter is only necessary if you want to restrict to a directory lower than root.

The full command line syntax for ClearCase is:

-r "type=ClearCase,view_root_path=[text],vob_root_path=[text],view=[text],server_display_view=[text],sub_path=[text]"

Folder Path

Description

The simplest method to analyse source code in Squore is to provide a path to a folder containing your code.

Remember that the path supplied for the analysis is a path local to the machine running the analysis, which may be different from your local machine. If you analyse source code on your local machine and then send results to the server, you will not be able to view the source code directly in Squore, since it will not have access to the source code on the other machine. A common workaround to this problem is to use UNC paths (\\Server\Share, smb://server/share…​) or a mapped server drive in Windows.

Usage

Folder Path has the following options:

  • Datapath (path, mandatory):

    • Absolute Path: the absolute path to the folder containing the files you want to include in the analysis. The path specified must be accessible from the server and user must have Access Server Resources permission.

    • Authorized Paths: a list of server paths accessible for all users, regardless of the Access Server Resources permission. This list can only be configured by a Squore administrator : Configure Authorized Server Paths.

The full command line syntax for Folder Path is:

-r "type=FROMPATH,path=[text]"

Git

Description

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

For more details, refer to http://git-scm.com/.

Prior to using this repository connector, the path to the git command have to be configured in the config.xml file located in the root directory of the Squore server or the Squore client:

<path name="git" path="path_to_git_executable"/>

The following is a list of commands used by the Git Repository Connector to retrieve sources:

git clone [$username:$password@]$url $tmpFolder
git checkout $commit
git log -1 "--format=%H"
git config --get

remote.origin.url
git clone [$username:$password@]$url $tmpFolder
git checkout $commit
git fetch
git --git-dir=$gitRoot show $artefactPath

Git 1.7.1 is known to fail with a fatal: HTTP request failed error on CentOS 6.9. For this OS, it is recommended to upgrade to git 2.9 as provided by software collections on https://www.softwarecollections.org/en/scls/rhscl/rh-git29/ and point to the new binary in git_config.tcl or make the change permanent as described on https://access.redhat.com/solutions/527703.

Usage

Git has the following options:

  • URL (url, mandatory): URL of the git repository to get files from. The local, HTTP(s), SSH and Git protocols are supported.

  • Branch or commit (commit): This field allows specifying the SHA1 of a commit or a branch name. If a SHA1 is specified, it will be retieved from the default branch. If a branch label is specified, then its latest commit is analysed. Leave this field empty to analyse the latest commit of the default branch.

  • Sub-directory (subDir): Specify a subfolder name if you want to restrict the analysis to a subpath of the repository root.

  • Include submodules (includeSubmodules): Clone submodules in their destination. Credentials will only be applied to sub-submodules with the same host as the parent.

  • Include commit metrics (includeCommit): Retrieve information about commits. Include commit artifacts creates commit artifacts for each commit between the two revisions. Include commit data computes and associates data relating to commit to the relevant artifacts.

  • Commits Node Label (commitNodeName, default: Commits): Specify a custom label for your commit node. Note: this option should not be modified. You should use "Add a 'Source Code' node" option in Squore Analyser. When left blank, it defaults to "Commits".

  • Include code churn on all commits (subCommitDiff, default: true): When set to false only the main branch will have churn data (commit loc added/removed/modified) if set to true the churn are computed on all sub-branches. This can increase processing time by a large factor.

  • Ticket regex (ticketRegex): Regular expresion separated by ";" to look for in the commits to link commits and ticket, for example (JR-\d*).

  • Authentication (useAccountCredentials, default: NO_CREDENTIALS): Possible values for authentication are

    • No credentials : Used when the underlying Git is open and does not require authetication

    • Use my Squore credentials : If the login/password are the same between Squore and the underlying Git

    • Define credentials : To be prompted for login/password

    • Use token : To be prompted for the token to authenticate with Git

  • Username (username):

  • Password (password, mandatory):

  • Token (token, mandatory):

In addition the following options are avaiable on command line:

  • logLevel(default: INFO): Specify the log level to be used (ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF, TRACE).

    The default is INFO

  • gitExport(default: export): Git export command default to "export".

  • gitClone(default: clone -c core.longpaths=true): Git clone command default to "clone -c core.longpaths=true".

  • gitInfo(default: info): Git info command default to "info".

  • gitCmdTimeout(default: 60000): Git default timeout set on "60000" seconds.

  • gitLog(default: log): Git log command default to "log" used when including commits.

  • gitDiff(default: diff): Git diff command default to "diff" used when including commits.

The full command line syntax for Git is:

-r "type=Git,url=[text],commit=[text],subDir=[text],includeSubmodules=[booleanChoice],includeCommit=[booleanChoice],commitNodeName=[text],subCommitDiff=[booleanChoice],ticketRegex=[text],useAccountCredentials=[multipleChoice],username=[text],password=[password],token=[token],logLevel=[text],gitExport=[text],gitClone=[text],gitInfo=[text],gitCmdTimeout=[text],gitLog=[text],gitDiff=[text]"

Mercurial

Description

Mercurial is a free, distributed source control management tool. It efficiently handles projects of any size and offers an easy and intuitive interface.

For more details, refer to https://www.mercurial-scm.org/.

If the repository uses svn or git sub-repository, Mercurial must be configured to allow these sub-repositories, see Mercurial documentation https://www.mercurial-scm.org/doc/hgrc.5.html#subrepos.

Prior to using this repository connector, the path to the hg command has to be configured in the config.xml file located in the root directory of the Squore server or the Squore client:

<path name="hg" path="path_to_hg_executable"/>

The following is a list of commands used by the Mercurial Repository Connector to retrieve sources. Command parameters can be changed in the file <SQUORE_HOME>/configuration/repositoryConnectors/mercurial/form.xml if needed. See also below command line options hgClone, hgUpdate, hgPull, hgCat and hgLog):

hg clone [$username:$password@]$url $tmpFolder
hg update $revision
hg pull -f [$username:$password@]$url
hg cat $artefactPath -r $revision -o $tmpFolder
hg id -i

Usage

Mercurial has the following options:

  • URL (url, mandatory): URL of the Mercurial repository to get files from. The HTTP(s) and SSH protocols are supported.

  • Branch or revision (revision): Leave this field empty to analyze the latest commit of the default branch.

  • Sub-directory (subDir): Specify a subfolder name if you want to restrict the analysis to a subpath of the repository root.

  • Authentication (useAccountCredentials, default: NO_CREDENTIALS): Possible values for authentication are

    • No credentials : Used when the underlying Git is open and does not require authetication

    • Use my Squore credentials : If the login/password are the same between Squore and the underlying Git

    • Define credentials : To be prompted for login/password

  • Username (username):

  • Password (password, mandatory):

In addition the following options are avaiable on command line:

  • logLevel(default: INFO): Specify the log level to be used (ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF, TRACE).

    The default is INFO

  • hgClone(default: clone): Mercurial clone command default to "clone".

  • hgCat(default: cat): Command used to save a file by its revision, default "cat".

  • hgLog(default: id -i): Command used to find the current revision of Mercurial repository, default "id -i".

  • hgPull(default: pull -f): Command used to synchronize local repository with the remote, default "pull -f".

  • hgUpdate(default: update): Command used to update a repository to the given revision, default "update".

  • hgCmdTimeout(default: 60000): Mercurial default timeout set on "60000" seconds.

The full command line syntax for Mercurial is:

-r "type=mercurial,url=[text],revision=[text],subDir=[text],useAccountCredentials=[multipleChoice],username=[text],password=[password],logLevel=[text],hgClone=[text],hgCat=[text],hgLog=[text],hgPull=[text],hgUpdate=[text],hgCmdTimeout=[text]"

OneDrive

Description

Retrieve sources using a OneDrive URL.

Some configuration is needed before being able to use this repository connector. Which can be described in the following three steps:

  • Creating Azure AD application with access permissions.

  • Adding Azure credentials to Squore server.

  • Configuring OneDrive repository connector itself.

Creating Azure AD application with access permissions

In order for the OneDrive repository connector to work you need to have an Azure AD application running with the adequate access permissions. Here are some guidelines on how to do so:

It is possible to find more information in the Overview section of your Azure AD application.

Adding Azure credentials to Squore server

To add your credentials in Squore server follow the steps described in the documentation section, Managing Credentials, where:

Configuring OneDrive repository connector itself

In order for the reposiory connector to work, you need to define some parameters in the application.properies file located in $SQUORE_HOME/configuration/repositoryConnectors/onedrive, where:

By default, the repository connector uses Microsoft Graph API but you can also use Sharepoint API . If so, just replace the scope and resource parameters with:

Additionally, you will also need to update the form.xml file and replace the two occurences of @microsoft.graph.downloadUrl by @content.downloadUrl .

Usage

OneDrive has the following options:

  • URL (url, mandatory): Specify the OneDrive API URL to the directory containing the files you want to analyze. To know more about Microsoft Graph Files APIs:

  • Recursive search (searchRecursive, default: true): Find files in directories and sub-directories.

  • Files filtering pattern (filterPattern): Specify a regular expression to filter file(s) to download. Only files with a name matching the regular expression will be downloaded. For example:

    • *.c ⇒ to download all files containing the "c" character

    • *\.c ⇒ to download all files containing the ".c" substring

    • *\.c$ ⇒ to download all files ending with ".c" substring

    • *20211210*xml ⇒ to download all files containing "20211210" and "xml" substrings

  • Unzip files (unzipFile, default: false): Check this box, if zip files have to be unzipped by the repository connector.

  • Authentication (useAccountCredentials, default: NO_CREDENTIALS): Possible values for authentication are:

    • No credentials : Used when authentication is not required.

    • Use my Squore credentials : If the login/password are the same between Squore and the tool authentication.

    • Define credentials : To be prompted for login/password to authenticate with the external tool.

    • Use token : To be prompted for the token to authenticate with the external tool.

  • Username (username):

  • Password (password, mandatory):

  • Token (token, mandatory):

  • Use proxy (useProxy, default: false): If Squore is behind a proxy and needs to access the outside, you can configure the different properties by selecting the checkbox.

  • Hostname (proxyHost): Configure the host name (it's the same for http or https protocol). Example: my-company-proxy.com.

  • Port (proxyPort): Configure the port (it's the same for http or https protocol). Example: 2892.

  • Proxy user (proxyUser): Configure the proxy user if authentication is required.

  • Proxy password (proxyPassword): Configure the proxy user password if authentication is required.

In addition the following options are avaiable on command line:

  • logLevel(default: INFO): Specify the log level to be used (ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF, TRACE).

    The default is INFO.

The full command line syntax for OneDrive is:

-r "type=onedrive,url=[text],searchRecursive=[booleanChoice],filterPattern=[text],unzipFile=[booleanChoice],useAccountCredentials=[multipleChoice],username=[text],password=[password],token=[token],useProxy=[booleanChoice],proxyHost=[text],proxyPort=[text],proxyUser=[text],proxyPassword=[password],logLevel=[text]"

PTC Integrity

Description

This Repository Connector allows analysing sources hosted in PTC Integrity, a software system lifecycle management and application lifecycle management platform developed by PTC.

For more details, refer to http://www.ptc.com/products/integrity/.

Prior to using this repository connector, the paths to the si and mksAPIViewer commands have to be configured in the config.xml file located in the root directory of the Squore server or the Squore client:

<path name="si" path="path_to_si_executable"/>

<path name="mksAPIViewer" path="path_to_mksAPIViewer_executable"/>

For versions that do not support the --xmlapi option for command viewproject, you can also turn off this method of retrieving file information. This value can be changed in the file <SQUORE_HOME>/configuration/repositoryConnectors/MKS/form.xml if needed.

Usage

PTC Integrity has the following options:

  • Server hostname (hostname, mandatory): Specify the name of the Integrity server. This value is passed to the command line using the parameter --hostname.

  • Port (port): Specify the port used to connect to the Integrity server. This value is passed to the command line using the parameter --port.

  • Project (project): Specify the name of the project containing the sources to be analysed. This value is passed to the command line using the --project parameter.

  • Revision (revision): Specify the revision number for the sources to be analysed. This value is passed to the command line using the --projectRevision parameter.

  • Scope (scope, default: name:.c,name:*.h)*: Specifies the scope (filter) for the Integrity sandbox extraction. This value is passed to the command line using the --scope parameter.

  • Authentication (useAccountCredentials, default: NO_CREDENTIALS): Possible values for authentication are

    • No credentials : Used when the underlying system is open and does not require authentication

    • Use my Squore credentials : If the login/password are the same between Squore and the underlying system

    • Define credentials : To be prompted for login/password

  • Username (username): Username to use if authentication is set to "Define credentials"

  • Password (password): Password to use if authentication is set to "Define credentials"

In addition the following options are avaiable on command line:

  • mksTriesDisconnectOnConnectFailure(default: true): Set to true to try a disconnect and then a new connect when "si connect" failed

  • xmlapi(default: true): Set to true if your MKS version support option --xmlapi for command viewproject

The full command line syntax for PTC Integrity is:

-r "type=MKS,hostname=[text],port=[text],project=[text],revision=[text],scope=[text],useAccountCredentials=[multipleChoice],username=[text],password=[password],mksTriesDisconnectOnConnectFailure=[text],xmlapi=[text]"

REST API URL

Description

Download file(s) from REST API URL.

Usage

REST API URL has the following options:

  • URL (url, mandatory): Specify the REST API URL to download files you want to include in the analysis.

  • Json root path (rootJsonPath): The path of the Json response to retrieve all files to download.

    For example, the value of field is "files" because it's the Json array that contains information about the file:

    {"context": "https://my-repository.com/myFiles",

    "files": [

    {"downloadUrl": "https://my-repository.com/myFiles/FileIWant1.xlsx", …​ },

    {"downloadUrl": "https://my-repository.com/myFiles/FileIWant2.xlsx", …​ }

    ] }

  • Json file path (fileJsonPath): The path to retrieve file.For example, the value of field is "downloadUrl".

    {"context": "https://my-repository.com/myFiles",

    "files": [

    {"downloadUrl": "https://my-repository.com/myFiles/FileIWant1.xlsx", …​ },

    {"downloadUrl": "https://my-repository.com/myFiles/FileIWant2.xlsx", …​ }

    ] }

  • Json file name path (fileNamePath): If the "Json file name path" value doesn't contain the file name, provide the Json path to name the file.For example, the value of field is "fileName".

    {"context": "https://my-repository.com/myFiles",

    "files": [

    {"downloadUrl": "https://my-repository.com/myFiles/5465456456", …​ , "fileName": "FileIWant1.xlsx", …​},

    {"downloadUrl": "https://my-repository.com/myFiles/5456789899", …​ , "fileName": "FileIWant2.xlsx", …​}

    ] }

  • File name (fileName): Specify if the last element of the URL doesn't contain the file name.

    For example the url http://myFile/download?myID=1545456 doesn't contain a file name.

    The url http://myFile/download/myFile.zip has its last element which contains the name of the file and it will be inferred by the application.

  • File extension (fileExtension): If "File Json Path" value or "File Name Json Path" value doesn't contain the extension, it can be provided here.

  • Files filtering pattern (filterPattern): Specify a regular expression to filter file(s) to download. Only files with a name matching the regular expression will be downloaded. For example:

    • *.c ⇒ to download all files containing the "c" character

    • *\.c ⇒ to download all files containing the ".c" substring

    • *\.c$ ⇒ to download all files ending with ".c" substring

    • *20211210*xml ⇒ to download all files containing "20211210" and "xml" substrings

  • Use root URL (useRootUrl, default: false): Check this box, if the "File Json Path" doesn't contains the url to download the file.

  • Root URL (fileRootUrl): The URL to be used to download file. For example, the value of field is "https://my-repository.com/".

    {"context": "myFiles",

    "files": [

    {"downloadUrl": "myFiles/5465456456", …​ , "name": "FileIWant1.xlsx", …​},

    {"downloadUrl": "myFiles/9656789899", …​ , "name": "FileIWant2.xlsx", …​}

    ] }

  • API path (apiPath): Specify if in "From REST API URL" the url (to download the files) is without the API path.

    For example: From REST API URL: https://myArt/artifactory/api/storage/my-first-repo/ the API Path is api/storage/ and files will be downloaded with url https://myArt/artifactory/my-first-repo/file1

  • Recursive search (searchRecursive, default: true): Finds files in directories and sub-directories.

  • Directory Json path (dirJsonPath): The Json path to retrieve directory configuration.

    For example, the value of field is "folder".

    {"context": "https://my-repository.com/myFiles",

    "files": [

    {"uri": "/my-folder", …​ , "folder": "true", …​},

    {"uri": "/my-file", …​ , "folder": "false", …​}

    ] }

    Other example, the value of field is "folder/childCount".

    {"context": "https://my-repository.com/myFiles",

    "files": [

    {"uri": "/my-folder", …​ , "folder": {"childCount": 1}, …​},

    {"uri": "/my-file", …​ , "file": {"name":"my-file"}, …​}

    ] }

  • Directory value configuration (dirJsonPathValue): The value to test to know if it is a directory. This value can be empty if we just want to test the non-empty

    For example, the value of field is "true".

    {"context": "https://my-repository.com/myFiles",

    "files": [

    {"uri": "/my-folder", …​ , "folder": "true", …​},

    {"uri": "/my-file", …​ , "folder": "false", …​}

    ] }

    Other example, the value of field is empty because folder/childCount has no fixed value, it depends on the number of items in the directory

    {"context": "https://my-repository.com/myFiles",

    "files": [

    {"uri": "/my-folder", …​ , "folder": {"childCount": 3}, …​},

    {"uri": "/my-file", …​ , "file": {"name":"my-file"}, …​}

    ] }

  • URL complement (dirSearchConf): If an element as to be added on the URL to search files. For example, for OneDrive this value is: /children.

  • Directory name Json path (dirSearchPath): The Json Path that contains the name of the directory. For example, the value of field is "uri".

    {"context": "https://my-repository.com/myFiles",

    "files": [

    {"uri": "/my-folder", …​ , "folder": "true", …​},

    {"uri": "/my-file", …​ , "folder": "false", …​}

    ] }

  • Unzip files (unzipFile, default: false): Check this box, if zip files have to be unzipped by the repository connector.

  • Authentication (useAccountCredentials, default: NO_CREDENTIALS): Possible values for authentication are:

    • No credentials : Used when authentication is not required.

    • Use my Squore credentials : If the login/password are the same between Squore and the tool authentication.

    • Define credentials : To be prompted for login/password to authenticate with the external tool.

    • Use token : To be prompted for the token to authenticate with the external tool.

  • Username (username):

  • Password (password, mandatory):

  • Token (token, mandatory):

  • Authentication by header (authByHeader): This field may be empty because by default Bearer is used. You can specify here a header that is not Bearer. This header will be associated with the token.

    Example with Artifactory: X-JFrog-Art-Api

    the header in the request will be X-JFrog-Art-Api:token

  • Use proxy (useProxy, default: false): If Squore is behind a proxy and needs to access the outside, you can configure the different properties by selecting the checkbox.

  • Hostname (proxyHost): Configure the host name (it's the same for http or https protocol). Example: my-company-proxy.com

  • Port (proxyPort): Configure the port (it's the same for http or https protocol). Example: 2892

  • Proxy User (proxyUser): Configure the proxy user if authentication is required

  • Proxy Password (proxyPassword): Configure the proxy user password if authentication is required

In addition the following options are avaiable on command line:

  • isApiCall(default: true): Check this box, if the response is of Json type and it contains information to download the desired files.

  • baseUri: Specify the base uri without protocol.

    For example: From URL: https://myArt/artifactory the base uri is myArt/artifactory

  • logLevel(default: INFO): Specify the log level to be used (ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF, TRACE).

    The default is INFO.

  • appPropPath(default: null): Only used for OneDrive Repository Connector. Specify the path to the application.properties file that contains Azure configuration to get the user token. By default this file is in $SQUORE_HOME/configuration/from_onedrive directory.

  • useFileDownloadLink(default: false): If the value of "File Json Path" field contains a direct download links put this option to true. By default it's false.

The full command line syntax for REST API URL is:

-r "type=api_url,url=[text],isApiCall=[booleanChoice],rootJsonPath=[text],fileJsonPath=[text],fileNamePath=[text],fileName=[text],fileExtension=[text],filterPattern=[text],useRootUrl=[booleanChoice],fileRootUrl=[text],baseUri=[text],apiPath=[text],searchRecursive=[booleanChoice],dirJsonPath=[text],dirJsonPathValue=[text],dirSearchConf=[text],dirSearchPath=[text],unzipFile=[booleanChoice],useAccountCredentials=[multipleChoice],username=[text],password=[password],token=[token],authByHeader=[text],useProxy=[booleanChoice],proxyHost=[text],proxyPort=[text],proxyUser=[text],proxyPassword=[password],logLevel=[text],appPropPath=[text],useFileDownloadLink=[booleanChoice]"

SVN

Description

Connecting to an SVN server is supported using svn over ssh, or by using a username and password.

For more details, refer to https://subversion.apache.org/.

Prior to using this repository connector, the path to the svn command has to be configured in the config.xml file located in the root directory of the Squore server or the Squore client:

<path name="svn" path="path_to_svn_executable"/>

The following is a list of commands used by the SVN Repository Connector to retrieve sources. Command parameters can be changed in the file <SQUORE_HOME>/configuration/repositoryConnectors/SVN/form.xml if needed. See also below command line options svn_export, svn_info, svn_external and svn_cmd_timeout):

svn info --xml --non-interactive --no-auth-cache [--username $username] [--password $password] [-r $revision] $url
svn export --force --non-interactive --no-auth-cache [--username $username] [--password $password] [-r $revision] $url

This Repository Connector includes a hybrid SVN mode avoiding an extra checkout of source tree when using the local_path attribute. Consult the reference below for more details.

Usage

SVN has the following options:

  • URL (url, mandatory): Specify the URL of the SVN repository to export and analyse. The following protocols are supported: svn://, svn+ssh://, http://, https:// .

  • Revision (rev): Specify a revision number in this field, or leave it blank to analyse files at the HEAD revision.

  • External references (externals, default: exclude): Specify if when extracting sources from SVN the system should also extract external references.

  • Sources are already extracted in (local_path): Specify a path to a folder where the sources have already been extracted. When using this option, sources are analysed in the specified folder instead of being checked out from SVN. At the end of the analysis, the url and revision numbers are attached to the analysed sources, so that any source code access from the web interface always retrieves files from SVN. This mode is mostly used to save an extra checkout in some continuous integration scenarios.

  • Authentication (useAccountCredentials, default: NO_CREDENTIALS): Possible values for authentication are

    • No credentials : Used when the underlying system is open and does not require authentication

    • Use my Squore credentials : If the login/password are the same between Squore and the underlying system

    • Define credentials : To be prompted for login/password

  • Username (username): Username to use if authentication is set to "Define credentials"

  • Password (password): Password to use if authentication is set to "Define credentials"

In addition the following options are avaiable on command line:

  • logLevel(default: INFO): Specify the log level to be used (ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF, TRACE).

    The default is INFO

  • svn_export(default: export --force --non-interactive --no-auth-cache): Non interactive SVN export command to use for extracting sources from SVN repository.

  • svn_info(default: info --xml --non-interactive --no-auth-cache): Non interactive SVN command to get information in xml format.

  • svn_external(default: propget svn:externals -R --non-interactive --no-auth-cache): Non interactive SVN command to get external information recursively.

  • svn_cmd_timeout(default: 3600000): Timeout to stop SVN commands which could block.

The full command line syntax for SVN is:

-r "type=SVN,logLevel=[text],url=[text],rev=[text],externals=[multipleChoice],local_path=[directory],useAccountCredentials=[multipleChoice],username=[text],password=[password],svn_export=[text],svn_info=[text],svn_external=[text],svn_cmd_timeout=[text]"

URL

Description

Download a unique file from a URL.

Usage

URL has the following options:

  • URL (url, mandatory): Specify the URL targetting the unique file you want to retrieve. Supported protocols are HTTP and HTTPS.

  • File name (fileName): Specify only if the last element of the URL doesn't contain the file name. Otherwise the file name will be automatically inferred by the application. For example:

  • Unzip file (unzipFile, default: false): Check this box if zip file has to be unzipped by the repository connector.

  • Authentication (useAccountCredentials, default: NO_CREDENTIALS): Possible values for authentication are

    • No credentials : Used when authentication is not required.

    • Use my Squore credentials : If the login/password are the same between Squore and the tool authentication.

    • Define credentials : To be prompted for login/password to authenticate with the external tool.

    • Use token : To be prompted for the token to authenticate with the external tool.

  • Username (username):

  • Password (password, mandatory):

  • Token (token, mandatory):

  • Authentication by header (authByHeader): This field may be empty because by default Bearer is used. You can specify here a header that is not Bearer. This header will be associated with the token.

    Example with Artifactory: X-JFrog-Art-Api

    the header in the request will be X-JFrog-Art-Api:token

  • Use proxy (useProxy, default: false): If Squore is behind a proxy and needs to access the outside, you can configure the different properties by selecting the checkbox.

  • Hostname (proxyHost): Configure the proxy hostname (it's the same for http or https protocol). Example: my-company-proxy.com.

  • Port (proxyPort): Configure the proxy port (it's the same for http or https protocol). Example: 2892.

  • Proxy user (proxyUser): Configure the proxy user if authentication is required.

  • Proxy password (proxyPassword): Configure the proxy user password if authentication is required.

In addition the following options are avaiable on command line:

  • logLevel(default: INFO): Specify the log level to be used (ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF, TRACE).

    The default is INFO.

The full command line syntax for URL is:

-r "type=url,url=[text],fileName=[text],unzipFile=[booleanChoice],useAccountCredentials=[multipleChoice],username=[text],password=[password],token=[token],authByHeader=[text],useProxy=[booleanChoice],proxyHost=[text],proxyPort=[text],proxyUser=[text],proxyPassword=[password],logLevel=[text]"

Zip Upload

Description

This Repository Connector allows you to upload a zip file containing your sources to analyse. Select a file to upload in the project wizard, and it will be extracted and analysed on the server.

The contents of the zip file are extracted into Squore Server’s temp folder. If you want to uploaded files to persist, contact your Squore administrator so that the uploaded zip files and extracted sources are moved to a location that is not deleted at each server restart.

Usage

This Repository Connector is only available from the web UI, not from the command line interface.

Using Multiple Nodes

Squore allows using multiple repositories in the same analysis. If your project consists of some code that is spread over two distinct servers or SVN repositories, you can set up your project so that it includes both locations in the project analysis. This is done by labelling each source code node before specifying parameters, as shown below

-r "type=FROMPATH,alias=Node1,path=/home/projects/client-code"
-r "type=FROMPATH,alias=Node2,path=/home/projects/common/lib"

Note that only alphanumeric characters are allowed to be used as labels. In the artefact tree, each node will appear as a separate top-level folder with the label provided at project creation.

Using multiple nodes, you can also analyse sources using different Repository Connectors in the same analysis:

-r "type=FROMPATH,alias=Node1,path=/home/projects/common-config"
-r "type=SVN,alias=Node2,url=svn+ssh://10.10.0.1/var/svn/project/src,rev=HEAD"