Skip to content

Jenkins Dashboard

Important

Check out the Must Read section for managing network, compute and oci firewall resources.


Jenkins-Arch

Jenkins-Dashboard

  1. setUpOCI Pipeline
  2. terraform_files Folder
  3. Region based Views (including Global directory)

1. setUpOCI Pipeline

This is equivalent to running setUpOCI.py from CLI. This will generate the terraform .auto.tfvars files based on the CD3 Excel sheet input for the services chosen and commit them to OCI Devops GIT repo. Additionally, it also triggers terraform-apply pipelines for the corresponding services chosen in setUpOCI pipeline.

Below table shows the stages executed in this pipeline along with their description:

setUpOCI Pipeline Stages

Stage Name Description Possible Outcomes
Validate Input Parameters Validates input file name/size, selected parameters Displays Unstable if any of the
validation fails. Pipeline stops
further execution in that case.
Update setUpOCI.properties Updates _setUpOCI.properties
with input filename and workflow_type
Displays Failed if any issue during execution
Execute setUpOCI Executes python code to generate required
tfvars files. The console output for this
stage is similar to setUpOCI.py execution via CLI.
Multiple options selected will
be processed sequentially in this stage. The Excel sheet can be downloaded from Build artifacts of the setupoci pipeline.
Displays Failed if any issue occurs
during its execution. Further stages
are skipped in that case.
Run Import Commands Based on the workflow_type as 'Export Existing Resources from OCI',
this stage invokes execution of
tf_import_commands_\<resource>_nonGF.sh
shell scripts which will import the
exported objects into tfstate. tf_import_commands for
multiple options selected will be
processed sequentially in this stage.
This stage is skipped for 'Create New Resources in OCI' workflow
Displays Failed if any issue occurs during its execution.
Further stages are skipped in that case.
Git Commit to develop Commits the terraform_files folder to OCI DevOps GIT Repo develop branch.
This will trigger respective terraform_pipelines
Pipeline stops further execution if there is
nothing to commit. In some cases when tfvars was generated in previous execution,
navigate to terraform-apply pipeline and trigger that manually
Trigger Terraform Pipelines Corresponding terraform apply pipelines
are auto triggered based on the service chosen

a. Download CD3 Excel File

Here are the steps to download excel file after successful completion of 'Execute setUpOCI' stage of the pipeline. The Excel file is available as an artifact for each build of the setUpOCI pipeline.

Note: For Greenfield workflow, this will be the same Excel file which was uploaded to create resources in OCI. For Non-Greenfield workflow, this will be the updated Excel file with exported OCI resource data.

2. terraform_files Folder

This is equivalent to /cd3user/tenancies/<customer_name>/terraform_files folder on your local system. The region directories along with all service directories, are present under this terraform_files folder. The toolkit will generate the .tfvars files for all resources under the service directory. Inside each service directory, pipelines for terraform-apply and terraform-destroy are present.

The terraform pipelines are either triggered automatically from setUpOCI pipeline or they can be triggered manually by navigating to any service directory path.

terraform-apply Pipeline Stages

Stage Name Description Possible Outcomes
Checkout SCM Checks out the latest terraform_files
folder from DevOps GIT repo develop branch
Set Environment Variables Sets the environment variables for region and service name
Terraform Plan Runs terraform plan against the
checked out code and saves it in tfplan.out
Pipeline stops further execution if
terraform plan shows no changes.
Displays Failed if any issue while executing terraform plan
OPA Runs the above genrated terraform plan against
Open Policies and displays the violations if any
Displays Unstable if any OPA rule is violated
Get Approval Approval Stage for reviewing the terraform plan.
There is 24 hours timeout for this stage.
Proceed - goes ahead with Terraform Apply stage.
Abort - pipeline is aborted and stops further execution
Terraform Apply Applies the terraform configurations Displays Failed if any issue
while executing terraform apply
Git Commit to main Commit to main branch Stage is skipped if any issue while executing terraform apply

terraform-destroy Pipeline Stages

Stage Name Description Possible Outcomes
Checkout SCM Checks out the latest terraform_files
folder from DevOps GIT repo develop branch
Set Environment Variables Sets the environment variables for region and service name
Terraform Destroy Plan Runs terraform plan -destroy
against the checked out code
Displays Failed if any issue in plan output
Get Approval Approval Stage for reviewing the terraform plan.
There is 24 hours timeout for this stage.
Proceed - goes ahead with Terraform Destroy stage.
Abort - pipeline is aborted and stops furter execution
Terraform Destroy Destroys the terraform configurations Displays Failed if any issue
while executing terraform destroy
Git Commit to main Removes tfvars from respective directory in main branch of repo Stage is skipped if any issue while executing terraform apply

3. Region Based Views

Clicking on any of the views displays all terraform-apply and terraform-destroy pipelines in a single screen. This can also be used to trigger the terraform pipelines. This also includes Global view for global services like RPC.