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

Azure App Service images don't keep up with Azure DevOps Pipelines #43

Open
dombarnes opened this issue Mar 20, 2020 · 1 comment
Open

Comments

@dombarnes
Copy link

The App Service images seem to be lacking behind in updates while the DevOps pipelines push forward.
For instance, the macOS 10.14/10.15 images have Ruby 2.6.5 and Bundler 2.1.4
https://github.com/microsoft/azure-pipelines-image-generation/blob/master/images/macos/macos-10.14-Readme.md

The App Service image has Ruby 2.6.2 and Bundler 1.17.8.

This makes it very difficult to run DevOps tools that also run on the App Service plan. Being unable to run pipelines on environments that match whats being deployed to can cause version conflicts during deployments.

@dombarnes
Copy link
Author

Just to add to this, when running a DevOps Pipeline, I hacked this around by doing the following:

# Write your commands here
gem install bundler:2.1.4
bundle update --bundler
bundle --version
bundle config set without 'test development'
bundle config

as a bash task on my build Pipeline along with a Use Ruby ~> 2.6.2. I then adjusted the post-install script with my own custom one

BUNDLE_INSTALL_LOCATION="/tmp/bundle"
SITE_CONFIG_DIR="/home/site/config"
RBENV_VERSION=$(ls /usr/local/.rbenv/versions | grep 2.6 | tail -n 1)
eval "$(rbenv init -)"
rbenv global $RBENV_VERSION
gem install bundler:2.1.4
bundle update --bundler
bundle --version
bundle config set without 'test development'
bundle config
bundle clean --force
mkdir -p $BUNDLE_INSTALL_LOCATION
bundle config --global path $BUNDLE_INSTALL_LOCATION
bundle install --no-deployment
tar -zcf /tmp/gems.tgz -C $BUNDLE_INSTALL_LOCATION .
mkdir -p $SITE_CONFIG_DIR
mv -f /tmp/gems.tgz $SITE_CONFIG_DIR
bundle exec rake --trace assets:precompile

And finally in the actual Release pipeline, my startup command is
gem install bundler:2.1.4 && bundle install && bundle exec puma config.ru -C config/puma.rb

This solves the issue of each environment having different versions, that being the build agent, the azure app service, and the container that runs the web app, all of which need to have the right versions of stuff to run smoothly. If you can call it that.

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