'Azure Pipelines (YAML) Job not running when using job type 'deployment'

Deployment job is not running at all. Returns a failed status without any error message. Here's the test YAML pipeline:

trigger: none

stages:
- stage: Deploy
  jobs:
  - deployment: Deploy_Test
    environment:
      name: 'DOKS-Production'
      resourceName: 'default'
    pool:
      vmImage: 'ubuntu-latest'
    strategy:
      runOnce:
        deploy:
          steps:
          - script: echo deploy stage ran

enter image description here

enter image description here

Oddly when I switch over to the following, it works fine.

jobs:
  - job: Deploy
    displayName: Deploy
    pool:
      vmImage: 'ubuntu-latest'
    steps:
      - script: echo deploy stage ran


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source