Skip to main content

DevExpress NuGet Packages and Popular Continuous Integration Systems

  • 4 minutes to read

Important

This topic contains instructions that may be incomplete. Please read the CIS documentation for additional information.

This topic describes how to integrate an application with DevExpress controls into GitHub, GitLab, Azure DevOps, JFrog Artifactory, and Nexus OSS continuous integration (CI/CD) systems.

GitHub

Create a secret with your DevExpress NuGet credentials for CI/CD operations. You must be the repository owner to create secrets for an environment in a personal account.

  1. Navigate to the main page of the repository and click Settings. github settings
  2. In the Security section of the sidebar, select Secrets and variables | Actions.
  3. Click New repository secret in the Secrets tab.
  4. Set your personal authorization key as the secret value. github new secret
  5. Pass your secret name to GitHub Actions CLI scripts as an environment variable. GitHub Actions can only read a secret if you explicitly include the secret in a workflow. Enclose the secret’s name within the quoting rules when you pass a secret in the command line. This is required to avoid special characters that may affect your shell.

    - name: Register DevExpress Source
      run: dotnet nuget add source https://nuget.devexpress.com/api/v3/index.json -p ${{ secrets.DEVEXPRESS_SECRET }} -u DevExpress -n devexpress-nuget
    

Refer to the following article for more information on how to use secrets in the GitHub workflow: Using secrets in a workflow.

GitLab

  1. Open your project CI/CD settings (Settings > CI/CD):

    GitLab - Open Project CI/CD Settings

  2. Add a new variable.

    • Click Expand.
    • Click Add variable.

      GitLab - Add Variable

  3. Specify variable parameters:

    Important

    Select the Masked option.

    GitLab - Specify Variable Parameters

  4. Pass your variable’s Key (a secret name) to GitLab CLI scripts as an environment variable. The variable’s Value will be masked in job logs during dotnet build or dotnet restore command execution (Example: gitlab-ci.yml).

    build-job:
        script:
            - dotnet build --source "https://api.nuget.org/v3/index.json" --source "https://nuget.devexpress.com/$DEVEXPRESS_API/api/v3/index.json"
    

    Note

    If the dotnet build and restore are separated into separate lines/steps, run the restore first. Then run the build command with --no-restore flag.

Azure DevOps

Azure DevOps does not support custom upstream NuGet sources. Use the NuGet.config file to configure the system.

  1. Obtain your NuGet feed credentials.
  2. Add the NuGet.config file next to the .sln file in your project.
  3. Add a package source with your DevExpress NuGet feed URL to the NuGet.config file.

The next steps depend on whether you use an authorization key or feed URL.

Feed Authorization Key

  1. Specify content of the Nuget.config file as follows:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <packageSources>
        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
        <add key="DevExpress Feed" value="https://nuget.devexpress.com/api/v3/index.json" />
      </packageSources>
    </configuration>
    
  2. Add a new build pipeline.

  3. Add a new NuGet restore task to the pipeline and configure it to work with NuGet.config. You should specify the following settings:

    Settings Values
    Command restore
    Feeds to use Feeds in my NuGet.config
    Path to NuGet.config Path to your NuGet.config file
  4. Click the New/Add button to add feed credentials.

    Azure Task with Credentials

  5. Specify the connection settings as shown below and save them.

    Azure Connection Settings

NuGet Feed URL

  1. Specify content of the Nuget.config file as follows:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <packageSources>
        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
        <add key="DevExpress Nuget server" value="https://nuget.devexpress.com/{Your feed authorization key}/api/v3/index.json" />
      </packageSources>
    </configuration>
    
  2. Add a new build pipeline.

  3. Add a new NuGet restore task to the pipeline and configure it to work with NuGet.config. You should specify the following settings:

    Settings Values
    Command restore
    Feeds to use Feeds in my NuGet.config
    Path to NuGet.config Path to your NuGet.config file

Note

Storing credentials in a NuGet.config file (especially when saving NuGet.config to your source control) is risky because it can lead to credential leakage. If you store credentials in NuGet.config, please consider using a more secure option as described in Consuming packages from authenticated feeds and How to Protect Your Private NuGet Feed and Safely Consume the Feed From External Systems.

JFrog Artifactory

  1. Obtain your NuGet feed credentials.

  2. Create a new remote repository in Artifactory with the following settings:

    Settings Values
    URL https://nuget.devexpress.com/
    NuGet Download Context Path api/v2/package
    NuGet Feed Context Path api/v2
    NuGet v3 Feed URL https://nuget.devexpress.com/api/v3/index.json

JFrog Repository

JFrog Artifactory creates a NuGet feed on the jFrog server.

Read the following help topic for additional information: JFrog Artifactory – Set Up Remote NuGet Repositories.

Nexus OSS

  1. Obtain your NuGet feed credentials.

  2. Create a new remote repository with the following settings.

    Settings Values
    Format nuget
    Type proxy
    Remote Storage https://nuget.devexpress.com/{Your feed authorization key}/api/v3/index.json

Nexus OSS Repository

Nexus OSS creates a proxy URL feed with access to the DevExpress NuGet packages.

See Also