From acb32be0189ac75b67a228faadc3e174439cc04f Mon Sep 17 00:00:00 2001 From: LeiZhou <102779531+LeiZhou-97@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:59:58 +0800 Subject: [PATCH] exclude the pccs and qgs when build ccnp containers (#225) Signed-off-by: LeiZhou-97 --- .github/workflows/pr-container-check.yaml | 1 - container/build.sh | 10 +++++++++- container/pccs/README.md | 3 +-- container/pccs/{pre-built.sh => pre-build.sh} | 0 4 files changed, 10 insertions(+), 4 deletions(-) rename container/pccs/{pre-built.sh => pre-build.sh} (100%) diff --git a/.github/workflows/pr-container-check.yaml b/.github/workflows/pr-container-check.yaml index e30ba39d..ceb6440b 100644 --- a/.github/workflows/pr-container-check.yaml +++ b/.github/workflows/pr-container-check.yaml @@ -23,5 +23,4 @@ jobs: - name: Build containers run: | cd container - touch pccs/ssl_key # touch a ssl_key fake file ./build.sh -a build -r gar-registry.caas.intel.com/cpio diff --git a/container/build.sh b/container/build.sh index 5fa4e674..f28f4ef9 100755 --- a/container/build.sh +++ b/container/build.sh @@ -9,6 +9,8 @@ registry="" container="all" tag="latest" docker_build_clean_param="" +pccs=false +qgs=false all_containers=() # @@ -36,6 +38,8 @@ usage: $(basename "$0") [OPTION]... -c same as directory name -g container image tag -f Clean build + -p Flag to build PCCS + -q Flag to build QGS EOM exit 1 } @@ -44,7 +48,7 @@ EOM # Process arguments # function process_args { - while getopts ":a:r:c:g:hf" option; do + while getopts ":a:r:c:g:hfpq" option; do case "${option}" in a) action=${OPTARG};; r) registry=${OPTARG};; @@ -52,6 +56,8 @@ function process_args { g) tag=${OPTARG};; h) usage;; f) docker_build_clean_param="--no-cache";; + p) pccs=true;; + q) qgs=true;; *) esac done @@ -131,7 +137,9 @@ function build_images { if [[ "$container" == "all" ]]; then for item in "${all_containers[@]}" do + if [[ ${item} != "pccs" && ${item} != "qgs" ]] || [[ ${item} == "pccs" && ${pccs} == true ]] || [[ ${item} == "qgs" && ${qgs} == true ]] ; then build_a_image "$item" + fi done else build_a_image "$container" diff --git a/container/pccs/README.md b/container/pccs/README.md index 813cc8f1..cd4b282e 100644 --- a/container/pccs/README.md +++ b/container/pccs/README.md @@ -38,8 +38,7 @@ Obtain a provisioning API key. Goto https://sbx.api.portal.trustedservices.intel In the `container` directory, a default.json template file has been provided. The detailed value will be injected after executing the script. ```bash -cd container -./pre-built.sh +./pre-build.sh ``` ## 2. Install PCCS Service diff --git a/container/pccs/pre-built.sh b/container/pccs/pre-build.sh similarity index 100% rename from container/pccs/pre-built.sh rename to container/pccs/pre-build.sh