1"use strict";(self.webpackChunkpartners=self.webpackChunkpartners||[]).push([[2817],{15680:(e,n,t)=>{t.d(n,{xA:()=>d,yg:()=>u});var r=t(96540);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l=r.createContext({}),m=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},d=function(e){var n=m(e.components);return r.createElement(l.Provider,{value:n},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},g=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),c=m(t),g=a,u=c["".concat(l,".").concat(g)]||c[g]||p[g]||i;return t?r.createElement(u,o(o({ref:n},d),{},{components:t})):r.createElement(u,o({ref:n},d))}));function u(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=g;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[c]="string"==typeof e?e:a,o[1]=s;for(var m=2;m<i;m++)o[m]=t[m];return r.createElement.apply(null,o)}return r.createElement.apply(null,t)}g.displayName="MDXCreateElement"},63028:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>m});var r=t(58168),a=(t(96540),t(15680));const i={title:"Environments"},o=void 0,s={unversionedId:"docs/user-interface/settings/environments",id:"docs/user-interface/settings/environments",title:"Environments",description:"Environments Screen",source:"@site/docs/docs/user-interface/settings/environments.md",sourceDirName:"docs/user-interface/settings",slug:"/docs/user-interface/settings/environments",permalink:"/docs/user-interface/settings/environments",draft:!1,editUrl:"https://github.com/pactflow/docs.pactflow.io/edit/master/website/docs/docs/user-interface/settings/environments.md",tags:[],version:"current",lastUpdatedBy:"Matt Fellows",lastUpdatedAt:1720513025,formattedLastUpdatedAt:"Jul 9, 2024",frontMatter:{title:"Environments"},sidebar:"docs",previous:{title:"Roles",permalink:"/docs/user-interface/settings/roles"},next:{title:"Migration Guide",permalink:"/docs/user-interface/migration/guide"}},l={},m=[{value:"Recording deployments and releases",id:"recording-deployments-and-releases",level:4},{value:"Creating Production Environments",id:"creating-production-environments",level:4},{value:"Permissions",id:"permissions",level:4},{value:"environment:manage:*",id:"environmentmanage",level:4},{value:"team:manage:*",id:"teammanage",level:4},{value:"team:manage:{uuid}",id:"teammanageuuid",level:4},{value:"environment:read:*",id:"environmentread",level:4},{value:"environment:read:team",id:"environmentreadteam",level:4}],d={toc:m},c="wrapper";function p(e){let{components:n,...i}=e;return(0,a.yg)(c,(0,r.A)({},d,i,{components:n,mdxType:"MDXLayout"}),(0,a.yg)("p",null,(0,a.yg)("img",{alt:"Environments Screen",src:t(82050).A,width:"3000",height:"1936"})),(0,a.yg)("p",null,"Here you can manage the list of environments used by your organization. These represent your real-world deployment or release environments. Maintaining this list, along with the ",(0,a.yg)("inlineCode",{parentName:"p"},"record-deployment")," and ",(0,a.yg)("inlineCode",{parentName:"p"},"record-release")," commands, allows PactFlow to ensure you are safe to deploy using the ",(0,a.yg)("inlineCode",{parentName:"p"},"can-i-deploy")," tool. You can read more ",(0,a.yg)("a",{parentName:"p",href:"https://docs.pact.io/pact_broker/recording_deployments_and_releases/"},"here.")),(0,a.yg)("p",null,(0,a.yg)("img",{alt:"Environments Screen",src:t(23609).A,width:"3340",height:"1936"})),(0,a.yg)("table",null,(0,a.yg)("thead",{parentName:"table"},(0,a.yg)("tr",{parentName:"thead"},(0,a.yg)("th",{parentName:"tr",align:null},"Field"),(0,a.yg)("th",{parentName:"tr",align:null},"Description"))),(0,a.yg)("tbody",{parentName:"table"},(0,a.yg)("tr",{parentName:"tbody"},(0,a.yg)("td",{parentName:"tr",align:null},"Name"),(0,a.yg)("td",{parentName:"tr",align:null},'A unique name, no spaces allowed. This name is used in the can-i-deploy and record-deployment CLI commands. For example, "payments-sit-1". This field cannot be edited')),(0,a.yg)("tr",{parentName:"tbody"},(0,a.yg)("td",{parentName:"tr",align:null},"Display Name"),(0,a.yg)("td",{parentName:"tr",align:null},'Verbose environment name. "Payments Team SIT 1".')),(0,a.yg)("tr",{parentName:"tbody"},(0,a.yg)("td",{parentName:"tr",align:null},"Production"),(0,a.yg)("td",{parentName:"tr",align:null},"Whether or not this environment is a production environment.")),(0,a.yg)("tr",{parentName:"tbody"},(0,a.yg)("td",{parentName:"tr",align:null},"Team Names"),(0,a.yg)("td",{parentName:"tr",align:null},"Associating the environment with teams, used to determine which teams can view and edit the environment after it is created. See the permissions section below for details.")))),(0,a.yg)("h4",{id:"recording-deployments-and-releases"},"Recording deployments and releases"),(0,a.yg)("p",null,"To successfully record a deployment or release to an environment, the user must be allowed to record a deployment/release for the application. Moreover, the user must be allowed to view the environment resource."),(0,a.yg)("p",null,"In terms of permissions and resource relationships, that means:"),(0,a.yg)("ol",null,(0,a.yg)("li",{parentName:"ol"},"The user must have ",(0,a.yg)("inlineCode",{parentName:"li"},"deployment_and_release:record:team")," and ",(0,a.yg)("inlineCode",{parentName:"li"},"environment:view:team")," (or ",(0,a.yg)("inlineCode",{parentName:"li"},"environment:manage:team"),") AND the environment, application and user must be assigned to the same team.")),(0,a.yg)("p",null,"OR "),(0,a.yg)("ol",{start:2},(0,a.yg)("li",{parentName:"ol"},"The user must have ",(0,a.yg)("inlineCode",{parentName:"li"},"deployment_and_release:record:*")," and ",(0,a.yg)("inlineCode",{parentName:"li"},"environment:view:*")," (or ",(0,a.yg)("inlineCode",{parentName:"li"},"environment:manage:*"),").")),(0,a.yg)("h4",{id:"creating-production-environments"},"Creating Production Environments"),(0,a.yg)("p",null,'If all the Broker services are deployed to the same "public" internet, then there only needs to be one Production environment. If there are multiple segregated production environments (for example, when maintaining on-premises software for multiple customers) you should create a separate production Environment for each logical deployment environment.'),(0,a.yg)("h4",{id:"permissions"},"Permissions"),(0,a.yg)("p",null,"Environments can be associated with Teams via creating or editing an Environment, or in the Team settings when creating or editing a Team. The permissions that determine when a user can associate an environment with a team are as follows:"),(0,a.yg)("h4",{id:"environmentmanage"},"environment:manage:*"),(0,a.yg)("p",null,"Users with this permission can view, edit and delete all environments. When creating or editing an environment the user can add or remove any team, regardless of their 'teams' permissions. "),(0,a.yg)("h4",{id:"teammanage"},"team:manage:*"),(0,a.yg)("p",null,"When creating or editing any team the user can change the environments associated with the team."),(0,a.yg)("h4",{id:"teammanageuuid"},"team:manage:{uuid}"),(0,a.yg)("p",null,"When creating or editing a team they have permission for, the user can change the environments associated with that team."),(0,a.yg)("h4",{id:"environmentread"},"environment:read:*"),(0,a.yg)("p",null,"The user can view a list of all environments but cannot edit or delete environments."),(0,a.yg)("h4",{id:"environmentreadteam"},"environment:read:team"),(0,a.yg)("p",null,"The user can view a list of all the environments associated with their teams, but cannot edit or delete environments."))}p.isMDXComponent=!0},23609:(e,n,t)=>{t.d(n,{A:()=>r});
1const r=t.p+"assets/images/settings-environments-create-e051d7edb123b6f7006a8ae79195d07e.png"},82050:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/settings-environments-f6c2a14e69e7248a55ae0744f7234259.png"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.