Skip to content

Commit

Permalink
Update release process
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Carlos Martin committed Sep 13, 2024
1 parent d4e3f86 commit df51aed
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
FROM node:18-alpine

RUN mkdir -p /usr/src/app && \
chown -R node:node /usr/src/app

USER node
RUN mkdir -p /usr/src/app

WORKDIR /usr/src/app

COPY --chown=node:node package.json /usr/src/app
COPY --chown=node:node package-lock.json /usr/src/app
COPY . /usr/src/app
COPY package.json /usr/src/app
COPY package-lock.json /usr/src/app

# Change ownership of files before running npm install
RUN chown -R node:node /usr/src/app

USER node

RUN npm install

COPY . /usr/src/app

CMD ["node", "src/index.js"]
5 changes: 4 additions & 1 deletion build/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ node('docker') {
usernamePassword(credentialsId: params.CREDENTIALS_ID, usernameVariable: 'REGISTRY_USERNAME', passwordVariable: 'REGISTRY_PASSWORD')
]) {
env.REGISTRY = params.REGISTRY
sh 'pushd pushgateway-pruner && ./build/build-release.sh ' + params.RELEASE_TAG + ' ' + params.IMAGE_NAME + ' && popd'
sh """
cd pushgateway-pruner
./build/build-release.sh ${params.RELEASE_TAG} ${params.IMAGE_NAME}
"""
}
}
}
4 changes: 2 additions & 2 deletions package-lock.json
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pushgateway-pruner",
"version": "0.1.2",
"version": "0.2.1",
"description": "Daemon which regularly queries a Prometheus Pushgateway and prunes groupings which have not been pushed for a certain amount of time.",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit df51aed

Please sign in to comment.