Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sulav TD test iin Sysdig #105

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 8080
CMD [ "npm", "start" ]
CMD [ "npm", "start" ]

24 changes: 9 additions & 15 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
pipeline {
agent any
environment {
//be sure to replace "willbla" with your own Docker Hub username
DOCKER_IMAGE_NAME = "willbla/train-schedule"
//be sure to replace "bhavukm" with your own Docker Hub username
DOCKER_IMAGE_NAME = "sulavkumar/train-schedule"
}

stages {

stage('Build') {
steps {
echo 'Running build automation'
Expand All @@ -13,9 +15,7 @@ pipeline {
}
}
stage('Build Docker Image') {
when {
branch 'master'
}

steps {
script {
app = docker.build(DOCKER_IMAGE_NAME)
Expand All @@ -26,9 +26,7 @@ pipeline {
}
}
stage('Push Docker Image') {
when {
branch 'master'
}

steps {
script {
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_login') {
Expand All @@ -39,9 +37,7 @@ pipeline {
}
}
stage('CanaryDeploy') {
when {
branch 'master'
}

environment {
CANARY_REPLICAS = 1
}
Expand All @@ -54,9 +50,7 @@ pipeline {
}
}
stage('DeployToProduction') {
when {
branch 'master'
}

environment {
CANARY_REPLICAS = 0
}
Expand All @@ -76,4 +70,4 @@ pipeline {
}
}
}
}
}
1 change: 1 addition & 0 deletions testfilesulav
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// This is a test file for TD