{"_id":"56d1f33900a2a70b00b365a8","category":{"_id":"56d1f33900a2a70b00b36594","pages":["56d1f33900a2a70b00b3659b","56d1f33900a2a70b00b3659c","56d1f33900a2a70b00b3659d","56d1f33900a2a70b00b3659e","56d1f33900a2a70b00b3659f","56d1f33900a2a70b00b365a0","56d1f33900a2a70b00b365a1","56d1f33900a2a70b00b365a2","56d1f33900a2a70b00b365a3","56d1f33900a2a70b00b365a4","56d1f33900a2a70b00b365a5","56d1f33900a2a70b00b365a6","56d1f33900a2a70b00b365a7","56d1f33900a2a70b00b365a8","56d1f33900a2a70b00b365a9"],"__v":1,"project":"5526c95cf69851170038b48f","version":"56d1f33700a2a70b00b3658e","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-10T15:43:37.809Z","from_sync":false,"order":4,"slug":"ionic-deploy","title":"Ionic Deploy"},"__v":0,"version":{"_id":"56d1f33700a2a70b00b3658e","project":"5526c95cf69851170038b48f","__v":2,"createdAt":"2016-02-27T19:04:23.946Z","releaseDate":"2016-02-27T19:04:23.946Z","categories":["56d1f33900a2a70b00b3658f","56d1f33900a2a70b00b36590","56d1f33900a2a70b00b36591","56d1f33900a2a70b00b36592","56d1f33900a2a70b00b36593","56d1f33900a2a70b00b36594","56d1f33900a2a70b00b36595","56d1f33900a2a70b00b36596","56d1f33900a2a70b00b36597","56d1f33900a2a70b00b36598","56d1f33900a2a70b00b36599","56d1f33900a2a70b00b3659a","571f9497ada30c34003b7cee"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"beta","version_clean":"2.0.0-beta","version":"2.0.0-beta"},"project":"5526c95cf69851170038b48f","parentDoc":null,"user":"5526ca4cf69851170038b496","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-24T15:09:49.713Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":7,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Overview\",\n  \"body\": \"Deploy channels give you the ability to distribute different updates of your app. Want to distribute a beta version to a select group of users before you release it to everyone, or maybe you want to make sure a client only receives updates for tested versions of their app in development? Not a problem with deploy channels!\\n\\nThis guide assumes you've previously setup Ionic Deploy in your app.\"\n}\n[/block]\n* [Getting Started](#getting-started)\n* [Configure Channels](#configure-channels)\n* [Channel Tags](#channel-tags)\n* [App Integration](#app-integration)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Getting Started\"\n}\n[/block]\nWe've already generated 3 default channels for you: `Production`, `Staging`, and `Dev`. You will see them listed in your deploy section:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/himb3BViTmSDZmiibcml_Screen%20Shot%202015-06-30%20at%2010.30.11%20AM.png\",\n        \"Screen Shot 2015-06-30 at 10.30.11 AM.png\",\n        \"2344\",\n        \"316\",\n        \"#fc0c1c\",\n        \"\"\n      ],\n      \"caption\": \"Channel Selection\"\n    }\n  ]\n}\n[/block]\nThe channel name shown in the image above is the currently targeted channel that any actions (_e.g. Deploy, Rollback_) will be applied to. If you've already setup Ionic Deploy in your application, any checks for updates will check against the `Production` channel by default. You can learn about configuring what channel your app pulls from in the [app integration](#app-integration) section.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Configure Channels\"\n}\n[/block]\nYou can configure your channels by clicking the settings icon next to the channel name. You will then be created with the channels configuration section:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/kJHY91M7TwO5tGg988uw_Screen%20Shot%202015-06-30%20at%207.53.19%20AM.png\",\n        \"Screen Shot 2015-06-30 at 7.53.19 AM.png\",\n        \"1250\",\n        \"1224\",\n        \"#5190ef\",\n        \"\"\n      ],\n      \"caption\": \"Channel Configuration\"\n    }\n  ]\n}\n[/block]\n# Adding Channels\n\nYou can add a new channel by providing a label and clicking *+ add Channel*\n\n# Removing Channels\n\nYou can remove any channels you've added by clicking the *DELETE* button. You will be prompted to confirm the delete. The three defaults we provide cannot be deleted.\n\n# Editing Channels\n\nYou can edit channels by clicking the *EDIT* button. You will be provided with another section to configure the details of the channel.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Channel Tags\"\n}\n[/block]\nEvery channel has a unique channel **tag**. This is the tag that you will use in your app to pull updates from a chosen channel. \n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"CLI Integration\",\n  \"body\": \"In a future update to the CLI we will include the ability to upload **and** deploy to a specific channel.\"\n}\n[/block]\n# What happens if the channel is removed?\n\nWhen a channel tag is specified in your app that no longer exists, or is invalid, we automatically fall back to the `Production` channel. This is one of the reasons we have provided you with default channels.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"App Integration\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Dependencies\",\n  \"body\": \"Deploy channels requires that you upgrade your deploy plugin (`ionic-plugin-deploy`) to version `0.2.1` or greater. Your deploy service library (`ionic-service-deploy`) must also be upgraded to version `0.1.0` or greater. \\n\\nPrior versions will **only** pull from the `Production` channel.\"\n}\n[/block]\nPulling updates from a specific channel is incredibly easy. All you need to do is set the channel tag of the channel that should be pulled from where you perform any deploy checks:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var deploy = new Ionic.Deploy();\\n\\n// \\\"dev\\\" is the channel tag for the Dev channel.\\ndeploy.setChannel(\\\"dev\\\");\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nThat's it. Deploy will start pulling updates from the `Dev` channel now. You can substitute `dev` with your own custom channel tag or one of the defaults provided for you.\n\n# Next Steps\n\nWhile the above example works out of the box, it's a bit undesirable if you have multiple channels you want to have different users pull from. A more common scenario is that you will want to set the channel tag dynamically, via a user property perhaps.\n\nWe leave the implementation of that up to you. A common implementation might be to have a channel tag stored with the users who need specific versions, and to set the channel tag via that property.","excerpt":"Covers topics relating to Ionic Deploy and Deploy channels","slug":"deploy-channels","type":"basic","title":"Deploy Channels"}

Deploy Channels

Covers topics relating to Ionic Deploy and Deploy channels

[block:callout] { "type": "info", "title": "Overview", "body": "Deploy channels give you the ability to distribute different updates of your app. Want to distribute a beta version to a select group of users before you release it to everyone, or maybe you want to make sure a client only receives updates for tested versions of their app in development? Not a problem with deploy channels!\n\nThis guide assumes you've previously setup Ionic Deploy in your app." } [/block] * [Getting Started](#getting-started) * [Configure Channels](#configure-channels) * [Channel Tags](#channel-tags) * [App Integration](#app-integration) [block:api-header] { "type": "basic", "title": "Getting Started" } [/block] We've already generated 3 default channels for you: `Production`, `Staging`, and `Dev`. You will see them listed in your deploy section: [block:image] { "images": [ { "image": [ "https://files.readme.io/himb3BViTmSDZmiibcml_Screen%20Shot%202015-06-30%20at%2010.30.11%20AM.png", "Screen Shot 2015-06-30 at 10.30.11 AM.png", "2344", "316", "#fc0c1c", "" ], "caption": "Channel Selection" } ] } [/block] The channel name shown in the image above is the currently targeted channel that any actions (_e.g. Deploy, Rollback_) will be applied to. If you've already setup Ionic Deploy in your application, any checks for updates will check against the `Production` channel by default. You can learn about configuring what channel your app pulls from in the [app integration](#app-integration) section. [block:api-header] { "type": "basic", "title": "Configure Channels" } [/block] You can configure your channels by clicking the settings icon next to the channel name. You will then be created with the channels configuration section: [block:image] { "images": [ { "image": [ "https://files.readme.io/kJHY91M7TwO5tGg988uw_Screen%20Shot%202015-06-30%20at%207.53.19%20AM.png", "Screen Shot 2015-06-30 at 7.53.19 AM.png", "1250", "1224", "#5190ef", "" ], "caption": "Channel Configuration" } ] } [/block] # Adding Channels You can add a new channel by providing a label and clicking *+ add Channel* # Removing Channels You can remove any channels you've added by clicking the *DELETE* button. You will be prompted to confirm the delete. The three defaults we provide cannot be deleted. # Editing Channels You can edit channels by clicking the *EDIT* button. You will be provided with another section to configure the details of the channel. [block:api-header] { "type": "basic", "title": "Channel Tags" } [/block] Every channel has a unique channel **tag**. This is the tag that you will use in your app to pull updates from a chosen channel. [block:callout] { "type": "info", "title": "CLI Integration", "body": "In a future update to the CLI we will include the ability to upload **and** deploy to a specific channel." } [/block] # What happens if the channel is removed? When a channel tag is specified in your app that no longer exists, or is invalid, we automatically fall back to the `Production` channel. This is one of the reasons we have provided you with default channels. [block:api-header] { "type": "basic", "title": "App Integration" } [/block] [block:callout] { "type": "warning", "title": "Dependencies", "body": "Deploy channels requires that you upgrade your deploy plugin (`ionic-plugin-deploy`) to version `0.2.1` or greater. Your deploy service library (`ionic-service-deploy`) must also be upgraded to version `0.1.0` or greater. \n\nPrior versions will **only** pull from the `Production` channel." } [/block] Pulling updates from a specific channel is incredibly easy. All you need to do is set the channel tag of the channel that should be pulled from where you perform any deploy checks: [block:code] { "codes": [ { "code": "var deploy = new Ionic.Deploy();\n\n// \"dev\" is the channel tag for the Dev channel.\ndeploy.setChannel(\"dev\");", "language": "javascript" } ] } [/block] That's it. Deploy will start pulling updates from the `Dev` channel now. You can substitute `dev` with your own custom channel tag or one of the defaults provided for you. # Next Steps While the above example works out of the box, it's a bit undesirable if you have multiple channels you want to have different users pull from. A more common scenario is that you will want to set the channel tag dynamically, via a user property perhaps. We leave the implementation of that up to you. A common implementation might be to have a channel tag stored with the users who need specific versions, and to set the channel tag via that property.