Giter Club home page Giter Club logo

pipelines-codespaces-tailspin's Introduction

Demo: Complete an Azure Pipelines Learn interactive module with GitHub Codespaces

This is a demo repository for testing Azure DevOps-focused Learn interactive modules with GitHub Codespaces.

You can use this repo to:

Prerequisites

  • A GitHub account
  • An Azure DevOps organization

Fork the sample code

For the following repository:

https://github.com/juliakm/pipelines-codespaces-tailspin.git

Create an Azure DevOps personal access token (PAT)

You'll need to create a new PAT to use with your self-hosted agent.

  1. Go to https://dev.azure.com/{yourorganization}.

  2. Create a new PAT with the scope Agent Pools (Read & manage) and Deployment Groups (Read & manage).

  3. Copy the PAT token value and store it in a secure space. You'll use the PAT token as a GitHub secret value.

Create GitHub Secrets

You'll create GitHub secrets to run with your Azure DevOps self-hosted agent.

  1. In your GitHub repository, select Settings > Secrets and variables > Codespaces.

    Screenshot of Codespaces secret

  2. Create three new Codespaces secrets.

    Name Value
    ADO_ORG Name of the Azure DevOps organization (Example: fabrikam)
    ADO_PAT Personal Access Token value
    ADO_POOL_NAME Name of agent pool (Example: codespaces-agent-pool)

Build your Codespace

  1. In your forked GitHub repository, select Code.

  2. Select the Codespaces tab.

  3. Press ... to create a new Codespace with options.

    Create new Codespace with options.

  4. Select the AzurePipelines Codespace option at .devcontainer/ADOagent/devcontainer.json and Create codespace. Leave the other default options.

    Select Azure DevOps Codespace option.

  5. Wait for your Codespace to build. When the build completes, you'll be redirected to an online version of Visual Studio Code.

Complete Learn module

  1. Go to Create a build pipeline with Azure Pipelines and start the module.

  2. When see references to the hosted Ubuntu agent, replace the code snippet with a reference to your self-hosted agent.

    Remove this section of the YAML pipeline.

    pool:
      vmImage: 'ubuntu-22.04'

    Add this section of the YAML pipeline.

        pool:
          name: 'codespaces-agent-pool'

Notes

When working on the module, you can test out your code in the browser with GitHub Codespaces port forwarding.

pipelines-codespaces-tailspin's People

Contributors

juliakm avatar

Watchers

 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.