Cicd documentation layout


Credentials> Add Credentials



Download 6.25 Mb.
Page35/39
Date15.06.2023
Size6.25 Mb.
#61535
1   ...   31   32   33   34   35   36   37   38   39
CIcd
CredentialsAdd Credentials.

In order you have to configure the Azure service principle credentials using Azure Client Id, Azure Client Secret, Azure Tenant Id, add credentials as the type “Microsoft Azure Service Principal”.

  • Using jenkins dashboard, navigate to _System_>_Global_Credentials_>_Add_Credentials_.__Choose_the_type_“Username_with_password”'>Credentials_>_Add_Credentials.__Choose_the_type_“Microsoft_Azure_Service_Principal”'>Manage Jenkins > Credentials > System > Global Credentials > Add Credentials.

  • Choose the type “Microsoft Azure Service Principal”.

Using the Docker registry username and password that you obtained in the previous steps, add your Azure Docker registry credentials as the type “Username with password”:

  • Using jenkins dashboard, navigate to Credentials > System > Global CredentialsAdd Credentials.

  • Choose the type “Username with password”.

In the same order create credentials for Azure Subscription Id’s and cluster details of DEV, Test and Prod Environments, by choose the type “Secret Text
Click on “Save”.
In order to configure any environment variable using jenkins UI, follow these steps:

  • Navigate to Manage Jenkins > Configure SystemGlobal propertiesEnvironment variables

  • Give the Name and the Value of the variable.

  • Click on Save.

12.6. Understand Jenkinsfile


Let us now have a deep look into the content of the jenkinsfile! But before note that all the variables that are written in capital letters are environment variables which take their values by configuring them globally using Jenkins UI.
Right, so the first thing to recognise is that your pipeline is just a set of groovy scripts. If it’s declarative or scripted, it’s just running a bunch of groovy commands. Groovy, like Java, supports the import statement at the top of the file. Once that was obvious, a few things occurred to us.
Define some variables that will be used within the stages of your Jenkinsfile.

You can define pipelines as requiring some parameters (from the user, or from an api call) before they can start. These parameters can control what the pipeline does, for example what environment it may be deploying applications into.


1   ...   31   32   33   34   35   36   37   38   39




The database is protected by copyright ©ininet.org 2024
send message

    Main page