-
Notifications
You must be signed in to change notification settings - Fork 3
/
screwdriver.yaml
70 lines (65 loc) · 2.31 KB
/
screwdriver.yaml
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
shared:
environment:
DOCKER_REPO: screwdrivercd/artifacts-unzip-service
DOCKER_MULTI_PLATFORM_BUILDS_ENABLED: 1
jobs:
main:
image: node:16
environment:
SD_SONAR_OPTS: "-Dsonar.sources=lib,plugins,helpers -Dsonar.tests=test -Dsonar.javascript.lcov.reportPaths=artifacts/coverage/lcov.info -Dsonar.testExecutionReportPaths=artifacts/report/test.xml"
requires: [~pr, ~commit]
steps:
- install: npm install
- test: npm test
# Publish the package to GitHub and build Docker image
publish:
image: node:16
requires: [main]
steps:
- setup-ci: git clone https://github.com/screwdriver-cd/toolbox.git ci
- install-ci: npm install npm-auto-version
- publish-npm-and-git-tag: ./ci/publish.sh
secrets:
# Publishing to NPM
- NPM_TOKEN
# Pushing tags to Git
- GIT_KEY
docker-publish:
requires: publish
template: sd/dind@latest
# Deploy to beta environment and run tests
# beta:
# image: node:16
# requires: [docker-publish]
# steps:
# - setup-ci: git clone https://github.com/screwdriver-cd/toolbox.git ci
# - wait-docker: DOCKER_TAG=`meta get docker_tag` ./ci/docker-wait.sh
# - deploy-k8s: K8S_TAG=`meta get docker_tag` ./ci/k8s-deploy.sh
# environment:
# K8S_CONTAINER: screwdriver-artifacts-unzip-service
# K8S_IMAGE: screwdrivercd/artifacts-unzip-service
# K8S_HOST: kubernetes.default.svc
# K8S_DEPLOYMENT: sdartifacts-unzip-service-beta
# K8S_ENV_KEY: DATASTORE_DYNAMODB_PREFIX
# K8S_ENV_VALUE: beta_rc2_
# secrets:
# # Talking to Kubernetes
# - K8S_TOKEN
# Deploy to prod environment and run tests
# prod:
# image: node:16
# requires: [beta]
# steps:
# - setup-ci: git clone https://github.com/screwdriver-cd/toolbox.git ci
# - wait-docker: DOCKER_TAG=`meta get docker_tag` ./ci/docker-wait.sh
# - deploy-k8s: K8S_TAG=`meta get docker_tag` ./ci/k8s-deploy.sh
# environment:
# K8S_CONTAINER: screwdriver-artifacts-unzip-service
# K8S_IMAGE: screwdrivercd/artifacts-unzip-service
# K8S_HOST: kubernetes.default.svc
# K8S_DEPLOYMENT: sdartifacts-unzip-service
# K8S_ENV_KEY: DATASTORE_DYNAMODB_PREFIX
# K8S_ENV_VALUE: rc2_
# secrets:
# # Talking to Kubernetes
# - K8S_TOKEN