GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Create Jenkinsfilek8s · Dineshyaadav/samplejavaapp@ee2bbd1

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Jenkinsfilek8s
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Jenkinsfilek8s‎

Copy file name to clipboard
+33Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
pipeline {
2+
agent any
3+
stages {
4+
stage('checkout repo') {
5+
steps {
6+
git url: 'https://github.com/lerndevops/DevOpsClassCodes.git '
7+
}
8+
}
9+
stage('build artifact') {
10+
steps {
11+
sh 'mvn clean package'
12+
}
13+
}
14+
stage('build docker image') {
15+
steps {
16+
sh 'docker build -t lerndevops/addressbook .'
17+
}
18+
}
19+
stage('push docker image') {
20+
steps {
21+
withCredentials([string(credentialsId: 'DOCKER_HUB_PWD', variable: 'DOCKER_HUB_PWD')]) {
22+
sh "docker login -u lerndevops -p ${DOCKER_HUB_PWD}"
23+
}
24+
sh 'docker push lerndevops/addressbook'
25+
}
26+
}
27+
stage('Deploy to K8s') {
28+
steps {
29+
sh 'kubectl apply -f addressbook-deploy-k8s.yml'
30+
}
31+
}
32+
}
33+
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.