Skip to content

Commit c5f9ac3

Browse files
committed
[GAZ-226] push ph-ee-g2p-to-chart-repo
1 parent f0acc21 commit c5f9ac3

2 files changed

Lines changed: 27 additions & 17 deletions

File tree

.circleci/config.yml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ jobs:
3131
PR_TITLE=$(curl -sSL "https://api.github.com/repos/openmf/$CIRCLE_PROJECT_REPONAME/pulls/$PR_NUMBER" | jq -r '.title')
3232
JIRA_STORY=-$(echo $PR_TITLE | cut -d "[" -f2 | cut -d "]" -f1 | tr '[A-Z]' '[a-z]')
3333
if [ -z "$JIRA_STORY" ]; then echo "Invalid PR title" && exit 1; else echo "Ticket NO: $JIRA_STORY" && JIRA_STORY_DIR=$(echo /jira-story-version); fi
34-
echo Charts will save in https://fynarfin.io/images$JIRA_STORY_DIR
34+
echo Charts will save in https://openmf.github.io/helm-charts/payment-hub/images$JIRA_STORY_DIR
3535
fi
36-
CHART_URL="https://fynarfin.io/images$JIRA_STORY_DIR/ph-ee-g2psandbox-0.0.0$JIRA_STORY"
36+
CHART_URL="https://openmf.github.io/helm-charts/payment-hub/images$JIRA_STORY_DIR/ph-ee-g2psandbox-0.0.0$JIRA_STORY"
3737
if curl --output /dev/null --silent --head --fail "$CHART_URL"; then
3838
sed -i "11s@^ *repository:.*\$@ repository: $CHART_URL@" ph-ee-env-labs/helm/ph-ee-g2p-sandbox-ci/Chart.yaml
3939
sed -i "12s@^ *version:.*\$@ version: 0.0.0$JIRA_STORY@" ph-ee-env-labs/helm/ph-ee-g2p-sandbox-ci/Chart.yaml
4040
echo "chart used: < $CHART_URL >"
4141
else
42-
CHART_URL="https://fynarfin.io/images/ph-ee-g2p-sandbox-ci-0.0.0"
42+
CHART_URL="https://openmf.github.io/helm-charts/payment-hub/images/ph-ee-g2p-sandbox-ci-0.0.0"
4343
echo "chart used: < $CHART_URL >"
4444
fi
4545
sed -i "6s/.*/version: 0.0.0$JIRA_STORY/" ph-ee-env-labs/helm/ph-ee-g2p-sandbox-ci/Chart.yaml
@@ -74,7 +74,7 @@ jobs:
7474
PR_TITLE=$(curl -sSL "https://api.github.com/repos/openmf/$CIRCLE_PROJECT_REPONAME/pulls/$PR_NUMBER" | jq -r '.title')
7575
JIRA_STORY=-$(echo $PR_TITLE | cut -d "[" -f2 | cut -d "]" -f1 | tr '[A-Z]' '[a-z]')
7676
if [ -z "$JIRA_STORY" ]; then echo "Invalid PR title" && exit 1; else echo "Ticket NO: $JIRA_STORY" && JIRA_STORY_DIR=$(echo /jira-story-version); fi
77-
echo Charts will save in https://fynarfin.io/images$JIRA_STORY_DIR
77+
echo Charts will save in https://openmf.github.io/helm-charts/payment-hub/images$JIRA_STORY_DIR
7878
fi
7979
sed -i "5s/.*/version: 0.0.0-SNAPSHOT$JIRA_STORY/" helm/ph-ee-engine/Chart.yaml
8080
helm dep up helm/ph-ee-engine
@@ -112,13 +112,13 @@ jobs:
112112
JIRA_STORY=-$(echo $PR_TITLE | cut -d "[" -f2 | cut -d "]" -f1 | tr '[A-Z]' '[a-z]')
113113
if [ -z "$JIRA_STORY" ]; then echo "Invalid PR title" && exit 1; else echo "Ticket NO: $JIRA_STORY" && JIRA_STORY_DIR=$(echo /jira-story-version); fi
114114
fi
115-
CHART_URL="https://fynarfin.io/images$JIRA_STORY_DIR/ph-ee-engine-0.0.0-SNAPSHOT$JIRA_STORY"
115+
CHART_URL="https://openmf.github.io/helm-charts/payment-hub/images$JIRA_STORY_DIR/ph-ee-engine-0.0.0-SNAPSHOT$JIRA_STORY"
116116
if curl --output /dev/null --silent --head --fail "$CHART_URL"; then
117117
sed -i "10s@^ *repository:.*\$@ repository: $CHART_URL@" helm/g2p-sandbox/Chart.yaml
118118
sed -i "11s@^ *version:.*\$@ version: 0.0.0-SNAPSHOT$JIRA_STORY@" helm/g2p-sandbox/Chart.yaml
119119
echo "chart used: < $CHART_URL >"
120120
else
121-
CHART_URL="https://fynarfin.io/images/ph-ee-engine-0.0.0-SNAPSHOT"
121+
CHART_URL="https://openmf.github.io/helm-charts/payment-hub/images/ph-ee-engine-0.0.0-SNAPSHOT"
122122
echo "chart used: < $CHART_URL >"
123123
fi
124124
sed -i "5s/.*/version: 0.0.0$JIRA_STORY/" helm/g2p-sandbox/Chart.yaml
@@ -130,8 +130,17 @@ jobs:
130130
echo "$CERT_FILE" | base64 --decode > b64encoded.pem
131131
chmod 400 b64encoded.pem
132132
ssh -i b64encoded.pem -o StrictHostKeyChecking=No ec2-user@13.233.68.128 sudo mkdir -p /apps/apache-tomcat-7.0.82/webapps/ROOT/images$JIRA_STORY_DIR/ph-ee-g2psandbox-0.0.0$JIRA_STORY
133-
scp -o StrictHostKeyChecking=No -i b64encoded.pem index.yaml ph-ee-g2psandbox-0.0.0$JIRA_STORY.tgz ec2-user@13.233.68.128:~/
134-
ssh -i b64encoded.pem -o StrictHostKeyChecking=No ec2-user@13.233.68.128 sudo mv -t /apps/apache-tomcat-7.0.82/webapps/ROOT/images$JIRA_STORY_DIR/ph-ee-g2psandbox-0.0.0$JIRA_STORY index.yaml ph-ee-g2psandbox-0.0.0$JIRA_STORY.tgz
133+
ssh -i b64encoded.pem -o StrictHostKeyChecking=No ec2-user@13.233.68.128 sudo mv -t /apps/apache-tomcat-7.0.82/webapps/ROOT/
134+
git clone https://github.com/openMF/helm-charts.git
135+
136+
mkdir -p helm-charts/payment-hub/images$JIRA_STORY_DIR/ph-ee-g2psandbox-0.0.0$JIRA_STORY
137+
cp -t helm-charts/payment-hub/images$JIRA_STORY_DIR/ph-ee-g2psandbox-0.0.0$JIRA_STORY index.yaml ph-ee-g2psandbox-0.0.0$JIRA_STORY.tgz
138+
cd helm-charts
139+
git config --global user.email "manoj@mifos.org"
140+
git config --global user.name "Manoj-CI"
141+
git add --a
142+
git commit -m "pushing ph-ee-g2psandbox-0.0.0$JIRA_STORY"
143+
git push https://$HELM_GIT_USER:$HELM_GIT_PAT@github.com/openMF/helm-charts.git master
135144
build-host-g2p-fyn-chart:
136145
docker:
137146
- image: cimg/python:3.10
@@ -156,13 +165,13 @@ jobs:
156165
JIRA_STORY=-$(echo $PR_TITLE | cut -d "[" -f2 | cut -d "]" -f1 | tr '[A-Z]' '[a-z]')
157166
if [ -z "$JIRA_STORY" ]; then echo "Invalid PR title" && exit 1; else echo "Ticket NO: $JIRA_STORY" && JIRA_STORY_DIR=$(echo /jira-story-version); fi
158167
fi
159-
CHART_URL="https://fynarfin.io/images$JIRA_STORY_DIR/ph-ee-g2psandbox-0.0.0$JIRA_STORY"
168+
CHART_URL="https://openmf.github.io/helm-charts/payment-hub/images$JIRA_STORY_DIR/ph-ee-g2psandbox-0.0.0$JIRA_STORY"
160169
if curl --output /dev/null --silent --head --fail "$CHART_URL"; then
161170
sed -i "11s@^ *repository:.*\$@ repository: $CHART_URL@" ph-ee-env-labs/helm/g2p-sandbox-fynarfin-SIT/Chart.yaml
162171
sed -i "12s@^ *version:.*\$@ version: 0.0.0$JIRA_STORY@" ph-ee-env-labs/helm/g2p-sandbox-fynarfin-SIT/Chart.yaml
163172
echo "chart used: < $CHART_URL >"
164173
else
165-
CHART_URL="https://fynarfin.io/images/ph-ee-g2psandbox-0.0.0"
174+
CHART_URL="https://openmf.github.io/helm-charts/payment-hub/images/ph-ee-g2psandbox-0.0.0"
166175
echo "chart used: < $CHART_URL >"
167176
fi
168177
sed -i "6s/.*/version: 0.2.0$JIRA_STORY/" ph-ee-env-labs/helm/g2p-sandbox-fynarfin-SIT/Chart.yaml
@@ -198,13 +207,13 @@ jobs:
198207
JIRA_STORY=-$(echo $PR_TITLE | cut -d "[" -f2 | cut -d "]" -f1 | tr '[A-Z]' '[a-z]')
199208
if [ -z "$JIRA_STORY" ]; then echo "Invalid PR title" && exit 1; else echo "Ticket NO: $JIRA_STORY" && JIRA_STORY_DIR=$(echo /jira-story-version); fi
200209
fi
201-
CHART_URL="https://fynarfin.io/images$JIRA_STORY_DIR/ph-ee-engine-0.0.0-SNAPSHOT$JIRA_STORY"
210+
CHART_URL="https://openmf.github.io/helm-charts/payment-hub/images$JIRA_STORY_DIR/ph-ee-engine-0.0.0-SNAPSHOT$JIRA_STORY"
202211
if curl --output /dev/null --silent --head --fail "$CHART_URL"; then
203212
sed -i "10s@^ *repository:.*\$@ repository: $CHART_URL@" helm/g2p-sandbox-security/Chart.yaml
204213
sed -i "11s@^ *version:.*\$@ version: 0.0.0-SNAPSHOT$JIRA_STORY@" helm/g2p-sandbox-security/Chart.yaml
205214
echo "chart used: < $CHART_URL >"
206215
else
207-
CHART_URL="https://fynarfin.io/images/ph-ee-engine-0.0.0-SNAPSHOT"
216+
CHART_URL="https://openmf.github.io/helm-charts/payment-hub/images/ph-ee-engine-0.0.0-SNAPSHOT"
208217
echo "chart used: < $CHART_URL >"
209218
fi
210219
sed -i "5s/.*/version: 0.0.0$JIRA_STORY/" helm/g2p-sandbox-security/Chart.yaml
@@ -244,7 +253,7 @@ jobs:
244253
default: https://raw.githubusercontent.com/openMF/ph-ee-env-labs/master/.circleci/services.txt
245254
type: string
246255
chart-base-url:
247-
default: https://fynarfin.io/images
256+
default: https://openmf.github.io/helm-charts/payment-hub/images
248257
type: string
249258
chart-name:
250259
default: ph-ee-g2p-sandbox-ci
@@ -427,15 +436,15 @@ jobs:
427436
fi
428437
429438
# Generating the chart url for deployment
430-
# chart: "https://fynarfin.io/images/ph-ee-g2p-sandbox-ci/ph-ee-g2p-sandbox-ci-0.0.0.tgz"
439+
# chart: "https://openmf.github.io/helm-charts/payment-hub/images/ph-ee-g2p-sandbox-ci/ph-ee-g2p-sandbox-ci-0.0.0.tgz"
431440
ORB_PARAM_CHART=$(echo "$ORB_CHART_BASE_URL$JIRA_STORY_DIR/$ORB_CHART_NAME$JIRA_STORY/$ORB_CHART_NAME-$ORB_CHART_VERSION$JIRA_STORY.tgz")
432441
CHART_URL="$ORB_PARAM_CHART"
433442
if curl --output /dev/null --silent --head --fail "$CHART_URL"; then
434443
echo "chart used: < $CHART_URL >"
435-
# add-repo: "https://fynarfin.io/images/ph-ee-g2p-sandbox-ci"
444+
# add-repo: "https://openmf.github.io/helm-charts/payment-hub/images/ph-ee-g2p-sandbox-ci"
436445
ORB_PARAM_REPO=$(echo "$ORB_CHART_BASE_URL$JIRA_STORY_DIR/$ORB_CHART_NAME$JIRA_STORY")
437446
else
438-
CHART_URL="https://fynarfin.io/images/ph-ee-g2p-sandbox-ci/ph-ee-g2p-sandbox-ci-0.0.0.tgz"
447+
CHART_URL="https://openmf.github.io/helm-charts/payment-hub/images/ph-ee-g2p-sandbox-ci/ph-ee-g2p-sandbox-ci-0.0.0.tgz"
439448
ORB_PARAM_REPO=$(echo "$ORB_CHART_BASE_URL/$ORB_CHART_NAME")
440449
echo "chart used: < $CHART_URL >"
441450
fi
@@ -589,6 +598,7 @@ workflows:
589598
- AWS
590599
- Helm
591600
- slack
601+
- Secrets
592602
- build-host-g2p-fyn-chart:
593603
requires:
594604
- build-and-host-g2p-sandbox

helm/g2p-sandbox/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ appVersion: 0.0.0
77

88
dependencies:
99
- name: ph-ee-engine
10-
repository: https://fynarfin.io/images/ph-ee-engine-0.0.0-SNAPSHOT
10+
repository: https://openmf.github.io/helm-charts/payment-hub/images/ph-ee-engine-0.0.0-SNAPSHOT
1111
version: 0.0.0-SNAPSHOT
1212

1313
- name: account_mapper

0 commit comments

Comments
 (0)