mirror of
https://github.com/logos-messaging/rln.waku.org.git
synced 2026-01-04 07:03:12 +00:00
add Jenkinsfile, Dockerfile and yarn.lock
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
cf04f3579f
commit
6346620989
17
Dockerfile
Normal file
17
Dockerfile
Normal 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
59
Jenkinsfile
vendored
Normal 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() }
|
||||||
|
}
|
||||||
|
}
|
||||||
11
README.md
11
README.md
@ -64,4 +64,13 @@ If you encounter an "ERC20: insufficient allowance" error, it means the token ap
|
|||||||
- [ ] fix membership management methods
|
- [ ] fix membership management methods
|
||||||
- [ ] define epoch / quanity epoch
|
- [ ] define epoch / quanity epoch
|
||||||
- [x] alias for individual credentials
|
- [x] alias for individual credentials
|
||||||
- [x] remove export keystore method (if >1 credentials in keystore)
|
- [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).
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user