@emartech/client-publish

    3.0.0 • Public • Published

    client-publish

    Dependency Status devDependency Status

    Uploads the bundled client application to Amazon S3 and sets up redirection to that bucket.

    Install

    npm install @emartech/client-publish --save-dev

    Configuration

    • LOCAL_DIRECTORY: place of the bundled application, defaults to 'dist'
    • PROJECT_NAME: name of the project, will be the subdirectory in the S3 bucket, required
    • PROJECT_HAS_CUSTOM_NAME: directory names not containing PROJECT_NAME are not allowed by default, you can enable them with it
    • S3_BUCKET: the S3 bucket where the application will be uploaded to, required
    • S3_ACL: S3 buckets ACL setting, defaults to 'public-read'
    • S3_CACHE_CONTROL: S3 buckets cache control, defaults to 'max-age=315360000, no-transform, public'
    • AWS_REGION: AWS region, defaults to 'eu-west-1'
    • AWS_ACCESS_KEY_ID: AWS access key, required
    • AWS_SECRET_ACCESS_KEY: AWS secret for access key, required
    • REDIRECTOR_URL: URL of the redirector service, required
    • REDIRECTOR_TARGET: the domain where the redirector should point, required
    • REDIRECTOR_API_SECRET: secret of the redirector service, required
    • DEPLOY_ENV: deployment environment, provides default values for S3_BUCKET, REDIRECTOR_URL, REDIRECTOR_TARGET, can be 'staging' or 'production', defaults to 'staging'

    Usage

    Deploy scripts work from current branch. Master branch stands for staging, production branch stands for production. Merge only to production when you want deployment there. Merge can be run from local machine, deploys from CI server.

    {
      "scripts": {
        "deploy-staging": "client-deploy-staging",
        "deploy-production": "client-deploy-production",
        "merge-production": "client-merge"
      }
    }
    • client-deploy: deploy application
    • client-deploy-staging: sets defaults for staging and deploy application
    • client-deploy-production: sets defaults for production and deploy application
    • client-merge: merge and push to production from master

    Usage with Codeship

    Set the following environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, REDIRECTOR_API_SECRET_STAGING, REDIRECTOR_API_SECRET_PRODUCTION, PROJECT_NAME.

    Create npm scripts:

    {
      "deploy-staging": "REDIRECTOR_API_SECRET=$REDIRECTOR_API_SECRET_STAGING client-deploy-staging",
      "deploy-production": "REDIRECTOR_API_SECRET=$REDIRECTOR_API_SECRET_PRODUCTION client-deploy-production",
      "merge-production": "client-merge"
    }

    Then setup deployment for master and production branch.

    # master branch
    npm run build
    npm run deploy-staging
    
    # production branch
    npm run build
    npm run deploy-production

    Keywords

    none

    Install

    npm i @emartech/client-publish

    DownloadsWeekly Downloads

    543

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    14.2 kB

    Total Files

    19

    Last publish

    Collaborators

    • llosonczy
    • mzsombor
    • dmorvai
    • fenyopeti
    • kozma
    • ejpersson
    • tszabo-e
    • nikolett.tar
    • rehreth
    • bforgacs
    • lloki-emarsys
    • cztamas
    • akapa
    • mkls
    • probalazs
    • kaaj
    • knagy
    • pecc
    • kszalontai
    • mhegedus
    • mmartin
    • bsoos
    • emarsys-deployer
    • draven
    • npospischek-emartech
    • judge
    • daniel.banky
    • szeist
    • rgargya
    • lillavirag
    • marton.papp.emarsys
    • dgyenes
    • s.viktor
    • m4w4q7
    • david.barkoczi
    • dkocsis-emarsys
    • blacksonic
    • qw3r
    • tamas.toth
    • gergaczd
    • csimon
    • pintera
    • adambrunner
    • gerike
    • ins
    • alkra
    • epgrubmair
    • suliatis
    • ettancos
    • epmartini
    • ejgyurisan
    • gabor.balla.emarsys
    • hozeee
    • ejwalker
    • czeildi
    • iben12
    • kartonfarkas
    • adamoa
    • mbarna
    • kpatrik
    • peva
    • serdelyi
    • ngabor84
    • zerosuxx
    • madorjan
    • edosrecki
    • eadaniel
    • selator
    • kkimak
    • daniel.balazs
    • szb
    • gaborb
    • bencso
    • glendvai
    • lveraszto
    • stoto
    • xipascu
    • rimo86
    • atittel
    • sfariel
    • rdoczi
    • mfawal
    • fentosi
    • boristomic
    • mbazso
    • dmihalek
    • lhammerl
    • sigee
    • lhalasz
    • evspasevski
    • eslesnjakovic
    • dsztanko
    • tbugar
    • dharanikesav
    • tillmannr
    • fqqdk
    • eggarcia
    • bcsizmadia
    • ems-zoltan-kohalmy
    • minktom
    • menyhertfatyol
    • bvitalyos
    • zoltanrideg-emarsys
    • sarakoll
    • mmolnar-emar
    • bozsadam
    • cseby92
    • attila.gal
    • akoshegel
    • danielbodis
    • zbalazs
    • ziyadg
    • benjamingehl
    • tdorkaa
    • lkonya
    • tcsontos
    • gpap_ema
    • vimtaai
    • ahorvath1991
    • emarsys-security
    • bdorogi
    • e.david
    • borzi
    • kari0003
    • dmaraki
    • kaposioli
    • rigo_tamas_emarsys
    • aurelissima
    • barna001
    • viktor.szell
    • pmaksa_emarsys
    • znemes
    • dfarago
    • skorsik
    • esookitoth
    • csengersz
    • daniel.brezovcsik