Skip to content

notder/azure-pipelines-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub

Azure Pepelines NodeJS Docker Images

This image using nodejs official image for run self-hosted agents on Azure Pipelines

Supported tags and respective Dockerfile links

Build image

docker build --build-arg NODE_VERSION=8 -t azure-pipelines-nodejs:8 .

Environment Variable Example

AZURE_REPOSITORY_URL: https://dev.azure.com/{your_organization}
AZURE_TOKEN: XXXXXXXXXXXXXXXXXXXXXX Setup
AZURE_POOL: nodejs Setup (https://dev.azure.com/{your_organization}/_settings/agentpools)
AGENT_NAME: node-12

Run docker

docker run -e AZP_URL=[AZURE_REPOSITORY_URL] -e AZP_TOKEN=[AZURE_TOKEN] -e AZP_AGENT_NAME=[AGENT_NAME] -e AZP_POOL=[AZURE_POOL] --name [CONTAINER_NAME] notder/azure-pipelines-nodejs:[TAG_NAME]

Run docker-compose.yml

version: '3'
services:
  nodejs-12:
    image: notder/azure-pipelines-nodejs:12
    environment:
      AZP_POOL: nodejs
      AZP_AGENT_NAME: nodejs-12
      AZP_URL: https://dev.azure.com/{your_organization}
      AZP_TOKEN: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    restart: always
    networks:
      - azure-nodejs-12-network

networks:
  azure-nodejs-12-network:
    driver: bridge

Example azure_pipelines.yml

trigger:
  branches:
    include:
    - master
    - develop

jobs:
- job: build
  pool: 
    name: nodejs
  variables:
    COMMIT_ID: '$(Build.SourceVersion)'
  steps:
  - script: |
      npm install
      npm run build:prod
    displayName: 'NPM RUN BUILD'

Releases

No releases published

Packages

No packages published