diff --git a/Jenkinsfile b/Jenkinsfile index 6806e338..9ec02d37 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,24 +23,25 @@ spec: - name: docker image: docker:18-git tty: true - volumeMounts: - - mountPath: /var/run/docker.sock - name: docker-sock + env: + - name: DOCKER_HOST + value: tcp://localhost:2375 + - name: HOME + value: /home/jenkins/agent - name: dind-daemon image: docker:18.06-dind args: ["--registry-mirror", "https://registry.dev.argo.cancercollaboratory.org"] securityContext: privileged: true + runAsUser: 0 volumeMounts: - name: docker-graph-storage mountPath: /var/lib/docker + securityContext: + runAsUser: 1000 volumes: - name: docker-graph-storage emptyDir: {} - - name: docker-sock - hostPath: - path: /var/run/docker.sock - type: File """ } } diff --git a/package-lock.json b/package-lock.json index 03018264..297597b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "donor-submission-aggregator", - "version": "1.23.0", + "version": "1.24.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3547,9 +3547,9 @@ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" }, "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "path-to-regexp": { diff --git a/package.json b/package.json index 20032018..09dd64c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "donor-submission-aggregator", - "version": "1.25.0", + "version": "1.26.0", "description": "Donor aggregation service for the ICGC-ARGO Submission System", "main": "src", "scripts": { diff --git a/src/auth/index.ts b/src/auth/index.ts index 0a6f9a06..212c4d4f 100644 --- a/src/auth/index.ts +++ b/src/auth/index.ts @@ -37,7 +37,15 @@ export const createEgoJwtManager = async (): Promise => { egoTokenUtil = await createEgoUtil(); return await getJwt(); case false: - cachedJwt = egoTokenUtil.isValidJwt() ? await getJwt() : cachedJwt; + const isTokenValid = egoTokenUtil.isValidJwt(cachedJwt.access_token); + // todo remove loggings once jwt issue is gone. + logger.info(`Is current JWT token valid? ${isTokenValid}`); + isTokenValid + ? logger.info( + `Current JWT is valid, expiring in ${cachedJwt.expires_in} seconds.` + ) + : logger.info(`Current JWT is invalid, getting a new JWT...`); + cachedJwt = isTokenValid ? cachedJwt : await getJwt(); return cachedJwt; } };