Skip to content

Commit

Permalink
Merge pull request ozalboher#9 from giladAlboher/jenkins
Browse files Browse the repository at this point in the history
Jenkins
  • Loading branch information
giladAlboher authored Feb 5, 2024
2 parents ad340d0 + 7293c61 commit 8be8f7c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
pipeline {
agent any

environment {
DOCKER_USER = credentials('DOCKER_USER')
DOCKER_TOKEN = credentials('DOCKER_TOKEN')
GITHUB_RUN_ID = "${BUILD_NUMBER}"
}

stages {
stage('Checkout') {
steps {
checkout scm
}
}

stage('Build Docker Image') {
steps {
sh 'docker build -t giladalboher/integratorportal:v1.0.$GITHUB_RUN_ID .'
}
}

stage('Login to Docker Hub') {
steps {
sh 'echo $DOCKER_TOKEN | docker login -u $DOCKER_USER --password-stdin'
}
}

stage('Docker Push') {
steps {
sh 'docker push giladalboher/integratorportal:v1.0.$GITHUB_RUN_ID'
}
}
}
}
2 changes: 1 addition & 1 deletion configs/intergratorportal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: integratorportal
image: giladalboher/integratorportal:v1.0.7699784857
image: giladalboher/integratorportal:v1.0.7784977091
ports:
- containerPort: 3000
resources:
Expand Down

0 comments on commit 8be8f7c

Please sign in to comment.