diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000000..c857984f56ed6 --- /dev/null +++ b/Jenkinsfile @@ -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}") + } + } +} diff --git a/jenkins/agent.yaml b/jenkins/agent.yaml new file mode 100644 index 0000000000000..bc94cc6ac27e1 --- /dev/null +++ b/jenkins/agent.yaml @@ -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