# Travis CI Integration

### Introduction <a href="#introduction" id="introduction"></a>

`TravisCI` is a hosted continuous integration service used to build and test software projects hosted on GitHub and Bitbucket.

{% hint style="info" %}
The following configuration examples show how to install & run the scanner using an API Token stored as a secret named `XYGENI_TOKEN`. See [Generate Xygeni API Token for Scanner](/xygeni-administration/platform-administration/profile.md#generate_token_for_scanner-1) or ask your Xygeni administrator to generate it.

See [encrypted environment variables](https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml) to encrypt the token for use in TravisCI jobs.
{% endhint %}

### Using the installation script <a href="#using_the_installation_script" id="using_the_installation_script"></a>

You may automatically install the scanner using the installation script available from `https://get.xygeni.io/latest/scanner/TYPE`, with TYPE either `bash` or `powershell`:

```linenums
language: ruby

jobs:
  include:
    - stage: "Install Xygeni scanner"
      script:
        - >
         curl -L https://get.xygeni.io/latest/scanner/install.sh |
         /bin/bash -s -- -o -t $XYGENI_TOKEN

    - stage: "Scan for issues"
      script:
        - >
          $HOME/xygeni_scanner/xygeni scan
          -n $PROJECT_NAME --dir $PROJECT_HOME
```

{% hint style="info" %}
See [installation script](broken://pages/59McToAtqMTiQ6TEYVgQ) for more details.

Please refer to the [scanner documentation](/xygeni-scanner-cli/xygeni-cli-overview.md) for full details on the scanner command line options and configuration.
{% endhint %}

### Using the docker image <a href="#using_the_docker_image" id="using_the_docker_image"></a>

If it is not possible to install the scanner in the BitBuket host running the pipeline, you may run the docker image instead:

```linenums
language: ruby

jobs:
  include:
    - stage: "Scan for issues"
      script:
        - >
          docker run
            -v $PROJECT_HOME:/app
            -v $DD_CONF:/opt/xygeni_scanner/conf
            -t -rm
            xygeni_scanner/xygeni scan
            -n $PROJECT_NAME --dir /app
```

{% hint style="info" %}
See [Xygeni Scanner docker image](/xygeni-scanner-cli/xygeni-cli-overview/xygeni-cli-docker-image.md) for more details.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xygeni.io/xygeni-administration/platform-administration/integrations/integrate-scanner-cli-into-ci-cd-systems/travis-ci-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
