Skip to content

R60133 purge old ce dev image when updating pr devel #69

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

Merged

Conversation

nfawbert
Copy link
Contributor

@nfawbert nfawbert commented Feb 2, 2022

Tested on local VM stack;

  1. Roll back to 1.1.17 VM snapshot
  2. edit /opt/ce-dev/lib/commands/update.js with LOCAL "file:///home/fawbert/install.sh"
  3. Create /home/fawbert/install.sh with;
echo "Killing deprecated running ce_dev_controller container..."
if [ "$(docker ps -q -f name=ce_dev_controller)" ]; then
    if [ "$(docker ps -aq -f status=running -f name=ce_dev_controller)" ]; then
        # cleanup
        docker kill ce_dev_controller
    fi
fi
echo "done."
  1. sudo chmod 755 /home/fawbert/install.sh
  2. ce-dev update
  3. ce-dev create
  4. cd projectname
  5. ce-dev init
  6. ce-dev start
  7. ce-dev provision
  8. ce-dev deploy

The solution will be implemented within 'install.sh' script;

ce-dev:install.sh;

echo "Killing deprecated running ce_dev_controller container..."
if [ "$(docker ps -q -f name=ce_dev_controller)" ]; then
    if [ "$(docker ps -aq -f status=running -f name=ce_dev_controller)" ]; then
        # cleanup
        docker kill ce_dev_controller
    fi
fi
echo "done."

During a 'ce-dev update', if the (old) controller container is found to be running, it is killed so that the new 'latest' tagged image is spun up on next run.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 2, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@philipnorton42 philipnorton42 merged commit e3eafd1 into devel Feb 2, 2022
@philipnorton42 philipnorton42 deleted the r60133_purge_old_ce-dev_image_when_updating-PR-devel branch February 2, 2022 11:19
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

Successfully merging this pull request may close these issues.

2 participants