From 5773b244e7e2ce458c08c87699c31a467c4cc940 Mon Sep 17 00:00:00 2001 From: Raivis Dejus Date: Mon, 26 Jun 2017 14:39:36 +0300 Subject: [PATCH] Added environment variables for Bitbucket OAuth (#78) * Adding sample values for bitbucket OAuth * Adding ENV variables for for bitbucket OAuth * Adding composer configuration for bitbucket OAuth * Added note about Bitbucket OAuth variables * Added note that Bitbucket Oauth is optional --- 7.0-cli/Dockerfile | 2 ++ 7.0-cli/bin/docker-environment | 3 +++ README.md | 2 ++ composer.env.sample | 2 ++ 4 files changed, 9 insertions(+) diff --git a/7.0-cli/Dockerfile b/7.0-cli/Dockerfile index 4767c13..8dd967d 100644 --- a/7.0-cli/Dockerfile +++ b/7.0-cli/Dockerfile @@ -69,6 +69,8 @@ ENV MAGENTO_ROOT /var/www/magento ENV COMPOSER_GITHUB_TOKEN "" ENV COMPOSER_MAGENTO_USERNAME "" ENV COMPOSER_MAGENTO_PASSWORD "" +ENV COMPOSER_BITBUCKET_KEY "" +ENV COMPOSER_BITBUCKET_SECRET "" ENV DEBUG false ENV UPDATE_UID_GID false diff --git a/7.0-cli/bin/docker-environment b/7.0-cli/bin/docker-environment index 63f5b13..abfb115 100755 --- a/7.0-cli/bin/docker-environment +++ b/7.0-cli/bin/docker-environment @@ -63,5 +63,8 @@ fi [ ! -z "${COMPOSER_MAGENTO_USERNAME}" ] && \ composer config --global http-basic.repo.magento.com \ $COMPOSER_MAGENTO_USERNAME $COMPOSER_MAGENTO_PASSWORD + +[ ! -z "${COMPOSER_BITBUCKET_KEY}" ] && [ ! -z "${COMPOSER_BITBUCKET_SECRET}" ] && \ + composer config --global bitbucket-oauth.bitbucket.org $COMPOSER_BITBUCKET_KEY $COMPOSER_BITBUCKET_SECRET exec "$@" diff --git a/README.md b/README.md index d674b97..b507683 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ Configuration is driven through environment variables. A comprehensive list of * `COMPOSER_GITHUB_TOKEN` - Your [GitHub OAuth token](https://getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens), should it be needed * `COMPOSER_MAGENTO_USERNAME` - Your Magento Connect public authentication key ([how to get](http://devdocs.magento.com/guides/v2.0/install-gde/prereq/connect-auth.html)) * `COMPOSER_MAGENTO_PASSWORD` - Your Magento Connect private authentication key +* `COMPOSER_BITBUCKET_KEY` - Optional - Your Bitbucket OAuth key ([how to get](https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html)) +* `COMPOSER_BITBUCKET_SECRET` - Optional - Your Bitbucket OAuth secret * `DEBUG` - Toggles tracing in the bash commands when exectued; nothing to do with Magento` * `PHP_ENABLE_XDEBUG` - When set to `true` it will include the Xdebug ini file as part of the PHP configuration, turning it on. It's recommended to only switch this on when you need it as it will slow down the application. * `UPDATE_UID_GID` - If this is set to "true" then the uid and gid of `www-data` will be modified in the container to match the values on the mounted folders. This seems to be necessary to work around virtualbox issues on OSX. diff --git a/composer.env.sample b/composer.env.sample index aaecf28..7823a54 100644 --- a/composer.env.sample +++ b/composer.env.sample @@ -1,3 +1,5 @@ COMPOSER_GITHUB_TOKEN=0000000000000000000000000000000000000000 COMPOSER_MAGENTO_USERNAME=00000000000000000000000000000000 COMPOSER_MAGENTO_PASSWORD=00000000000000000000000000000000 +COMPOSER_BITBUCKET_KEY=000000000000000000 +COMPOSER_BITBUCKET_SECRET=00000000000000000000000000000000