Skip to content

Commit

Permalink
add zh-tw
Browse files Browse the repository at this point in the history
  • Loading branch information
subineru committed Apr 21, 2022
1 parent 16eb481 commit 21f3a91
Show file tree
Hide file tree
Showing 1,265 changed files with 31,042 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<img src="logo.png?raw=true" alt="90DaysOfDevOps Logo" width="50%" height="50%" />
</p>

English Version | [中文版本](zh_cn/README.md)
English Version | [中文版本](zh_cn/README.md) | [繁體中文版本](zh_tw/README.md)

This repository is used to document my journey on getting a better foundational knowledge of "DevOps". I will be starting this journey on the 1st January 2022 but the idea is that we take 90 days which just so happens to be January 1st to March 31st.

Expand Down
11 changes: 11 additions & 0 deletions zh_tw/Days/CICD/Jenkins/Pipeline/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM busybox:latest
ENV PORT=8000

ADD index.html /www/index.html

# EXPOSE $PORT

HEALTHCHECK .mdnc -z localhost $PORT

# Create a basic webserver and run it until the container is stopped
.mdecho "httpd started" && trap "exit 0;" TERM INT; httpd -v -p $PORT -h /www -f & wait
53 changes: 53 additions & 0 deletions zh_tw/Days/CICD/Jenkins/Pipeline/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
podTemplate(yaml: '''
apiVersion: v1
kind: Pod
spec:
containers:
- name: maven
image: maven:3.8.1-jdk-8
command:
- sleep
args:
- 99d
- name: kaniko
image: gcr.io/kaniko-project/executor:debug
command:
- sleep
args:
- 9999999
volumeMounts:
- name: kaniko-secret
mountPath: /kaniko/.docker
restartPolicy: Never
volumes:
- name: kaniko-secret
secret:
secretName: dockercred
items:
- key: .dockerconfigjson
path: config.json
''') {
node(POD_LABEL) {
stage('Clone Repository') {
git url: 'https://github.com/MichaelCade/Jenkins-HelloWorld.git', branch: 'main'
container('maven') {
stage('Build Image') {
sh '''
echo "Tests passed"
'''
}
}
}

stage('Test Image') {
container('kaniko') {
stage('Build Hello World App') {
sh '''
/kaniko/executor --context `pwd` --destination michaelcade1/helloworld:1.0
'''
}
}
}

}
}
3 changes: 3 additions & 0 deletions zh_tw/Days/CICD/Jenkins/Pipeline/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<pre>
Hello World!
</pre>
5 changes: 5 additions & 0 deletions zh_tw/Days/CICD/Jenkins/jenkins-namespace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: jenkins
76 changes: 76 additions & 0 deletions zh_tw/Days/CICD/Jenkins/jenkins-sa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: jenkins
namespace: jenkins
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
labels:
kubernetes.io/bootstrapping: rbac-defaults
name: jenkins
rules:
- apiGroups:
- '*'
resources:
- statefulsets
- services
- replicationcontrollers
- replicasets
- podtemplates
- podsecuritypolicies
- pods
- pods/log
- pods/exec
- podpreset
- poddisruptionbudget
- persistentvolumes
- persistentvolumeclaims
- jobs
- endpoints
- deployments
- deployments/scale
- daemonsets
- cronjobs
- configmaps
- namespaces
- events
- secrets
verbs:
- create
- get
- watch
- delete
- list
- patch
- update
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
labels:
kubernetes.io/bootstrapping: rbac-defaults
name: jenkins
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: jenkins
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:serviceaccounts:jenkins
Loading

0 comments on commit 21f3a91

Please sign in to comment.