-
Notifications
You must be signed in to change notification settings - Fork 24
/
wercker.yml
74 lines (66 loc) · 2.44 KB
/
wercker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Use Node as the base container. Like FROM in Dockerfile.
box: node
# This Pipeline is run whenever a new git commit is pushed.
build:
steps:
# A step that executes `npm install` command
- npm-install
# This pipeline will be chained to start at the end of a build pipeline in the
# Wercker Web Workflows editor.
push-to-dockerhub:
steps:
- internal/docker-push:
username: $USERNAME
password: $PASSWORD
tag: development
working-dir: /pipeline/source # For some reason this isn't the default
cmd: "node app.js"
ports: "8080"
repository: wbleonard/node-api-container
registry: https://registry.hub.docker.com
# This pipeline will be chained to start at the end of a build pipeline in the
# Wercker Web Workflows editor.
restart-occs-deployment:
steps:
- script:
name: Restart OCCS Deployment
code: |
curl -k -X POST 'https://140.86.40.114/api/v2/deployments/API-Container-20170802-172652/webhook/restart?token=hruzvnqd' -H 'authorization: Basic $($BEARER_TOKEN)'
# Push to the Google Container Registry
push-to-gcr:
steps:
- internal/docker-push:
username: _json_key
password: $GCR_JSON_KEY_FILE
repository: gcr.io/node-api-container-175518/node-api-container
registry: https://gcr.io/v2
# Push to AWS Elastic Container Registry
push-to-ecr:
steps:
- internal/docker-push:
aws-access-key: $AWS_ACCESS_KEY_ID
aws-secret-key: $AWS_SECRET_ACCESS_KEY
aws-region: $AWS_REGION
aws-registry-id: $AWS_REGISTRY_ID
repository: 432275605314.dkr.ecr.us-east-1.amazonaws.com/node-api-container
# This pipeline will be chained to run in parallel with the restart-occs-deplyment pipeline in the
# Wercker Web Workflows editor.
restart-gce-deployment:
steps:
- kubectl:
server: $GCE_KUBERNETES_MASTER
username: $GCE_KUBERNETES_USERNAME
password: $GCE_KUBERNETES_PASSWORD
command: apply -f kube-deployment.yaml
# Deploy to AWS Elastic Beanstalk
deploy-to-ebs:
steps:
- koding/eb-deploy@0.31.0:
access-key: $AWS_KEY
secret-key: $AWS_SECRET
app-name: node-api-container
env-name: node-api-container
version-label: 1.0
region: $AWS_REGION
s3-bucket: s3://node-api-container/
s3-key: my-wordpress-app-1.2.1.tar.gz