Skip to content

Build analytics.js in circleci #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
34 commits merged into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
41403ad
add .dockerignore file
paddie Oct 23, 2019
8455a3f
add naive dockerfile
paddie Oct 23, 2019
b0054e4
remove unused integration
Oct 23, 2019
e041eb7
package.json for /lib
Oct 23, 2019
9d00886
install lib dependencies too
Oct 23, 2019
f2bc34d
install each and integration-segmentio in lib
Oct 23, 2019
0fa0759
install browserify and add npm build scripts
Oct 23, 2019
e76a6ae
updated dockerfile
Oct 23, 2019
e19b22d
add prettier configuration file
Oct 24, 2019
4d068dc
update old package-lock, install webpack & babel, add scripts & presets
Oct 24, 2019
df27bef
remove unused dist files
Oct 24, 2019
ebd5f17
webpack dev and prod config
Oct 24, 2019
e80e2bb
lib package.json with correct deps
Oct 24, 2019
3abce35
updated integration with correct require
Oct 24, 2019
c9ab6cb
updated lib/index with correct require
Oct 24, 2019
7cfcda7
updated dockerfile allows build
Oct 24, 2019
c7bd267
Remove unused files
Oct 24, 2019
c4e1834
clean up config.yml
Oct 24, 2019
9979447
upload to new cdn with new GCLOUD SERVICE KEY
Oct 24, 2019
02683f2
fix
Oct 24, 2019
4017998
change path and name to dreamdata.min.js
Oct 24, 2019
c4c4acb
build with api.dreamdata.cloud as host
Oct 24, 2019
f837866
remove non existing version causing it to fallback to segment repo
Oct 24, 2019
99f4bc0
the right way
Oct 25, 2019
53d113d
Use version of analytics + 0.1.0
Oct 27, 2019
0e86b2a
remove deprecated each library from dependencies
Oct 27, 2019
22ee3d3
use for..in instead of "each" deprecated library
Oct 27, 2019
9499bda
gcloud --quiet flag & gsutil add 5min cache on upload
Oct 27, 2019
7e8d584
update .gitignore & remove bower.json
Oct 28, 2019
2b1cc1f
gcloud project_id variable
Oct 28, 2019
0c6ff64
updated package-lock's
Oct 28, 2019
b9f2cd5
use @dreamdata/analytics.js-core
Oct 28, 2019
17a68a9
webpack gzip on gcloud with content-encoding headers
Oct 28, 2019
3d55127
init scripts
Oct 28, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: 2
workflows:
version: 2
run:
jobs:
- build
jobs:
build:
working_directory: ~/repo
environment:
BASH_ENV: ~/.nvm/nvm.sh
docker:
- image: google/cloud-sdk
steps:
- checkout
- run:
name: Download nvm
command: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
- run:
name: Install nvm v10.16.3
command: |
nvm install v10.16.3
nvm alias default v10.16.3
- run:
name: Install root dependencies
command: npm install
- run:
name: Install lib dependencies
working_directory: lib
command: npm install
- run:
name: Set gcloud key & project
command: |
echo $GCLOUD_SERVICE_KEY > ${HOME}/gcp-key.json
gcloud --quiet config set project ${GOOGLE_PROJECT_ID}
gcloud --quiet auth activate-service-account --key-file=${HOME}/gcp-key.json
- run:
name: Build analytics.min.js
command: npm run build:prod
- run:
name: Copy analytics.min.js to CDN bucket with 5min cache
command: |
gsutil -h "Cache-Control:public,max-age=300" \
-h "Content-Type:text/javascript; charset=utf-8" \
-h "Content-Encoding:gzip" \
cp dist/analytics.min.js.gz gs://root-cdn/scripts/analytics/v1/dreamdata.min.js
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
106 changes: 103 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,104 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
test/server/pid.txt
components
build.js
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
14 changes: 14 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"jsxBracketSameLine": true,
"jsxSingleQuote": true,
"printWidth": 130,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"semi": true,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "none",
"useTabs": false
}
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

Loading