Browse Source

Making the download URL reference dynamic based on the job

environments/production/deployments/7
Drew Short 7 years ago
parent
commit
e40e25838d
  1. 4
      .gitlab-ci.yml
  2. 2
      src/repos.cfg

4
.gitlab-ci.yml

@ -46,9 +46,7 @@ development:
- eval `ssh-agent -s`
- ssh-add <(echo "$SSH_DEPLOY_KEY")
- pushd ./dist
- find * -type f -exec sed -i -e 's/{ENVIRONMENT}/'"$ENVIRONMENT"'/g' {} \;
- find * -type f -exec sed -i -e 's@{URL_BASE}@'"$DOWNLOAD_URL_BASE"'@g' {} \;
- find * -type f -exec sed -i -e 's@{FILE_PATH}@'"{}"'@g' {} \;
- popd
- rsync -avz --delete-delay -e "ssh -p $DEPLOY_PORT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress dist/* $DEPLOY_USER@$DEPLOY_HOST:$TARGET_DIRECTORY
only:
@ -72,9 +70,7 @@ production:
- eval `ssh-agent -s`
- ssh-add <(echo "$SSH_DEPLOY_KEY")
- pushd ./dist
- find * -type f -exec sed -i -e 's/{ENVIRONMENT}/'"$ENVIRONMENT"'/g' {} \;
- find * -type f -exec sed -i -e 's@{URL_BASE}@'"$DOWNLOAD_URL_BASE"'@g' {} \;
- find * -type f -exec sed -i -e 's@{FILE_PATH}@'"{}"'@g' {} \;
- popd
- rsync -avz --delete-delay -e "ssh -p $DEPLOY_PORT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress dist/* $DEPLOY_USER@$DEPLOY_HOST:$TARGET_DIRECTORY
only:

2
src/repos.cfg

@ -1,5 +1,5 @@
{
["Sothr's Software"] = {
src = "https://sothr.com/download/oc/releases"
src = "{URL_BASE}"
}
}
Loading…
Cancel
Save