Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions approved/environment/environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Basic Environment YAML Definition for V1

environment:
name: envin
id: envin ## optional
tags: {} ## optional
type: production | non-production
org: default #optional
project: TcSvcOverrideTest # optional


## Environment Group in V1 YAML Definition

environmentGroup:
name: dev
identifier: dev
description: ""
tags: {}
org: default
project: PM_Signoff
environments:
- SAM
- asg
- ecs
- k8sdev
- k8sprod
- qa
- serverless



## Example Usage Below

# simple stage, with multi-service, multi-environment

pipeline:
stages:
- steps:
- run:
script: go build
service:
items:
- petstore-frontend
- petstore-backend
environment:
parallel: true
items:
- name: prod
deploy-to: all
- name: stage
deploy-to:
- infra1
- infra2
- name: dev
deploy-to: infra3

---

# service and environment at the pipeline level,
# allows us to remove propagation configuration.


pipeline:
service:
items:
- petstore-frontend
- petstore-backend
environment:
parallel: true
items:
- name: prod
deploy-to: all
stages:
# override the service and environment
# at the stage level.
- service: petstore
environment: prod
steps:
- run:
script: go build


3 changes: 2 additions & 1 deletion approved/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
headers:
x-api-key: <+secret.getValue("api_key")>
content-type: "application/json"
assertion: "expression"
assertion:
code: 200
body: |
identifier: "test"
name: "test"
Expand Down
55 changes: 55 additions & 0 deletions approved/infrastructure/infra.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
## Kubernetes

infrastructure:
name: prod-platformdemo-k8scluster
id: prodplatformdemok8scluster
description: ""
tags: {}
org: default
project: Platform_Demo
uses: gke | eks | aks | kubernetes
with:
connector: platformdemok8s
namespace: e2e-prod
release: release-<+INFRA_KEY>
parallel-deployment: false

---
## ECS

infrastructure:
name: ECS
id: ECS
description: "ECS Deployment Infrastructure"
tags:
account:dev
org: default
project: Platform_Demo
uses: ecs
with:
connector: AWSSalesDanF
region: us-west-2
cluster: lg-fargate
parallel-deployment: false

---
## SSH

infrastructure:
name: dev-ssh-aws
id: devsshaws
org: default
project: CD_Demo
uses: ssh-aws | ssh-azure | ssh-pdc | winrm-azure | winrm-aws | winrm-pdc
with:
credentials: sshawsdemo
connector: account.AWS_Sales_Account
region: us-west-2
# instance-filter: Remove Instance Filter
tags:
name: sshdemo-instance
vpcs: []
host-connection-type: public-ip
instance-type: aws
parallel-deployment: false

168 changes: 168 additions & 0 deletions approved/pipeline/failure-strategy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# step with failure strategy

pipeline:
stages:
- steps:
- run:
script: go test
on-failure:
errors: all
action: ignore
---
# sample pipeline with a retry failure strategy
# that fails if all retry attempts fail.

pipeline:
stages:
- steps:
- run:
script: go test
container: golang
on-failure:
errors: [ unknown ]
action:
retry:
attempts: 5
interval: 10s
failure-action: fail

---

# sample pipeline with a retry failure strategy
# that demonstrates multiple, staggered intervals.

pipeline:
stages:
- steps:
- run:
script: go test
container: golang
on-failure:
errors: [ unknown ]
action:
retry:
attempts: 5
interval: [ 10s, 30s, 1m, 5m, 10m ]
failure-action: fail

---

# sample pipeline with retry failure strategy with a
# complex failure action.

pipeline:
stages:
- steps:
- run:
script: go test
container: golang
on-failure:
errors: [ unknown ]
action:
retry:
attempts: 5
interval: 10s
failure-action:
manual-intervention:
timeout: 60m
timeout-action: fail

---

# sample pipeline with simplified retry strategy
# syntax that should apply sane defaults.

pipeline:
stages:
- steps:
- run:
script: go test
container: golang
on-failure:
errors: all
action: retry

---

# sample pipeline with manual-intervention
# failure strategy that fails on timeout.

pipeline:
stages:
- steps:
- run:
script: go test
container: golang
on-failure:
errors: [ all ]
action:
manual-intervention:
timeout: 30m
timeout-action: fail

---

# sample pipeline with manual-intervention
# failure strategy with a complex timeout
# action.

pipeline:
stages:
- steps:
- run:
script: go test
container: golang
on-failure:
errors: [ all ]
action:
manual-intervention:
timeout: 30m
timeout-action:
retry:
attempts: 10
interval: 30s
failure-action: success
---

# sample pipeline with a basic failure strategy at the stage
# level that aborts on all errors.

pipeline:
stages:
- steps:
- run:
script: go test
container: golang
on-failure:
errors: all
action: abort

---

# sample pipeline with a basic failure strategy at the step
# level that aborts on all errors.

pipeline:
stages:
- steps:
- run:
script: go test
container: golang
on-failure:
errors: all
action: abort

---

# sample pipeline with a retry failure strategy
# that aborts for enumerated error types.

pipeline:
stages:
- steps:
- run:
script: go test
container: golang
on-failure:
errors: [ unknown, connectivity ]
action: abort
75 changes: 75 additions & 0 deletions approved/pipeline/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# sample pipeline with run step

pipeline:
stages:
- steps:
- run:
script: go build

---

# sample pipeline with run step, short syntax

pipeline:
stages:
- steps:
- run: go build

---

# sample pipeline with run step, shortest syntax

pipeline:
stages:
- steps:
- go build

---

# sample pipeline with conditional execution

pipeline:
if: ${{ branch == "main" }}
stages:
- steps:
- run:
script: go build

---

# sample pipeline with global envs

pipeline:
env:
GOOS: linux
GOARCH: amd64
stages:
- steps:
- go build

---

# sample pipeline with optional repository override

pipeline:
# repository should be optional. If undefined,
# the repository and conector are the same as
# where the yaml was stored.
repo:
name: drone/drone
connector: account.github
stages:
- steps:
- go build

---

# sample pipeline, github compatible

jobs:
test:
runs-on: ubuntu
steps:
- run: go build

---
Loading