This code was tested on a Linux system (our engineering team will test soon on a macOS system).
This example simulates a CI/CD pipeline and its integration with Concert. It emulates a CI/CD pipeline update, where the release of an application is pushed to the target environment. During this flow, the CI/CD pipeline generates and sends the data that Concert needs.
dockerrunning on your workstation (orpodmanconfigured with docker emulation).
-
Go to the
scriptsdirectory and run thesetup.shscript:./setup.sh
-
Go to the
concert_datadirectory and update thedemo_build_envs.variablesfile accordingly by entering the proper values for your target environment. The variables in thedemo_build_envs.variablesfile control the behavior of the scripts in this repo. The following are typical variables you may want to update:
CONCERT_URL- Your Concert URL with the suffix/ibm/concert(e.g.,https://concert-concert-instance.apps.o2-160435.cp.fyre.ibm.com/ibm/concert).INSTANCE_ID- For non-SaaS deployments of Concert, use0000-0000-0000-0000API_KEY- Your Concert API key value. Use eitherC_API_KEY <apikey>orZenApiKey <apikey>depending on where Concert is hosted (where<apikey>is your API key value). See Generating and using an API key for instructions to generate an API key.APP_NAME- Name of your applicationAPP_VERSION- Version of your applicationCOMPONENT_NAME- Your application component nameENVIRONMENT_NAME_1- Name of the first environment where your application is hostedENVIRONMENT_NAME_2- Name of the second environment where your application is hostedENVIRONMENT_NAME_3- Name of the third environment where your application is hostedIMAGE_NAME- The image name for your application componentIMAGE_TAG- The image tag for your application component
-
Go to the
scriptsfolder. -
Run the
application_definition.shscript. You only need to run this script once or when updates to the application definition are required. This provides Concert with initial details of your application and of the forthcoming data to construct the Application inventory and Arena view../application_definition.sh
-
Run the
simulate_ci_pipeline.shscript. This simulates the generation of application assets (e.g., image, CycloneDX SBOM files, Concert Build SBOM file, etc.) to represent a commited version that can be released to any environment such as pre-production environments../simulate_ci_pipeline.sh
-
Run the
simulate_cd_pipeline.shscript. This simulates the generation of application assets (e.g., image, CycloneDX SBOM files, Concert Build SBOM file, etc.) to represent a commited version that can be released to any environment such as pre-production environments../simulate_cd_pipeline.sh
If you use podman instead of docker, please update the following line in the concert_data/demo_build_envs.variables file, from
export CONTAINER_COMMAND="docker run" to
export CONTAINER_COMMAND="podman run"If you run into problems running the container due to missing options or other problems with user permissions, please update the following variable definition in the concert_data/demo_build_envs.variables file:
export OPTIONS="-it --rm -u $(id -u):$(id -g)"