As Deno is getting more and more pouplar every day you might want to start using it in your Azure Pipelines. I have created and published Deno Tool Azure DevOps Extension that allows to acquire Deno and run JavaScript and TypeScript scripts.

Download Deno
In order to get Deno to your Azure DevOps agent machine simply add DenoDownload task to your pipeline - it downloads platform specific binary in a given version, caches it for the future use and adds to the PATH environment variable.

- task: DenoDownload@1
  inputs:
    version: 1.0.3

Once this is done you can run Deno scripts in shell or use DenoRun task. With this dedicated run task you have an option to execute scripts either from file using both file system and URL or have your script embeded into YAML file. As you might need some some additional runtime custumization I have added option to set Deno permissions, script arguments and also script cwd

Run Deno script from remote location

- task: DenoRun@1
  inputs:
    filePath: 'https://deno.land/std/examples/welcome.ts'

Run Deno script from file system

- task: DenoRun@1
  inputs:
    filePath: $(System.DefaultWorkingDirectory)/welcome.ts
    cwd: '/tmp'

Run Deno script Inline

- task: DenoRun@1
  inputs:
    targetType: 'inline'
    script: |
      import { existsSync } from 'https://deno.land/std/fs/mod.ts'
      console.log(existsSync('/tmp'))
    permissions: |
      --unstable
      --allow-read

I hope you will like the extension and use it to bring up your DevOps code to another level.

#deno #azure #devops #javascript #typescript

Deno in Azure Pipelines
8.05 GEEK