forked from dis-moi/extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(environment) add proding environment (staging on production API)
- introduce dedicated staging and production deploy process - create a manifest file per env/platform
- Loading branch information
Showing
20 changed files
with
243 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
BACKEND_ORIGIN=https://notices.bulles.fr/api/v3/ | ||
|
||
# Refresh intervals in minutes | ||
REFRESH_MC_INTERVAL=300 | ||
REFRESH_CONTRIBUTORS_INTERVAL=300 | ||
|
||
UNINSTALL_ORIGIN=https://www.bulles.fr/desinstallation | ||
|
||
# Tracking | ||
TRACKING_URL=https://stats.lmem.net/matomo.php | ||
TRACKING_SITE_ID=5 | ||
|
||
[email protected] | ||
[email protected] | ||
|
||
#SENTRY_ENABLED=true | ||
CHROME_EXTENSION_ID=mepoelfgpameiagpkgpjphnbgampgffm | ||
FIREFOX_EXTENSION_ID={72aad822-62f5-4663-a8f0-025b2f9a3dd5} | ||
BABEL_ENV=production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ [email protected] | |
|
||
SENTRY_ENABLED=true | ||
CHROME_EXTENSION_ID=fpjlnlnbacohacebkadbbjebbipcknbg | ||
FIREFOX_EXTENSION_ID=@lmem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,5 @@ [email protected] | |
|
||
#SENTRY_ENABLED=true | ||
CHROME_EXTENSION_ID=nfabbfkbbbcebdmnocndhdombaffkaog | ||
FIREFOX_EXTENSION_ID={7d0d2553-c311-4acd-a170-f9a4714eb2c0} | ||
BABEL_ENV=production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
const dev = require('./dev'); | ||
const firefoxDev = require('./firefoxDev'); | ||
const staging = require('./staging'); | ||
const chromium = require('./chromium'); | ||
const firefox = require('./firefox'); | ||
const getManifestFilepath = (env, platform) => `./${env}/${platform}.js`; | ||
|
||
module.exports = { | ||
dev, | ||
staging, | ||
chromium, | ||
firefox, | ||
firefoxDev | ||
const getManifest = (env, platform) => { | ||
console.log(getManifestFilepath(env, platform)); | ||
return JSON.stringify(require(getManifestFilepath(env, platform)), null, 2); | ||
}; | ||
|
||
module.exports = getManifest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const csp = require('content-security-policy-builder'); | ||
const production = require('../production/chromium'); | ||
|
||
module.exports = { | ||
...production, | ||
name: 'Bulles - proding', | ||
content_security_policy: csp({ | ||
directives: { | ||
'default-src': ['https://notices.bulles.fr'], | ||
'connect-src': [ | ||
'https://notices.bulles.fr', | ||
'https://sentry.io', | ||
'https://stats.lmem.net' | ||
], | ||
'script-src': ["'self'", "'unsafe-eval'"], | ||
'object-src': ["'self'"], | ||
'img-src': ["'self'", 'https://notices.bulles.fr', 'data:'], | ||
'font-src': ["'self'", 'data:'], | ||
'style-src': ["'unsafe-inline'"] | ||
} | ||
}) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const production = require('../production/firefox'); | ||
|
||
module.exports = { | ||
...production, | ||
name: 'Bulles - proding' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const base = require('./base'); | ||
const base = require('../base'); | ||
|
||
module.exports = { | ||
...base, | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const csp = require('content-security-policy-builder'); | ||
const proding = require('../proding/chromium'); | ||
|
||
module.exports = { | ||
...proding, | ||
name: 'Bulles - staging', | ||
content_security_policy: csp({ | ||
directives: { | ||
'default-src': ['https://staging-notices.bulles.fr'], | ||
'connect-src': [ | ||
'https://staging-notices.bulles.fr', | ||
'https://sentry.io', | ||
'https://stats.lmem.net' | ||
], | ||
'script-src': ["'self'", "'unsafe-eval'"], | ||
'object-src': ["'self'"], | ||
'img-src': ["'self'", 'https://staging-notices.bulles.fr', 'data:'], | ||
'font-src': ["'self'", 'data:'], | ||
'style-src': ["'unsafe-inline'"] | ||
} | ||
}) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const proding = require('../proding/firefox'); | ||
|
||
module.exports = { | ||
...proding, | ||
name: 'Bulles - staging' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,16 @@ | ||
const { getPackagePath } = require('./webpack/packageNaming'); | ||
const { DEPLOY } = process.env; | ||
|
||
const release = Object.freeze({ | ||
verifyConditions: [ | ||
'@semantic-release/changelog', | ||
'@semantic-release/git', | ||
'@semantic-release/github', | ||
'semantic-release-chrome' | ||
], | ||
analyzeCommits: { | ||
preset: 'angular', | ||
parserOpts: { | ||
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'MAJOR RELEASE'] | ||
} | ||
}, | ||
prepare: [ | ||
'@semantic-release/changelog', | ||
{ | ||
path: '@semantic-release/exec', | ||
cmd: | ||
'sed -i -r \'s/"version":\\s*"[^"]+"/"version": "${nextRelease.version}"/\' package.json' | ||
}, | ||
{ | ||
path: '@semantic-release/git', | ||
assets: ['package.json', 'yarn.lock', 'CHANGELOG.md'], | ||
message: | ||
'chore: release ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}' | ||
} | ||
], | ||
publish: [ | ||
{ | ||
path: '@semantic-release/exec', | ||
cmd: 'yarn run release' | ||
}, | ||
{ | ||
path: '@semantic-release/exec', | ||
cmd: 'yarn run sign:firefox:staging' | ||
}, | ||
{ | ||
path: '@semantic-release/exec', | ||
cmd: 'yarn run upload:chrome:staging' | ||
}, | ||
{ | ||
path: '@semantic-release/github', | ||
assets: [ | ||
{ | ||
path: getPackagePath('*', 'firefox', 'staging'), | ||
label: 'Firefox Package - staging' | ||
}, | ||
{ | ||
path: getPackagePath('*', 'firefox', 'production'), | ||
label: 'Firefox Package' | ||
}, | ||
{ | ||
path: getPackagePath('*', 'chromium', 'staging'), | ||
label: 'Chromium Package - staging' | ||
}, | ||
{ | ||
path: getPackagePath('*', 'chromium', 'production'), | ||
label: 'Chromium Package' | ||
} | ||
] | ||
} | ||
//FIXME: semantic-release-chrome does not take globs on assets pathnames | ||
//{ | ||
// path: 'semantic-release-chrome', | ||
// asset: 'build/bulles-v*-chromium.zip', | ||
// extensionId: 'fpjlnlnbacohacebkadbbjebbipcknbg', | ||
//}, | ||
] | ||
const getLogger = require('semantic-release/lib/get-logger'); | ||
|
||
const logger = getLogger({ | ||
cwd: process.cwd(), | ||
env: process.env, | ||
stdout: process.stdout, | ||
stderr: process.stderr | ||
}); | ||
|
||
module.exports = release; | ||
const configFilePath = `./release.config.${DEPLOY}.js`; | ||
|
||
logger.log(`Loading config file ${configFilePath}`); | ||
|
||
module.exports = require(configFilePath); |
Oops, something went wrong.