-
Notifications
You must be signed in to change notification settings - Fork 0
/
devfile.yaml
106 lines (106 loc) · 2.9 KB
/
devfile.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
schemaVersion: 2.2.0
metadata:
name: dotnet-basic
displayName: C# .NET - Trusted Application Pipeline
description: C# .Net 6.0 example with advanced continuous integration pipeline covering building, CVE scanning, security scanning, signatures, attestations, SLSA provenance and SBOM along with Gitops-based continuous deployment
version: 1.1.1
icon: https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png
provider: Red Hat
supportUrl: https://github.com/devfile-samples/devfile-support#support-information
language: .NET
projectType: dotnet
tags:
- .NET
- sscs
- sbom
- acs
attributes:
alpha.dockerimage-port: 8081
starterProjects:
- name: s2i-example
git:
checkoutFrom:
remote: origin
revision: dotnet-6.0
remotes:
origin: https://github.com/redhat-developer/s2i-dotnetcore-ex
subDir: app
components:
- name: dotnet
container:
image: registry.access.redhat.com/ubi8/dotnet-60:6.0
command: ['tail', '-f', '/dev/null']
mountSources: true
env:
- name: CONFIGURATION
value: Debug
- name: STARTUP_PROJECT
value: app.csproj
- name: ASPNETCORE_ENVIRONMENT
value: Development
endpoints:
- name: http-8080
targetPort: 8080
- name: image-build
image:
imageName: 'dotnet-image:latest'
dockerfile:
uri: docker/Dockerfile
buildContext: .
rootRequired: false
- name: kubernetes-deploy
attributes:
deployment/replicas: 1
deployment/cpuRequest: 10m
deployment/memoryRequest: 100Mi
deployment/container-port: 8081
kubernetes:
uri: kubernetes/deployment.yaml
endpoints:
- name: http-8081
targetPort: 8081
path: /
secure: true
- name: kubernetes-service
attributes:
deployment/replicas: 1
deployment/cpuRequest: 10m
deployment/memoryRequest: 100Mi
deployment/container-port: 8081
kubernetes:
uri: kubernetes/service.yaml
commands:
- id: build
exec:
workingDir: ${PROJECT_SOURCE}
commandLine: kill $(pidof dotnet); dotnet build -c $CONFIGURATION $STARTUP_PROJECT /p:UseSharedCompilation=false
component: dotnet
group:
isDefault: true
kind: build
- id: run
exec:
workingDir: ${PROJECT_SOURCE}
commandLine: dotnet run -c $CONFIGURATION --no-build --project $STARTUP_PROJECT --no-launch-profile
component: dotnet
group:
isDefault: true
kind: run
- id: build-image
apply:
component: image-build
- id: deploy-deployment
apply:
component: kubernetes-deploy
- id: deploy-service
apply:
component: kubernetes-service
- id: deploy
composite:
commands:
- build-image
- deploy-deployment
- deploy-service
group:
isDefault: true
kind: deploy