mattupstate/angular-pipeline-example

View on GitHub
.semaphore/semaphore.yml

Summary

Maintainability
Test Coverage
version: v1.0
name: Build Pipeline
agent:
  machine:
    type: e1-standard-2
    os_image: ubuntu1804
blocks:
  - name: Build
    task:
      secrets:
        - name: angular-pipeline-example-secrets
      jobs:
      - name: Docker Images
        commands:
        - checkout
        - echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin;
        - make test-image dist-image test-image-push dist-image-push

  - name: Tests
    task:
      secrets:
        - name: angular-pipeline-example-secrets
      jobs:
      - name: Vulnerabilities
        commands:
          - checkout
          - echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin;
          - make audit
      - name: Unit
        commands:
          - checkout
          - echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin;
          - make test
      - name: Static Analysis
        commands:
          - checkout
          - echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin;
          - make analysis
      - name: End-to-End
        commands:
          - checkout
          - echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin;
          - make e2e
      - name: Infrastructure
        commands:
          - checkout
          - echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin;
          - make release-plan

  - name: Release Candidate
    task:
      secrets:
        - name: angular-pipeline-example-secrets
      jobs:
      - name: Artifacts
        commands:
          - checkout
          - echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin;
          - make release-candidate

promotions:
  - name: Deploy
    pipeline_file: deploy.yml
    auto_promote_on:
      - result: passed
        branch:
          - "^master$"