Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
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
DevOps Assignment
frontend
Commits
04283c85
Commit
04283c85
authored
1 year ago
by
Muhammad Suleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
b9ae38d2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
Jenkinsfile
Jenkinsfile
+27
-0
No files found.
Jenkinsfile
0 → 100644
View file @
04283c85
pipeline
{
agent
any
stages
{
stage
(
'Checkout'
)
{
steps
{
checkout
scm
}
}
stage
(
'Build and Create Docker Image'
)
{
steps
{
sh
'npm install'
sh
'npm run build'
sh
'docker build -t your-image-name:tag .'
}
}
stage
(
'Push Docker Image to Docker Hub'
)
{
steps
{
withCredentials
([
usernamePassword
(
credentialsId:
'docker-hub-credentials'
,
usernameVariable:
'sulemantalpur6'
,
passwordVariable:
'Talpur226##'
)])
{
sh
"docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD"
sh
"docker push your-image-name:tag"
}
}
}
}
}
This diff is collapsed.
Click to expand it.
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