script test
This commit is contained in:
9
docker/Jenkinsfile
vendored
9
docker/Jenkinsfile
vendored
@@ -34,7 +34,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
echo "Building docker image ${registry}-math:${version}.${env.BUILD_ID}"
|
echo "Building docker image ${registry}-math:${version}.${env.BUILD_ID}"
|
||||||
def customImage = docker.build("${registry}-math:v${version}.${env.BUILD_ID}","-f ./docker/math/Dockerfile --no-cache --progress=plain -t notenextra-math:latest .")
|
def customImage = docker.build("${registry}-math:v${version}.${env.BUILD_ID}","-f ./docker/math/Dockerfile --no-cache --progress=plain .")
|
||||||
echo "Logging in to docker hub"
|
echo "Logging in to docker hub"
|
||||||
// docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-creds') {
|
// docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-creds') {
|
||||||
// echo "Pushing docker image ${registry}:v${version}.${env.BUILD_ID}"
|
// echo "Pushing docker image ${registry}:v${version}.${env.BUILD_ID}"
|
||||||
@@ -48,7 +48,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
echo "Building docker image ${registry}-cse:${version}.${env.BUILD_ID}"
|
echo "Building docker image ${registry}-cse:${version}.${env.BUILD_ID}"
|
||||||
def customImage = docker.build("${registry}-cse:v${version}.${env.BUILD_ID}","-f ./docker/cse/Dockerfile --no-cache --progress=plain -t notenextra-cse:latest .")
|
def customImage = docker.build("${registry}-cse:v${version}.${env.BUILD_ID}","-f ./docker/cse/Dockerfile --no-cache --progress=plain -t .")
|
||||||
echo "Logging in to docker hub"
|
echo "Logging in to docker hub"
|
||||||
// docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-creds') {
|
// docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-creds') {
|
||||||
// echo "Pushing docker image ${registry}:v${version}.${env.BUILD_ID}"
|
// echo "Pushing docker image ${registry}:v${version}.${env.BUILD_ID}"
|
||||||
@@ -65,8 +65,9 @@ pipeline {
|
|||||||
script {
|
script {
|
||||||
echo "Stopping existing container"
|
echo "Stopping existing container"
|
||||||
sh 'docker compose -f ./docker/docker-compose.yaml down'
|
sh 'docker compose -f ./docker/docker-compose.yaml down'
|
||||||
echo "Removing existing container"
|
echo "Reassign tags to the images"
|
||||||
sh 'docker compose -f ./docker/docker-compose.yaml rm -f'
|
sh 'docker tag ${registry}-math:v${version}.${env.BUILD_ID} ${registry}-math:latest'
|
||||||
|
sh 'docker tag ${registry}-cse:v${version}.${env.BUILD_ID} ${registry}-cse:latest'
|
||||||
echo "Deploying docker image ${registry}-math:${version}.${env.BUILD_ID} and ${registry}-cse:${version}.${env.BUILD_ID} with docker compose"
|
echo "Deploying docker image ${registry}-math:${version}.${env.BUILD_ID} and ${registry}-cse:${version}.${env.BUILD_ID} with docker compose"
|
||||||
sh 'docker compose -f ./docker/docker-compose.yaml up -d'
|
sh 'docker compose -f ./docker/docker-compose.yaml up -d'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
name: notenextra
|
name: notenextra
|
||||||
# variables:
|
|
||||||
# version: 1.1
|
|
||||||
# build_id: ${env.BUILD_ID}
|
|
||||||
services:
|
services:
|
||||||
# you may need to update relative directories if you move this file
|
# you may need to update relative directories if you move this file
|
||||||
# default created directories is /docker/docker-compose.yaml
|
# default created directories is /docker/docker-compose.yaml
|
||||||
@@ -10,7 +7,7 @@ services:
|
|||||||
context: ../
|
context: ../
|
||||||
dockerfile: ./docker/math/Dockerfile
|
dockerfile: ./docker/math/Dockerfile
|
||||||
tags:
|
tags:
|
||||||
- trance0/notenextra-math:${version}.${env.BUILD_ID}
|
- trance0/notenextra-math:latest
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
ports:
|
ports:
|
||||||
- 13001:4200
|
- 13001:4200
|
||||||
@@ -19,7 +16,7 @@ services:
|
|||||||
context: ../
|
context: ../
|
||||||
dockerfile: ./docker/cse/Dockerfile
|
dockerfile: ./docker/cse/Dockerfile
|
||||||
tags:
|
tags:
|
||||||
- trance0/notenextra-cse:${version}.${env.BUILD_ID}
|
- trance0/notenextra-cse:latest
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
ports:
|
ports:
|
||||||
- 13002:4200
|
- 13002:4200
|
||||||
|
|||||||
Reference in New Issue
Block a user