add jenkinsfile and CNAME file

This commit is contained in:
swb 2023-03-16 17:38:15 +00:00
parent 667a3b4319
commit 2160e32d41
No known key found for this signature in database
GPG Key ID: 00C65C3C5258DB0F
3 changed files with 65 additions and 14 deletions

56
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,56 @@
pipeline {
agent { label 'linux' }
options {
disableConcurrentBuilds()
/* manage how many builds we keep */
buildDiscarder(logRotator(
numToKeepStr: '20',
daysToKeepStr: '30',
))
}
environment {
GIT_COMMITTER_NAME = 'status-im-auto'
GIT_COMMITTER_EMAIL = 'auto@status.im'
/* dev page settings */
DEV_SITE = 'codex.storage'
DEV_HOST = 'jenkins@node-01.do-ams3.sites.misc.statusim.net'
SCP_OPTS = 'StrictHostKeyChecking=no'
}
stages {
stage('Install') {
steps {
sh "yarn install"
}
}
stage('Build') {
steps {
sh "yarn build"
}
}
stage('Publish Prod') {
when { expression { env.GIT_BRANCH ==~ /.*master/ } }
steps {
sshagent(credentials: ['status-im-auto-ssh']) {
sh "ghp-import -p build"
}
}
}
stage('Publish Devel') {
when { expression { env.GIT_BRANCH ==~ /.*develop/ } }
steps {
sshagent(credentials: ['jenkins-ssh']) {
sh """
rsync -e 'ssh -o ${SCP_OPTS}' -r --delete build/. \
${env.DEV_HOST}:/var/www/${env.DEV_SITE}/
"""
}
}
}
}
}

View File

@ -19,20 +19,14 @@ $ yarn
$ yarn start
```
## Deployment
1. Clone this repository.
2. Install the dependencies:
```bash
$ yarn
```
3. Build the website:
```bash
$ yarn build
```
4. serve the app:
```bash
$ yarn serve
```
## Continuous Integration
Two branches are built by [our Jenkins instance](https://ci.infra.status.im/):
* `master` branch is deployed to https://codex.storage by [CI](https://ci.infra.status.im/job/website/job/codex.storage/).
* `develop` branch is deployed to https://dev.codex.storage by [CI](https://ci.infra.status.im/job/website/job/dev.codex.storage/).
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.
## Configuration
Edit the `docusaurus.config.js` file in the repository's root directory, and update the value of the `businessUnit` field in presets section; below is a list of valid values:

1
static/CNAME Normal file
View File

@ -0,0 +1 @@
codex.storage