mirror of
https://github.com/status-im/status-affiliate.git
synced 2025-02-16 14:57:02 +00:00
Update README and add Jenkinsfile
This commit is contained in:
parent
ffc07e865c
commit
9c5ca019dc
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ node_modules/
|
||||
build/*
|
||||
.DS_Store
|
||||
node_modules
|
||||
build
|
72
Jenkinsfile
vendored
Normal file
72
Jenkinsfile
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
/* manage how many builds we keep */
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '20',
|
||||
daysToKeepStr: '30',
|
||||
))
|
||||
}
|
||||
|
||||
environment {
|
||||
DEV_HOST = 'jenkins@node-01.do-ams3.proxy.misc.statusim.net'
|
||||
DEV_OPTS = '-e "ssh -o StrictHostKeyChecking=no"'
|
||||
DEV_SITE = 'dev-translate'
|
||||
GH_USER = 'status-im-auto'
|
||||
GH_MAIL = 'auto@status.im'
|
||||
GH_REPO = 'translate.status.im'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Git Prep') {
|
||||
steps {
|
||||
sh "git config user.name ${GH_USER}"
|
||||
sh "git config user.email ${GH_MAIL}"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Install Deps') {
|
||||
steps {
|
||||
sh 'yarn install'
|
||||
sh 'yarn upgrade'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'yarn run clean'
|
||||
sh 'yarn run build'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Robot') {
|
||||
when { expression { !GIT_BRANCH.endsWith('master') } }
|
||||
steps { script {
|
||||
sh 'echo "Disallow: /" >> public/robots.txt'
|
||||
} }
|
||||
}
|
||||
|
||||
stage('Publish Prod') {
|
||||
when { expression { GIT_BRANCH.endsWith('master') } }
|
||||
steps { script {
|
||||
withCredentials([string(
|
||||
credentialsId: 'jenkins-github-token',
|
||||
variable: 'GH_TOKEN',
|
||||
)]) {
|
||||
sh 'yarn run deploy:ci'
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
||||
stage('Publish Devel') {
|
||||
when { expression { !GIT_BRANCH.endsWith('master') } }
|
||||
steps { script {
|
||||
sshagent(credentials: ['jenkins-ssh']) {
|
||||
sh "rsync ${DEV_OPTS} -r --delete build/. ${DEV_HOST}:/var/www/${DEV_SITE}/"
|
||||
}
|
||||
} }
|
||||
}
|
||||
}
|
||||
}
|
10
README.md
10
README.md
@ -1,7 +1,15 @@
|
||||
# Status affiliate
|
||||
Status affilate T&C agreement landing page
|
||||
Status affilate T&C agreement landing page.
|
||||
|
||||
Development
|
||||
```
|
||||
yarn install
|
||||
yarn start
|
||||
```
|
||||
|
||||
Production
|
||||
```
|
||||
yarn install
|
||||
yarn run build
|
||||
yarn run deploy
|
||||
```
|
@ -13,6 +13,7 @@
|
||||
"axios": "^0.21.0",
|
||||
"cruip-js-toolkit": "^1.0.2",
|
||||
"formik": "^2.2.2",
|
||||
"gh-pages": "^3.1.0",
|
||||
"node-sass": "^4.14.1",
|
||||
"postcss-cli": "^7.1.2",
|
||||
"react": "^16.13.1",
|
||||
@ -25,6 +26,8 @@
|
||||
"scripts": {
|
||||
"start": "craco start",
|
||||
"build": "craco build",
|
||||
"deploy": "gh-pages -d build",
|
||||
"deploy:ci": "node bin/gh-pages.js",
|
||||
"test": "craco test",
|
||||
"eject": "craco eject"
|
||||
},
|
||||
|
75
yarn.lock
75
yarn.lock
@ -2281,7 +2281,7 @@ async-limiter@~1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd"
|
||||
integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==
|
||||
|
||||
async@^2.6.2:
|
||||
async@^2.6.1, async@^2.6.2:
|
||||
version "2.6.3"
|
||||
resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff"
|
||||
integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==
|
||||
@ -3229,7 +3229,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6:
|
||||
dependencies:
|
||||
delayed-stream "~1.0.0"
|
||||
|
||||
commander@^2.11.0, commander@^2.20.0:
|
||||
commander@^2.11.0, commander@^2.18.0, commander@^2.20.0:
|
||||
version "2.20.3"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
|
||||
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
|
||||
@ -4183,6 +4183,11 @@ elliptic@^6.0.0:
|
||||
minimalistic-assert "^1.0.0"
|
||||
minimalistic-crypto-utils "^1.0.0"
|
||||
|
||||
email-addresses@^3.0.1:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/email-addresses/-/email-addresses-3.1.0.tgz#cabf7e085cbdb63008a70319a74e6136188812fb"
|
||||
integrity sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==
|
||||
|
||||
emoji-regex@^7.0.1, emoji-regex@^7.0.2:
|
||||
version "7.0.3"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
|
||||
@ -4811,6 +4816,28 @@ file-uri-to-path@1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
|
||||
integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==
|
||||
|
||||
filename-reserved-regex@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz#e61cf805f0de1c984567d0386dc5df50ee5af7e4"
|
||||
integrity sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=
|
||||
|
||||
filenamify-url@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/filenamify-url/-/filenamify-url-1.0.0.tgz#b32bd81319ef5863b73078bed50f46a4f7975f50"
|
||||
integrity sha1-syvYExnvWGO3MHi+1Q9GpPeXX1A=
|
||||
dependencies:
|
||||
filenamify "^1.0.0"
|
||||
humanize-url "^1.0.0"
|
||||
|
||||
filenamify@^1.0.0:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-1.2.1.tgz#a9f2ffd11c503bed300015029272378f1f1365a5"
|
||||
integrity sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=
|
||||
dependencies:
|
||||
filename-reserved-regex "^1.0.0"
|
||||
strip-outer "^1.0.0"
|
||||
trim-repeated "^1.0.0"
|
||||
|
||||
filesize@6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/filesize/-/filesize-6.0.1.tgz#f850b509909c7c86f7e450ea19006c31c2ed3d2f"
|
||||
@ -4864,7 +4891,7 @@ find-cache-dir@^2.1.0:
|
||||
make-dir "^2.0.0"
|
||||
pkg-dir "^3.0.0"
|
||||
|
||||
find-cache-dir@^3.2.0:
|
||||
find-cache-dir@^3.2.0, find-cache-dir@^3.3.1:
|
||||
version "3.3.1"
|
||||
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880"
|
||||
integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==
|
||||
@ -5188,6 +5215,19 @@ getpass@^0.1.1:
|
||||
dependencies:
|
||||
assert-plus "^1.0.0"
|
||||
|
||||
gh-pages@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-3.1.0.tgz#ec3ed0f6a6e3fc3d888758fa018f08191c96bd55"
|
||||
integrity sha512-3b1rly9kuf3/dXsT8+ZxP0UhNLOo1CItj+3e31yUVcaph/yDsJ9RzD7JOw5o5zpBTJVQLlJAASNkUfepi9fe2w==
|
||||
dependencies:
|
||||
async "^2.6.1"
|
||||
commander "^2.18.0"
|
||||
email-addresses "^3.0.1"
|
||||
filenamify-url "^1.0.0"
|
||||
find-cache-dir "^3.3.1"
|
||||
fs-extra "^8.1.0"
|
||||
globby "^6.1.0"
|
||||
|
||||
glob-parent@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
|
||||
@ -5624,6 +5664,14 @@ https-browserify@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
|
||||
integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=
|
||||
|
||||
humanize-url@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/humanize-url/-/humanize-url-1.0.1.tgz#f4ab99e0d288174ca4e1e50407c55fbae464efff"
|
||||
integrity sha1-9KuZ4NKIF0yk4eUEB8VfuuRk7/8=
|
||||
dependencies:
|
||||
normalize-url "^1.0.0"
|
||||
strip-url-auth "^1.0.0"
|
||||
|
||||
iconv-lite@0.4.24, iconv-lite@^0.4.24:
|
||||
version "0.4.24"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
||||
@ -7736,7 +7784,7 @@ normalize-range@^0.1.2:
|
||||
resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
|
||||
integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=
|
||||
|
||||
normalize-url@1.9.1:
|
||||
normalize-url@1.9.1, normalize-url@^1.0.0:
|
||||
version "1.9.1"
|
||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
|
||||
integrity sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=
|
||||
@ -10844,6 +10892,18 @@ strip-json-comments@^3.0.1:
|
||||
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7"
|
||||
integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==
|
||||
|
||||
strip-outer@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631"
|
||||
integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==
|
||||
dependencies:
|
||||
escape-string-regexp "^1.0.2"
|
||||
|
||||
strip-url-auth@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-url-auth/-/strip-url-auth-1.0.1.tgz#22b0fa3a41385b33be3f331551bbb837fa0cd7ae"
|
||||
integrity sha1-IrD6OkE4WzO+PzMVUbu4N/oM164=
|
||||
|
||||
style-loader@0.23.1:
|
||||
version "0.23.1"
|
||||
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925"
|
||||
@ -11151,6 +11211,13 @@ trim-newlines@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
|
||||
integrity sha1-WIeWa7WCpFA6QetST301ARgVphM=
|
||||
|
||||
trim-repeated@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21"
|
||||
integrity sha1-42RqLqTokTEr9+rObPsFOAvAHCE=
|
||||
dependencies:
|
||||
escape-string-regexp "^1.0.2"
|
||||
|
||||
"true-case-path@^1.0.2":
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.3.tgz#f813b5a8c86b40da59606722b144e3225799f47d"
|
||||
|
Loading…
x
Reference in New Issue
Block a user