cf-blue-green icon indicating copy to clipboard operation
cf-blue-green copied to clipboard

Mapping the routes doesn't work with a 'naked' second level domain

Open khandelwal opened this issue 10 years ago • 1 comments

If you have this:

(ekip) vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/ekip-api$ cf routes | tail -n +4 | grep green production green cf.18f.us green-B production kids-prod 18f.gov green,green-B production abc.gov green production www abc.gov green,green-B production green-B cf.18f.us green-B production green-B 18f.gov green-B

The awk will generate this:

cf.18f.us -n green 18f.gov -n kids-prod green -n abc.gov abc.gov -n www cf.18f.us -n green-B 18f.gov -n green-B

The third line above is wrong. That's because of how awk is determining columns

khandelwal avatar Aug 28 '15 20:08 khandelwal

Yeeeeah, that awk line is super fragile :confused: Might need to prioritize https://github.com/18F/cf-blue-green/issues/2 sooner than later.

afeld avatar Aug 28 '15 20:08 afeld