Skip to content
Snippets Groups Projects

Allow flexibility to define a target submodule and its branch

Closed Eesaan Atluri requested to merge feat-abstract-target-branch-and-project into master
1 file
+ 22
2
Compare changes
  • Side-by-side
  • Inline
+ 22
2
@@ -38,8 +38,28 @@ build_packer:
@@ -38,8 +38,28 @@ build_packer:
name: $TARGET_ENV
name: $TARGET_ENV
tags: [build]
tags: [build]
script:
script:
- cd CRI_XCBC && git checkout dev && git pull && cd ..
- git submodule update --remote
- cd CRI_Cluster_Monitor && git checkout master && git pull && cd ..
- declare -A hashmap=(["CRI_XCBC"]="${cluster_ansible_feat_req_ids}" ["CRI_Cluster_Monitor"]="${clustermon_ansible_feat_req_ids}")
 
- |
 
for each_repo in ${!hashmap[@]}
 
do
 
echo "Inside first for loop cd to: $each_repo"
 
cd $each_repo
 
git config user.name "$GITLAB_USER_NAME"
 
git config user.email "$GITLAB_USER_EMAIL"
 
echo "Done cd to: $each_repo"
 
echo "Checking out pull requests ${hashmap[$each_repo]}"
 
git checkout -B test_feature_requests
 
git fetch origin +refs/pull/*/merge:refs/remotes/origin/pr/*
 
for each_feature in ${hashmap[$each_repo]}
 
do
 
for num in ${each_feature[@]}
 
do
 
git merge --no-ff origin/pr/$num
 
done
 
done
 
cd ..
 
done
- export PKR_VAR_build_image_name="xdmod-$TARGET_ENV-$(TZ=America/Chicago date +%Y-%m-%dT%H%M%S)"
- export PKR_VAR_build_image_name="xdmod-$TARGET_ENV-$(TZ=America/Chicago date +%Y-%m-%dT%H%M%S)"
- 'sed -i -E "s/(enable_selinix_permissive: ).*/\1true/" CRI_Cluster_Monitor/group_vars/all'
- 'sed -i -E "s/(enable_selinix_permissive: ).*/\1true/" CRI_Cluster_Monitor/group_vars/all'
- 'sed -i -E "s/(enable_simplesaml: ).*/\1true/" CRI_Cluster_Monitor/group_vars/all'
- 'sed -i -E "s/(enable_simplesaml: ).*/\1true/" CRI_Cluster_Monitor/group_vars/all'
Loading