fix: refs #4409 Default schema & CI code clean
gitea/mylogger/pipeline/head This commit looks good
Details
gitea/mylogger/pipeline/head This commit looks good
Details
This commit is contained in:
parent
225e5685d3
commit
2bb99bf093
|
@ -7,37 +7,40 @@ pipeline {
|
|||
}
|
||||
environment {
|
||||
PROJECT_NAME = 'mylogger'
|
||||
STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}"
|
||||
STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}"
|
||||
IMAGE = 'registry.verdnatura.es/mylogger'
|
||||
}
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
stage('Build') {
|
||||
when {branch 'master'}
|
||||
steps {
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
env.VERSION = packageJson.version
|
||||
}
|
||||
setEnv()
|
||||
sh 'docker-compose build --build-arg BUILD_ID=$BUILD_ID --parallel'
|
||||
sh 'docker tag $IMAGE:$VERSION $IMAGE:latest'
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
stage('Push') {
|
||||
when {branch 'master'}
|
||||
environment {
|
||||
IMAGE = 'registry.verdnatura.es/mylogger'
|
||||
TAG = "${env.VERSION}"
|
||||
CREDENTIALS = credentials('docker-registry')
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
env.VERSION = packageJson.version
|
||||
}
|
||||
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
|
||||
sh 'docker-compose build --build-arg BUILD_ID=$BUILD_ID --parallel'
|
||||
sh 'docker-compose push'
|
||||
|
||||
sh 'docker tag $IMAGE:$TAG $IMAGE:latest'
|
||||
sh 'docker push $IMAGE:latest'
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
unsuccessful {
|
||||
setEnv()
|
||||
sendEmail()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ showFields:
|
|||
- name
|
||||
- description
|
||||
- nickname
|
||||
- firstName
|
||||
excludeFields:
|
||||
- created
|
||||
- updated
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
version: '3.7'
|
||||
services:
|
||||
main:
|
||||
image: registry.verdnatura.es/mylogger:${TAG:-latest}
|
||||
image: registry.verdnatura.es/mylogger:${VERSION:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
|
|
|
@ -23,7 +23,7 @@ module.exports = class ModelLoader {
|
|||
|
||||
for (const logName in conf.logs) {
|
||||
const logConf = conf.logs[logName];
|
||||
const schema = logConf.schema || logger.conf.srcDb.database;
|
||||
const schema = logConf.schema || logger.conf.dstDb.database;
|
||||
const logInfo = {
|
||||
name: logName,
|
||||
conf: logConf,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mylogger",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"author": "Verdnatura Levante SL",
|
||||
"description": "MySQL and MariaDB logger using binary log",
|
||||
"license": "GPL-3.0",
|
||||
|
|
Loading…
Reference in New Issue