Impossible to fork the repo and test new code
Solution:
Move hardcoded oraclesorg from all strings to a common.vars variable
This commit is contained in:
Roman Storm 2017-11-22 21:21:00 -08:00
parent 790c769357
commit 96633a073d
9 changed files with 22 additions and 17 deletions

View File

@ -5,6 +5,7 @@ set -x
# this should be provided through env by azure template
TEMPLATES_BRANCH="${TEMPLATES_BRANCH}"
MAIN_REPO_FETCH="${MAIN_REPO_FETCH}"
echo "========== ${TEMPLATES_BRANCH}/bootnode/install.sh starting =========="
echo "===== current time: $(date)"
@ -19,7 +20,7 @@ EXT_IP="$(curl ifconfig.co)"
echo "===== external ip: ${EXT_IP}"
echo "===== downloading common.vars"
curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars"
curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars"
source common.vars
INSTALL_CONFIG_REPO="${REPO_BASE_PATH}/bootnode"
@ -38,7 +39,7 @@ echo "===== environmental variables:"
printenv
echo "===== downloading common.funcs"
curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs"
curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs"
source common.funcs
setup_ufw() {
@ -74,9 +75,9 @@ EOF
clone_dapps() {
echo "=====> clone_dapps"
mkdir -p parity_data/dapps
git clone -b ${DAPPS_BRANCH} --single-branch https://github.com/oraclesorg/oracles-dapps-keys-generation.git parity_data/dapps/KeysGenerator
git clone -b ${DAPPS_BRANCH} --single-branch https://github.com/oraclesorg/oracles-dapps-voting.git parity_data/dapps/Voting
git clone -b ${DAPPS_BRANCH} --single-branch https://github.com/oraclesorg/oracles-dapps-validators.git parity_data/dapps/ValidatorsList
git clone -b ${DAPPS_BRANCH} --single-branch https://github.com/${MAIN_REPO_FETCH}/oracles-dapps-keys-generation.git parity_data/dapps/KeysGenerator
git clone -b ${DAPPS_BRANCH} --single-branch https://github.com/${MAIN_REPO_FETCH}/oracles-dapps-voting.git parity_data/dapps/Voting
git clone -b ${DAPPS_BRANCH} --single-branch https://github.com/${MAIN_REPO_FETCH}/oracles-dapps-validators.git parity_data/dapps/ValidatorsList
echo "<===== clone_dapps"
}

View File

@ -237,7 +237,7 @@
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat('https://raw.githubusercontent.com/oraclesorg/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/bootnode/install.sh')]"
"[concat('https://raw.githubusercontent.com/', variables('MAIN_REPO_FETCH'), '/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/bootnode/install.sh')]"
]
},
"protectedSettings": {

View File

@ -3,6 +3,7 @@ echo "=====> sourcing common.vars"
##### These variables may need to be changed when creating new network
OWNER_ADDRESS="0xdd0bb0e2a1594240fed0c2f2c17c1e9ab4f87126"
MAIN_REPO_FETCH="oraclesorg"
SCRIPTS_BRANCH="sokol"
DAPPS_BRANCH="master"

View File

@ -5,6 +5,7 @@ set -x
# this should be provided through env by azure template
TEMPLATES_BRANCH="${TEMPLATES_BRANCH}"
MAIN_REPO_FETCH="${MAIN_REPO_FETCH}"
echo "========== ${TEMPLATES_BRANCH}/mining-node/install.sh starting =========="
echo "===== current time: $(date)"
@ -19,7 +20,7 @@ EXT_IP="$(curl ifconfig.co)"
echo "===== external ip: ${EXT_IP}"
echo "===== downloading common.vars"
curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars"
curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars"
source common.vars
INSTALL_CONFIG_REPO="${REPO_BASE_PATH}/mining-node"
@ -42,7 +43,7 @@ echo "===== environmental variables:"
printenv
echo "===== downloading common.funcs"
curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs"
curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs"
source common.funcs
set_ssh_keys() {
@ -100,7 +101,7 @@ EOF
install_scripts() {
echo "=====> install_scripts"
git clone -b ${SCRIPTS_BRANCH} --single-branch https://github.com/oraclesorg/oracles-scripts
git clone -b ${SCRIPTS_BRANCH} --single-branch https://github.com/${MAIN_REPO_FETCH}/oracles-scripts
ln -s ../${NODE_TOML} oracles-scripts/node.toml
cd oracles-scripts/scripts
npm install

View File

@ -243,7 +243,7 @@
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat('https://raw.githubusercontent.com/oraclesorg/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/mining-node/install.sh')]"
"[concat('https://raw.githubusercontent.com/', variables('MAIN_REPO_FETCH'), '/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/mining-node/install.sh')]"
]
},
"protectedSettings": {

View File

@ -5,6 +5,7 @@ set -x
# this should be provided through env by azure template
TEMPLATES_BRANCH="${TEMPLATES_BRANCH}"
MAIN_REPO_FETCH="${MAIN_REPO_FETCH}"
echo "========== ${TEMPLATES_BRANCH}/netstats-server/install.sh starting =========="
echo "===== current time: $(date)"
@ -19,7 +20,7 @@ EXT_IP="$(curl ifconfig.co)"
echo "===== external ip: ${EXT_IP}"
echo "===== downloading common.vars"
curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars"
curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars"
source common.vars
INSTALL_CONFIG_REPO="${REPO_BASE_PATH}/netstats-server"
@ -38,7 +39,7 @@ echo "===== environmental variables:"
printenv
echo "===== downloading common.funcs"
curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs"
curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs"
source common.funcs
setup_ufw() {

View File

@ -230,7 +230,7 @@
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat('https://raw.githubusercontent.com/oraclesorg/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/netstats-server/install.sh')]"
"[concat('https://raw.githubusercontent.com/',variables('MAIN_REPO_FETCH'),'/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/netstats-server/install.sh')]"
]
},
"protectedSettings": {

View File

@ -5,6 +5,7 @@ set -x
# this should be provided through env by azure template
TEMPLATES_BRANCH="${TEMPLATES_BRANCH}"
MAIN_REPO_FETCH="${MAIN_REPO_FETCH}"
echo "========== ${TEMPLATES_BRANCH}/owner/install.sh starting =========="
echo "===== current time: $(date)"
@ -19,7 +20,7 @@ EXT_IP="$(curl ifconfig.co)"
echo "===== external ip: ${EXT_IP}"
echo "===== downloading common.vars"
curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars"
curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.vars"
source common.vars
INSTALL_CONFIG_REPO="${REPO_BASE_PATH}/owner"
@ -40,7 +41,7 @@ echo "===== environmental variables:"
printenv
echo "===== downloading common.funcs"
curl -sLO "https://raw.githubusercontent.com/oraclesorg/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs"
curl -sLO "https://raw.githubusercontent.com/${MAIN_REPO_FETCH}/deployment-azure/${TEMPLATES_BRANCH}/nodes/common.funcs"
source common.funcs
setup_ufw() {
@ -84,7 +85,7 @@ EOF
download_initial_keys_script() {
echo "=====> download_initial_keys_script"
git clone -b ${IKEYS_BRANCH} --single-branch https://github.com/oraclesorg/oracles-initial-keys
git clone -b ${IKEYS_BRANCH} --single-branch https://github.com/${MAIN_REPO_FETCH}/oracles-initial-keys
cd oracles-initial-keys
npm install
cd ..

View File

@ -235,7 +235,7 @@
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat('https://raw.githubusercontent.com/oraclesorg/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/owner/install.sh')]"
"[concat('https://raw.githubusercontent.com/', variables('MAIN_REPO_FETCH'), '/deployment-azure/', variables('TEMPLATES_BRANCH'), '/nodes/owner/install.sh')]"
]
},
"protectedSettings": {