For the book updates and community contributions


Settings tab. Then select  Secrets



Download 3,57 Mb.
Pdf ko'rish
bet35/49
Sana21.08.2022
Hajmi3,57 Mb.
#847402
1   ...   31   32   33   34   35   36   37   38   ...   49
Bog'liq
DevOps-for-ASP.NET-Core-Developers

Settings
tab. Then select 
Secrets
. Select 
New 
repository secret

Figure 1:
Create a secret. 
3.
Copy and paste the JSON from the az ad sp create-for-rbac command into the body of the 
secret. You can create this JSON by hand too if you have the relevant fields for your SPN. The 
secret should be named AZURE_CREDENTIALS. Select 
Add secret
to save the new secret: 


51 
CHAPTER 3 | Continuous integration and deployment with Azure DevOps 
Figure 2:
Add Azure credentials. 
4.
You’ll consume this secret in a workflow in later steps. To access it, use the variable notation ${{}}. 
In this case, ${{ AZURE_CREDENTIAL }} will be populated with the JSON you saved. 
Add environments 
Environments
 are used as a 
logical boundary
. You can add approvals to environments to ensure 
quality. You can also track deployments to environments and specify environment-specific values 
(secrets) for configuration. 
For this example, you’re going to split the actual Azure environment into two 
logical
environments 
called PRE-
PROD and PROD. When you deploy the web app, you’ll deploy to the staging slot of the 
Azure web app, represented by the PRE-PROD 
environment. When you’re ready to deploy to PROD, 
you’ll just perform a slot swap.
In this case, the on
ly difference between the environments is the slot that you’re deploying to. In real 
life, there would typically be different web apps (and separate web app plans), separate resource 
groups, and even separate subscriptions. Typically, there’s an SPN per en
vironment. You may want to 
override the AZURE_CREDENTIAL value that you saved as a repository secret by creating it as an 
environment secret



52 
CHAPTER 3 | Continuous integration and deployment with Azure DevOps 
Note 
Precedence works from Environment to repository. If a targeted environment has a secret called 
MY_SECRET, then that value is used. If not, the repository value of MY_SECRET (if any) is used. 
1.
Select 

Download 3,57 Mb.

Do'stlaringiz bilan baham:
1   ...   31   32   33   34   35   36   37   38   ...   49




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish