Skip to content

Commit

Permalink
add init Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
wanglinsong authored and tdcmeehan committed Oct 21, 2022
1 parent 87f543a commit 6091b4e
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
pipeline {

agent {
kubernetes {
defaultContainer 'maven'
yamlFile 'jenkins/agent.yaml'
}
}

options {
buildDiscarder(logRotator(numToKeepStr: '100'))
timeout(time: 2, unit: 'HOURS')
}

stages {
stage ('Test') {
steps {
echo "test"
}
}
}

post {
fixed {
slackSend(color: "good", message: "fixed ${RUN_DISPLAY_URL}")
}
failure {
slackSend(color: "danger", message: "failure ${RUN_DISPLAY_URL}")
}
}
}
21 changes: 21 additions & 0 deletions jenkins/agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: Pod
metadata:
namespace: oss-agent
labels:
containers: maven
spec:
serviceAccountName: oss-agent
containers:
- name: maven
image: maven:3.8.5-openjdk-17-slim
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "1000m"
tty: true
command:
- cat

0 comments on commit 6091b4e

Please sign in to comment.