Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nisum-cicd-task
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ishtiaq Ahmed
nisum-cicd-task
Commits
5e3eab70
Commit
5e3eab70
authored
Nov 07, 2022
by
Ishtiaq Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Jenkinsfile
parent
948aa213
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Jenkinsfile
Jenkinsfile
+7
-7
No files found.
Jenkinsfile
View file @
5e3eab70
...
...
@@ -11,10 +11,10 @@
maven
'Maven'
}
stages
{
stage
(
"
git clone
"
)
{
stage
(
"
Cloning Code- GitLab
"
)
{
steps
{
script
{
echo
"cloning
my app
"
echo
"cloning
Code from GitLab
"
sh
"rm -rf *"
git
branch:
'master'
,
url:
'https://gitlab.mynisum.com/isahmed/nisum-cicd-task.git'
}
...
...
@@ -22,31 +22,31 @@
}
}
stage
(
"
build jar
"
)
{
stage
(
"
Code Build
"
)
{
steps
{
script
{
echo
"building application"
echo
"building application
from code
"
sh
'mvn clean package'
sh
'mvn package'
}
}
}
stage
(
"
build docker
"
)
{
stage
(
"
Image Build & Push
"
)
{
steps
{
script
{
echo
"building application"
withCredentials
([
usernamePassword
(
credentialsId:
'gitlab-ishtiaq'
,
passwordVariable:
'PASS'
,
usernameVariable:
'USER'
)])
{
sh
"sed -i 's/VERSION/${env.BUILD_ID}/g' docker-build.sh"
sh
'chmod
777
docker-build.sh'
sh
'chmod
+x
docker-build.sh'
sh
'./docker-build.sh'
}
}
}
}
stage
(
"Deploy"
)
{
stage
(
"Deploy
ment on GKE
"
)
{
steps
{
sh
"sed -i 's/VERSION/${env.BUILD_ID}/g' dep-nisum-cicd.yaml"
step
([
$class
:
'KubernetesEngineBuilder'
,
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment