Coder Social home page Coder Social logo

dsv-ado-buildtask's Introduction

The Thycotic DevOps Secrets Vault Azure DevOps Task

This repository contains the code for an Azure DevOps pipeline task which is used to read secrets from Thycotic DevOps Secrets Vault.

Prerequisites

General

The task code can be found in the DSVV1 directory. The entry point for the task is index.ts and most of the core code can be found in operations/Vault.ts.

Compiling

From the task directory DSVV1, first install the task dependencies:

DSVV1> npm install

Then to compile the task:

DSVV1> tsc

Debugging

Create a launch.json in your .vscode directory:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "program": "${workspaceFolder}\\DSVV1\\index.ts",
            "outFiles": [
                "${workspaceFolder}/**/*.js"
            ],
            "env": {
                "INPUT_CLIENTID": "93d866d4-635f-4d4e-9ce3-0ef7f879f319",
                "INPUT_CLIENTSECRET": "xxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxx-xxxxx",
                "INPUT_SERVERURL": "https://mytenent.secretsvaultcloud.com/v1/",
                "INPUT_SECRETPATH": "/valid/secret",
                "INPUT_DATAFILTER": "*",
                "INPUT_VARIABLEPREFIX": "DSV_"
            }
        }
    ]
}

From the 'Run' menu, select 'Start Debugging' OR F5.

Unit Tests

Create a success_config.json in the DSVV1\tests directory:

{
    "credentials": {
        "clientId": "93d866d4-635f-4d4e-9ce3-0ef7f879f319",
        "clientSecret": "xxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxx-xxxxx"
    },
    "serverUrl": "https://mytenant.secretsvaultcloud.com/v1/",
    "secretPath": "/valid/secret",
    "dataFilter": "*",
    "variablePrefix": "DSV_"
}

Create a failure_config.json in the DSVV1\tests directory:

{
    "credentials": {
        "clientId": "93d866d4-635f-4d4e-9ce3-0ef7f879f319",
        "clientSecret": "xxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxx-xxxxx"
    },
    "serverUrl": "https://mytenant.secretsvaultcloud.com/v1/",
    "secretPath": "/invalid/secret",
    "dataFilter": "*",
    "variablePrefix": "DSV_"
}

From the task directory DSVV1, run the following:

DSVV1> mocha .\tests\_suite.js

Packaging the extension

Package the extension into a .vsix file using the following command from the repository root:

> tfx extension create --manifest-globs vss-extension.json

Note, the version in vss-extension.json must match the one in DSVV1/task.json.

dsv-ado-buildtask's People

Contributors

amigus avatar dependabot[bot] avatar endlesstrax avatar pvanulden avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.