add Jenkinsfile, Dockerfile and yarn.lock

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2025-04-15 14:47:42 +02:00
parent cf04f3579f
commit 6346620989
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
3 changed files with 86 additions and 1 deletions

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM node:22.14-alpine3.21
WORKDIR /app
# Listening port
ARG PORT=3000
EXPOSE ${PORT}
ENV NEXT_TELEMETRY_DISABLED=1
COPY . .
RUN yarn install \
&& yarn cache clean
RUN yarn build
CMD ["yarn", "start"]

59
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,59 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.8'
pipeline {
agent { label 'linux' }
parameters {
string(
name: 'IMAGE_TAG',
defaultValue: params.IMAGE_TAG ?: '',
description: 'Optional Docker image tag to push.'
)
}
options {
disableConcurrentBuilds()
/* manage how many builds we keep */
buildDiscarder(logRotator(
numToKeepStr: '20',
daysToKeepStr: '30',
))
}
environment {
IMAGE_NAME = 'statusteam/rln-keystore-management'
NEXT_PUBLIC_SITE_URL = "https://${env.JOB_BASE_NAME}"
}
stages {
stage('Build') {
steps {
script {
image = docker.build("${IMAGE_NAME}:${GIT_COMMIT.take(8)}")
}
}
}
stage('Push') {
steps { script {
withDockerRegistry([credentialsId: 'dockerhub-statusteam-auto', url: '']) {
image.push()
}
} }
}
stage('Deploy') {
when { expression { params.IMAGE_TAG != '' } }
steps { script {
withDockerRegistry([credentialsId: 'dockerhub-statusteam-auto', url: '']) {
image.push(params.IMAGE_TAG)
}
} }
}
}
post {
cleanup { cleanWs() }
}
}

View File

@ -65,3 +65,12 @@ If you encounter an "ERC20: insufficient allowance" error, it means the token ap
- [ ] define epoch / quanity epoch
- [x] alias for individual credentials
- [x] remove export keystore method (if >1 credentials in keystore)
## CI/CD
PRs should be made for `develop` branch and `master` should be [rebased](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) on `develop` once changes are verified.
- [CI builds](https://ci.infra.status.im/job/website/job/rln.waku.org/) `master` and pushes to `deploy-master` branch, which is hosted at <https://rln.waku.org/>.
- [CI builds](https://ci.infra.status.im/job/website/job/dev-rln.waku.org/) `develop` and pushes to `deploy-develop` branch, which is hosted at <https://dev-rln.waku.org/>.
The hosting is done using [`nextjs-website` Ansible role in `infra-sites`](https://github.com/status-im/infra-sites/blob/master/ansible/vars/press/rln_waku_org.yml).