Skip to content

Commit 914aea4

Browse files
authored
Merge pull request MichaelCade#422 from kolaynurdan/add-tr
17 days added
2 parents c4f99ee + 6ca0d6d commit 914aea4

1,199 files changed

Lines changed: 19885 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

2 KB
Binary file not shown.

2022/.DS_Store

6 KB
Binary file not shown.

2022/tr/.DS_Store

6 KB
Binary file not shown.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM busybox:latest
2+
ENV PORT=8000
3+
4+
ADD index.html /www/index.html
5+
6+
# EXPOSE $PORT
7+
8+
HEALTHCHECK .mdnc -z localhost $PORT
9+
10+
# Create a basic webserver and run it until the container is stopped
11+
.mdecho "httpd started" && trap "exit 0;" TERM INT; httpd -v -p $PORT -h /www -f & wait
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
podTemplate(yaml: '''
2+
apiVersion: v1
3+
kind: Pod
4+
spec:
5+
containers:
6+
- name: maven
7+
image: maven:3.8.1-jdk-8
8+
command:
9+
- sleep
10+
args:
11+
- 99d
12+
- name: kaniko
13+
image: gcr.io/kaniko-project/executor:debug
14+
command:
15+
- sleep
16+
args:
17+
- 9999999
18+
volumeMounts:
19+
- name: kaniko-secret
20+
mountPath: /kaniko/.docker
21+
restartPolicy: Never
22+
volumes:
23+
- name: kaniko-secret
24+
secret:
25+
secretName: dockercred
26+
items:
27+
- key: .dockerconfigjson
28+
path: config.json
29+
''') {
30+
node(POD_LABEL) {
31+
stage('Clone Repository') {
32+
git url: 'https://github.com/MichaelCade/Jenkins-HelloWorld.git', branch: 'main'
33+
container('maven') {
34+
stage('Build Image') {
35+
sh '''
36+
echo "Tests passed"
37+
'''
38+
}
39+
}
40+
}
41+
42+
stage('Test Image') {
43+
container('kaniko') {
44+
stage('Build Hello World App') {
45+
sh '''
46+
/kaniko/executor --context `pwd` --destination michaelcade1/helloworld:1.0
47+
'''
48+
}
49+
}
50+
}
51+
52+
}
53+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<pre>
2+
Hello World!
3+
</pre>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: v1
3+
kind: Namespace
4+
metadata:
5+
name: jenkins
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: jenkins
6+
namespace: jenkins
7+
---
8+
apiVersion: rbac.authorization.k8s.io/v1
9+
kind: ClusterRole
10+
metadata:
11+
annotations:
12+
rbac.authorization.kubernetes.io/autoupdate: "true"
13+
labels:
14+
kubernetes.io/bootstrapping: rbac-defaults
15+
name: jenkins
16+
rules:
17+
- apiGroups:
18+
- '*'
19+
resources:
20+
- statefulsets
21+
- services
22+
- replicationcontrollers
23+
- replicasets
24+
- podtemplates
25+
- podsecuritypolicies
26+
- pods
27+
- pods/log
28+
- pods/exec
29+
- podpreset
30+
- poddisruptionbudget
31+
- persistentvolumes
32+
- persistentvolumeclaims
33+
- jobs
34+
- endpoints
35+
- deployments
36+
- deployments/scale
37+
- daemonsets
38+
- cronjobs
39+
- configmaps
40+
- namespaces
41+
- events
42+
- secrets
43+
verbs:
44+
- create
45+
- get
46+
- watch
47+
- delete
48+
- list
49+
- patch
50+
- update
51+
- apiGroups:
52+
- ""
53+
resources:
54+
- nodes
55+
verbs:
56+
- get
57+
- list
58+
- watch
59+
- update
60+
---
61+
apiVersion: rbac.authorization.k8s.io/v1
62+
kind: ClusterRoleBinding
63+
metadata:
64+
annotations:
65+
rbac.authorization.kubernetes.io/autoupdate: "true"
66+
labels:
67+
kubernetes.io/bootstrapping: rbac-defaults
68+
name: jenkins
69+
roleRef:
70+
apiGroup: rbac.authorization.k8s.io
71+
kind: ClusterRole
72+
name: jenkins
73+
subjects:
74+
- apiGroup: rbac.authorization.k8s.io
75+
kind: Group
76+
name: system:serviceaccounts:jenkins

0 commit comments

Comments
 (0)