diff --git a/docker-compose.yml b/docker-compose.yml index 7870927e9914555cc15750c97faf4af68ec4a933..af28eb73a18014339b066a0d99c9420acf1c9f37 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,10 +7,10 @@ services: - ./.cache:/app/.cache environment: - VERBOSE_VAL=true + - DRYRUN=true secrets: - api-token - + secrets: api-token: - file: secret - \ No newline at end of file + file: secret \ No newline at end of file diff --git a/k8s/cronjob.yml b/k8s/cronjob.yml index 726790b0d50f8184f45d2df902c99e596a003216..08781ada993f04cb887e52da79ed9e53049740a5 100644 --- a/k8s/cronjob.yml +++ b/k8s/cronjob.yml @@ -18,7 +18,7 @@ spec: args: - /bin/sh - -c - - npm start -- --verbose=true --dryrun=true | tee -a /app/logs/stdout-$(date +%Y%m%d).log + - npm start -- --verbose=true --dryrun=true | tee -a /app/logs/stdout-$(date +%Y-%m-%d).log volumeMounts: - name: logs mountPath: /app/logs diff --git a/package.json b/package.json index fd40247c72885d33cf603488f08acaba9420e06f..bea1a352c7b6febb7097e951d37c960b6a8eba0f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "url": "git+https://github.com/eclipsefdn/eclipsefdn-github-sync.git" }, "author": "Martin Lowe", - "scripts" : { + "scripts": { "start": "node src/Sync.js" }, "license": "EPL-2.0", diff --git a/src/Client.js b/src/Client.js index eebf2e21de5be3cfa3600ac6c6d126cf111a85b1..449db7ef9d3e8d62e557b155dc6e94d4804ab5a4 100644 --- a/src/Client.js +++ b/src/Client.js @@ -16,7 +16,7 @@ const fs = require('fs'); const winston = require('winston'); var now = new Date(); -winston.add(new winston.transports.File({ filename: `logs/cli-${now.getUTCFullYear()}-${now.getUTCMonth()}-${now.getUTCDay()}.log` })); +winston.add(new winston.transports.File({ filename: `logs/cli-${now.getUTCFullYear()}-${now.getUTCMonth()+1}-${now.getUTCDate()}.log` })); winston.add(new winston.transports.Console({ level: 'error' })); // set up yargs command line parsing diff --git a/src/Sync.js b/src/Sync.js index b3b1b313224ac3800377993cad3ae717693b0ec1..dc94f9d03ba27ee472dbfe927c996c266724da36 100644 --- a/src/Sync.js +++ b/src/Sync.js @@ -50,7 +50,7 @@ winston.configure({ ), transports: [ new winston.transports.File({ - filename: `logs/sync-${now.getUTCFullYear()}-${now.getUTCMonth()}-${now.getUTCDay()}.log`, + filename: `logs/sync-${now.getUTCFullYear()}-${now.getUTCMonth()+1}-${now.getUTCDate()}.log`, level: 'debug' }), new winston.transports.Console({ level: argv.V ? 'debug' : 'error' })