Loading capif/templates/cd-deploy-ocf.gitlab-ci.yml +12 −2 Original line number Diff line number Diff line Loading @@ -276,6 +276,7 @@ deploy_ocf_staging: echo "Generate env file for helm scripts" cat <<EOF > helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env.template # -------------------------------------------------------------------------------------------------------------- # This file is generated by the GitLab CI pipeline for deploying CAPIF to the staging environment. # It contains environment variables that are used in the deployment process. # The values of these variables are set based on the current GitLab CI environment and the configuration Loading Loading @@ -334,13 +335,21 @@ deploy_ocf_staging: # Step 5: OpenCAPIF Register configuration # Only Common configuration of env apply to both mongo express components. REGISTER_HOSTNAME # -------------------------------------------------------------------------------------------------------------- EOF sed -e "s/^[ ]*export VAULT_ACCESS_TOKEN=.*/export VAULT_ACCESS_TOKEN=$VAULT_ACCESS_TOKEN/" \ helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env.template > helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env ./helm/scripts/install_capif.sh $NAMESPACE_DEV_TO_STAGING-mr fi artifacts: name: "$NAMESPACE_DEV_TO_STAGING-mr.template" paths: - helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env.template expire_in: 1 day when: always delete_ocf_staging: stage: delete_ocf_staging needs: Loading @@ -360,6 +369,7 @@ delete_ocf_staging: else echo "### No helm capif directory and no env file found for $NAMESPACE_DEV_TO_STAGING-mr, create file ###" cat <<EOF > helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env.template # -------------------------------------------------------------------------------------------------------------- # This file is generated by the GitLab CI pipeline for deploying CAPIF to the staging environment. # It contains environment variables that are used in the deployment process. # The values of these variables are set based on the current GitLab CI environment and the configuration Loading Loading @@ -418,7 +428,7 @@ delete_ocf_staging: # Step 5: OpenCAPIF Register configuration # Only Common configuration of env apply to both mongo express components. REGISTER_HOSTNAME # -------------------------------------------------------------------------------------------------------------- EOF sed -e "s/^[ ]*export VAULT_ACCESS_TOKEN=.*/export VAULT_ACCESS_TOKEN=$VAULT_ACCESS_TOKEN/" \ helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env.template > helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env Loading Loading
capif/templates/cd-deploy-ocf.gitlab-ci.yml +12 −2 Original line number Diff line number Diff line Loading @@ -276,6 +276,7 @@ deploy_ocf_staging: echo "Generate env file for helm scripts" cat <<EOF > helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env.template # -------------------------------------------------------------------------------------------------------------- # This file is generated by the GitLab CI pipeline for deploying CAPIF to the staging environment. # It contains environment variables that are used in the deployment process. # The values of these variables are set based on the current GitLab CI environment and the configuration Loading Loading @@ -334,13 +335,21 @@ deploy_ocf_staging: # Step 5: OpenCAPIF Register configuration # Only Common configuration of env apply to both mongo express components. REGISTER_HOSTNAME # -------------------------------------------------------------------------------------------------------------- EOF sed -e "s/^[ ]*export VAULT_ACCESS_TOKEN=.*/export VAULT_ACCESS_TOKEN=$VAULT_ACCESS_TOKEN/" \ helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env.template > helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env ./helm/scripts/install_capif.sh $NAMESPACE_DEV_TO_STAGING-mr fi artifacts: name: "$NAMESPACE_DEV_TO_STAGING-mr.template" paths: - helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env.template expire_in: 1 day when: always delete_ocf_staging: stage: delete_ocf_staging needs: Loading @@ -360,6 +369,7 @@ delete_ocf_staging: else echo "### No helm capif directory and no env file found for $NAMESPACE_DEV_TO_STAGING-mr, create file ###" cat <<EOF > helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env.template # -------------------------------------------------------------------------------------------------------------- # This file is generated by the GitLab CI pipeline for deploying CAPIF to the staging environment. # It contains environment variables that are used in the deployment process. # The values of these variables are set based on the current GitLab CI environment and the configuration Loading Loading @@ -418,7 +428,7 @@ delete_ocf_staging: # Step 5: OpenCAPIF Register configuration # Only Common configuration of env apply to both mongo express components. REGISTER_HOSTNAME # -------------------------------------------------------------------------------------------------------------- EOF sed -e "s/^[ ]*export VAULT_ACCESS_TOKEN=.*/export VAULT_ACCESS_TOKEN=$VAULT_ACCESS_TOKEN/" \ helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env.template > helm/scripts/envs/$NAMESPACE_DEV_TO_STAGING-mr.env Loading