Skip to content

Commit

Permalink
FDN-1843: add NODE v20 (#97)
Browse files Browse the repository at this point in the history
FDN-1843: add NODE v20
  • Loading branch information
himanshuupadhyay101 authored Nov 28, 2023
1 parent 25aa67d commit 0b8a639
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile-node
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN chown root:root /root/environment-provider*
WORKDIR /root

RUN apk update && apk upgrade && \
apk add --no-cache openjdk11-jre && \
apk add --no-cache openjdk17-jre && \
npm install -g forever && \
apk add --no-cache --update ca-certificates curl && \
mkdir -p /opt/node/log
Expand Down
67 changes: 67 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,39 @@ pipeline {
}
}

stage('Upgrade node docker image 20') {
when { branch 'main' }
agent {
kubernetes {
label 'docker-image-20'
inheritFrom 'kaniko-slim'
}
}
steps {
script {
withCredentials([string(credentialsId: "jenkins-hub-api-token", variable: 'GITHUB_TOKEN')]){
withAWS(roleAccount: '479720515435', role: 'jenkins-build') {
sh """curl -O https://cdn.flow.io/util/environment-provider/environment-provider-version.txt"""
sh """curl -O https://cdn.flow.io/util/environment-provider/environment-provider.jar"""
s3Download(file:'./.npmrc', bucket:'io.flow.infra', path:'npm/flowtech.npmrc')
}
}
}
container('kaniko') {
script {
semver = VERSION.printable()
env.NODEVERSION = "20"
sh """/kaniko/executor -f `pwd`/Dockerfile-node -c `pwd` \
--snapshot-mode=redo --use-new-run \
--build-arg NODE_VERSION=${NODEVERSION} \
--destination flowdocker/node${NODEVERSION}:$semver \
--destination flowdocker/node${NODEVERSION}:latest
"""
}
}
}
}

stage('Upgrade node docker builder image 12') {
when { branch 'main' }
agent {
Expand Down Expand Up @@ -233,6 +266,40 @@ pipeline {
}
}

stage('Upgrade node docker builder image 20') {
when { branch 'main' }
agent {
kubernetes {
label 'docker-builder-image-20'
inheritFrom 'kaniko-slim'
}
}
steps {
script {
withCredentials([string(credentialsId: "jenkins-hub-api-token", variable: 'GITHUB_TOKEN')]){
withAWS(roleAccount: '479720515435', role: 'jenkins-build') {
s3Download(file:'./.npmrc', bucket:'io.flow.infra', path:'npm/flowtech.npmrc')
}
}
}
container('kaniko') {
script {
withCredentials([string(credentialsId: "jenkins-hub-api-token", variable: 'GITHUB_TOKEN')]){
semver = VERSION.printable()
env.NODEVERSION = "20"
sh """/kaniko/executor -f `pwd`/Dockerfile-builder -c `pwd` \
--snapshot-mode=redo --use-new-run \
--build-arg NODE_VERSION=${NODEVERSION} \
--build-arg GITHUB_TOKEN=$GITHUB_TOKEN \
--destination flowdocker/node${NODEVERSION}_builder:$semver \
--destination flowdocker/node${NODEVERSION}_builder:latest
"""
}
}
}
}
}

stage('Upgrade docker play java 13') {
when { branch 'main' }
agent {
Expand Down

0 comments on commit 0b8a639

Please sign in to comment.