• Jenkins credentials


    environment {
    MAGE_REPO_CREDENTIALS = credentials('COMPOSER_REPO_MAGENTO')
    COMPOSER_AUTH = """{
      "http-basic": {
          "repo.magento.com": {
              "username": "${env.MAGE_REPO_CREDENTIALS_USR}",
              "password": "${env.MAGE_REPO_CREDENTIALS_PSW}"
          }
      } }"""
    }
    

      

    withCredentials([usernamePassword(credentialsId: 'amazon', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
    // available as an env variable, but will be masked if you try to print it out any which way
    // note: single quotes prevent Groovy interpolation; expansion is by Bourne Shell, which is what you want
    sh 'echo $PASSWORD'
    // also available as a Groovy variable
    echo USERNAME
    // or inside double quotes for string interpolation
    echo "username is $USERNAME"
    }

    Reference

    https://www.cnblogs.com/FLY_DREAM/p/13888423.html

  • 相关阅读:
    expandafter
    又回到了kde
    朗读软件
    tex bookmarks
    vim命令执行时间
    vim,tex的编译
    utorrent
    火狐的扩展
    linux 无线指示灯闪
    tex溢出报警
  • 原文地址:https://www.cnblogs.com/i-shu/p/14817860.html
Copyright © 2020-2023  润新知