Skip to content
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

Activating a specific version using the activate command sometime does not work #5

Closed
sssanjaya opened this issue Nov 20, 2020 · 0 comments

Comments

@sssanjaya
Copy link

image

BUG:
For some strange reasons, this activate command does not work

react-deploy activate $CI_COMMIT_SHORT_SHA development

My deploy.js looks likes this

/* eslint-env node */
require('dotenv').config()
module.exports = function (deployTarget) {
  const ENV = {
    // build: {},
    build: {
      localDir: 'build/',
      deleteRemoved: false,
      s3Params: {
        Bucket: 'mys3buckettest',
      },
    },
  }

  const awsaccessKeyId = process.env.REACT_APP_AWS_ACCESS_KEY_ID
  const awssecretAccessKey = process.env.REACT_APP_AWS_SECRET_ACCESS_KEY
  if (deployTarget === 'development') {
    ENV.build.environment = 'development'

    ENV.s3 = {
      accessKeyId: `${awsaccessKeyId}`,
      secretAccessKey: `${awssecretAccessKey}`,
      region: 'ap-southeast-1',
      sslEnabled: true,
      Bucket: 'mys3buckettest',
    }
  }

  if (deployTarget === 'staging') {
    ENV.build.environment = 'staging'
    // configure other plugins for staging deploy target here
  }

  if (deployTarget === 'production') {
    ENV.build.environment = 'production'
    // configure other plugins for production deploy target here
  }

  // Note: if you need to build some configuration asynchronously, you can return
  // a promise that resolves with the ENV object instead of returning the
  // ENV object synchronously.
  return ENV
}

I can see commit hash changes with s3 upload, but cannot find way to fix this issue. ANY THOUGHTS???

@sssanjaya sssanjaya changed the title Activating a specific version use the activate command bug Activating a specific version using the activate command sometime does not work Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant