{"action":"created","issue":{"url":"https://api.github.com/repos/edeliver/edeliver/issues/265","repository_url":"https://api.github.com/repos/edeliver/edeliver","labels_url":"https://api.github.com/repos/edeliver/edeliver/issues/265/labels{/name}","comments_url":"https://api.github.com/repos/edeliver/edeliver/issues/265/comments","events_url":"https://api.github.com/repos/edeliver/edeliver/issues/265/events","html_url":"https://github.com/edeliver/edeliver/issues/265","id":306926581,"number":265,"title":"Upgrade release from release store with distillery not working","user":{"login":"nulian","id":181330,"avatar_url":"https://avatars0.githubusercontent.com/u/181330?v=4","gravatar_id":"","url":"https://api.github.com/users/nulian","html_url":"https://github.com/nulian","followers_url":"https://api.github.com/users/nulian/followers","following_url":"https://api.github.com/users/nulian/following{/other_user}","gists_url":"https://api.github.com/users/nulian/gists{/gist_id}","starred_url":"https://api.github.com/users/nulian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nulian/subscriptions","organizations_url":"https://api.github.com/users/nulian/orgs","repos_url":"https://api.github.com/users/nulian/repos","events_url":"https://api.github.com/users/nulian/events{/privacy}","received_events_url":"https://api.github.com/users/nulian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-03-20T15:52:18Z","updated_at":"2018-03-24T01:35:19Z","closed_at":null,"author_association":"NONE","body":"While doing an upgrade release with edeliver in combination with distillery it will give an error. It previously worked when we used exrm to do the releases. Wondering if I missed anything in the configuration.\r\n\r\n```\r\n==> Upgrading synapse from 0.2.0+edge-devops1604buildhost-833-9212e9c to 0.2.0+edge-devops1604buildhost-839-50b0d51\r\n==> Upgrade failed, version 0.2.0+edge-devops1604buildhost-833-9212e9c does not exist:\r\n    expected at: _build/edge/rel/synapse/releases/0.2.0+edge-devops1604buildhost-833-9212e9c\r\n\r\nA remote command failed on:\r\n\r\n  deploy@build1.example.systems\r\n\r\nOutput of the command is shown above and the command executed\r\non that host is printed below for debugging purposes:\r\n\r\nFAILED with exit status 1:\r\n\r\n    [ -f ~/.profile ] && source ~/.profile\r\n    set -e\r\n    cd /home/deploy/builds/synapse\r\n    if [ \"mix\" = \"rebar\" ]; then\r\n      echo \"using rebar to generate release\"\r\n      ./rebar   -f generate\r\n    elif [ \"mix\" = \"relx\" ]; then\r\n      echo \"using relx to generate release\"\r\n      ./relx release\r\n    elif [ \"mix\" = \"mix\" ]; then\r\n      echo \"using mix to generate release\"\r\n      MIX_ENV=\"edge\" LINK_SYS_CONFIG=\"\" LINK_VM_ARGS=\"/etc/synapse/vm.args\" APP=\"synapse\" AUTO_VERSION=\"mix-env+branch+commit-count-branch+revision\" BRANCH=\"devops/16_04_build_host\" SKIP_RELUP_MODIFICATIONS=\"\" RELUP_MODIFICATION_MODULE=\"\" USING_DISTILLERY=\"true\" mix do release.version  --verbose,  release --verbose --env=\"edge\" --name=\"synapse\" --upgrade --upfrom=\"0.2.0+edge-devops1604buildhost-833-9212e9c\"\r\n    fi\r\n```\r\n\r\nDistillery config\r\n\r\n```\r\nPath.join([\"rel\", \"plugins\", \"*.exs\"])\r\n|> Path.wildcard()\r\n|> Enum.map(&Code.eval_file(&1))\r\n\r\nuse Mix.Releases.Config,\r\n    # This sets the default release built by `mix release`\r\n    default_release: :default,\r\n      # This sets the default environment used by `mix release`\r\n    default_environment: Mix.env()\r\n\r\nenvironment :prod do\r\n  plugin Releases.Plugin.LinkConfig\r\n  plugin Releases.Plugin.ModifyRelup\r\n\r\n  set include_erts: true\r\n  set include_src: false\r\n  set cookie: :bla\r\nend\r\n\r\nenvironment :edge do\r\n  plugin Releases.Plugin.LinkConfig\r\n  plugin Releases.Plugin.ModifyRelup\r\n\r\n  set include_erts: true\r\n  set include_src: false\r\n  set cookie: :bla\r\nend\r\n\r\nrelease :synapse do\r\n  set version: current_version(:synapse)\r\n  set applications: [\r\n        :runtime_tools\r\n      ]\r\nend\r\n```\r\n\r\nEdeliver config\r\n\r\n```\r\nSSH_TIMEOUT=10\r\nAPP=\"synapse\" # name of your release\r\nAUTO_VERSION=mix-env+branch+commit-count-branch+revision\r\nBUILD_HOST=\"build1.example.systems\"\r\nBUILD_USER=\"deploy\"\r\nBUILD_AT=\"/home/deploy/builds/synapse\"\r\nRELEASE_STORE=\"deploy@build1.example.systems:~/releases/synapse\"\r\nLINK_VM_ARGS=\"/etc/synapse/vm.args\"\r\nDELIVER_TO=\"/apps/synapse/project\" # deploy directory on production hosts\r\n\r\nif [[ \"$DEPLOY_ENVIRONMENT\" = \"edge\" ]]; then\r\n  STAGING_USER=\"synapse\"\r\n  STAGING_HOSTS=\"synapse1.example.systems synapse2.example.systems\"\r\nfi\r\n```"},"comment":{"url":"https://api.github.com/repos/edeliver/edeliver/issues/comments/375837120","html_url":"https://github.com/edeliver/edeliver/issues/265#issuecomment-375837120","issue_url":"https://api.github.com/repos/edeliver/edeliver/issues/265","id":375837120,"user":{"login":"lessless","id":1539532,"avatar_url":"https://avatars0.githubusercontent.com/u/1539532?v=4","gravatar_id":"","url":"https://api.github.com/users/lessless","html_url":"https://github.com/lessless","followers_url":"https://api.github.com/users/lessless/followers","following_url":"https://api.github.com/users/lessless/following{/other_user}","gists_url":"https://api.github.com/users/lessless/gists{/gist_id}","starred_url":"https://api.github.com/users/lessless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lessless/subscriptions","organizations_url":"https://api.github.com/users/lessless/orgs","repos_url":"https://api.github.com/users/lessless/repos","events_url":"https://api.github.com/users/lessless/events{/privacy}","received_events_url":"https://api.github.com/users/lessless/received_events","type":"User","site_admin":false},"created_at":"2018-03-24T01:35:19Z","updated_at":"2018-03-24T01:35:19Z","author_association":"CONTRIBUTOR","body":"@nulian is your mix environment set to `prod` or to the `edge`? Edeliver store releases in the `\"${RELEASE_DIR:-\"${DELIVER_TO}/_build/**${TARGET_MIX_ENV}**/rel/${APP}\"}\"` "}}
{"actor":{"display_login":"lessless"}}