• Travis


    https://github.com/travis-ci/travis.rb#installation

    Make sure you have at least Ruby 1.9.3 (2.0.0 recommended) installed.

    https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.6-1/rubyinstaller-devkit-2.6.6-1-x64.exe

    C:WINDOWSsystem32>ruby --version
    ruby 2.6.6p146 (2020-03-31 revision 67876) [x64-mingw32]

    You can check your Ruby version by running ruby -v:

    $ ruby -v
    ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]
    

    On Windows:

    $ gem install travis
    

    Now make sure everything is working:

    $ travis version
    1.8.13
    

    See also Note on Ubuntu below.

    travis login --pro

    Usage #    https://docs.travis-ci.com/user/encryption-keys/#usage

    The easiest way to encrypt something with the public key is to use Travis CLI. This tool is written in Ruby and published as a gem. First, you need to install the gem:

    gem install travis
    
    Bash

    If you are using travis-ci.com instead of travis-ci.org, you need to login first:

    travis login --pro
    
    Bash

    Then, you can use encrypt command to encrypt data (This example assumes you are running the command in your project directory. If not, add -r owner/project):

    travis encrypt SOMEVAR="secretvalue"
    
    Bash

    Or, if you are using travis-ci.com, you will need to add --pro to the CLI:

    travis encrypt --pro SOMEVAR="secretvalue"
    
    Bash

    This will output a string looking something like:

    secure: ".... encrypted data ...."
    
    YAML

    Now you can place it in the .travis.yml file.

    You can also skip the above, and add it automatically by running:

    travis encrypt SOMEVAR="secretvalue" --add
    
    Bash

    Please note that the name of the environment variable and its value are both encoded in the string produced by “travis encrypt.” You must add the entry to your .travis.yml with key “secure” (underneath the “env” key). This makes the environment variable SOMEVAR with value “secretvalue” available to your program.

    You may add multiple entries to your .travis.yml with key “secure.” They will all be available to your program.

    Encrypted values can be used in secure environment variables in the build matrix and notifications.

    Using SonarCloud with Travis CI

    Inspecting code with the SonarQube Scanner #

    Before inspecting your code, you need to:

    1. Create a user authentication token for your account on SonarCloud.
    2. Encrypt this token travis encrypt abcdef0123456789 or define SONAR_TOKEN in your Repository Settings
    3. Find which SonarCloud.io organization you want to push your project on and get its key
    4. Create a sonar-project.properties file for your project (see the documentation).

    Then add the following lines to your .travis.yml file to trigger the analysis:

  • 相关阅读:
    数据结构
    查找算法
    排序算法
    ThreadPoolExecutor
    Python map()函数
    Python惰性序列
    Python iterator迭代器
    Python yield关键字 和 Generator(生成器)
    Python 列表生成式(List Comprehensions)
    Python 迭代(iteration)
  • 原文地址:https://www.cnblogs.com/chucklu/p/12667946.html
Copyright © 2020-2023  润新知