aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/sdnc/components/sdnc-prom/resources
AgeCommit message (Collapse)AuthorFilesLines
2022-04-28[COMMON] Fix 'trap RETURN' and $BASHPID bashismsguillaume.lambert1-3/+3
pointed out by checkbashisms. Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: I19e7f50d5a98087d59cbe99778bee1a5f7a3a27c
2021-12-08[COMMON] Fix & add to bashisms CI failover scriptsguillaume.lambert1-3/+3
Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: Icf139e50d44aed0315d0e4cb21c59ad05a5a3bdb
2021-09-22[COMMON] Enforce checkbashisms tox profileGuillaume Lambert1-2/+2
- add checkbahims to tox.ini default profiles - remove -f options to unforce bashisms detection in explicit bash scripts and to differentiate treatments between bash and sh - migrate #!/bin/bash shebangs to #!/bin/sh for scripts without bashisms The following scripts have not been migrated since they still use bashisms difficult to migrate (mostly arrays - more details below) ./kubernetes/common/mariadb-init/resources/config/db_init.sh ./kubernetes/portal/components/portal-mariadb/resources/config/ \ mariadb/docker-entrypoint.sh ./kubernetes/helm/plugins/deploy/deploy.sh ./kubernetes/helm/plugins/undeploy/undeploy.sh ./kubernetes/sdnc/components/sdnc-prom/resources/bin/ensureSdncActive.sh $ find . -not -path '*/\.*' -name *.sh -exec checkbashisms -f {} + 2>&1\ | grep line | cut -d' ' -f 7- | sort | uniq -c | sort -k1,1nr 18 (bash arrays, ${name[0|*|@]}): 2 (declare): 1 ($FUNCNAME): 1 (shopt): 1 (trap with ERR|DEBUG|RETURN): https://mywiki.wooledge.org/Bashism#Arrays https://mywiki.wooledge.org/Bashism#Special_Variables https://mywiki.wooledge.org/Bashism#Builtins https://www.oilshell.org/release/0.5.alpha2/test/spec.wwz/builtin-trap.html Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Id06ad1d45004321a293bdd26038d8da5f7b6b4ac
2021-06-24[COMMON] Fix some bashismsGuillaume Lambert2-3/+3
pointed out by checkbashisms: - variable name HOSTNAME - source instead of . - sleep with suffix - string increments And migrate a few shebangs to /bin/sh Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: I653c14454a3232b5a349ca1564ece53ddc94289d
2021-06-23[COMMON] Revert "[COMMON] Fix a few bashisms"Krzysztof Opasiak2-3/+3
This reverts commit 62178a49cc9e4088019d426636657d9f2980d242. This commit introduced regression on portal db config job which is now unable to start: /usr/local/bin/docker-entrypoint.sh: line 114: syntax error near unexpected token `(' Issue-ID: OOM-1 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Change-Id: I3cb72cd7625b180b364b713fe942d5956736ebef
2021-06-15[COMMON] Fix a few bashismsGuillaume Lambert2-3/+3
pointed out by checkbashisms: - variable name HOSTNAME - source instead of . - variable increments - sleep with suffix And migrate a few shebangs to /bin/sh Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: I82981bcff17e88cf824935b841ce37a585ddde00
2021-04-16[COMMON] Fix condition equality bashismsGuillaume Lambert4-4/+4
pointed out by checkbashisms. $ mycmd=$(tox -e checkbashisms | grep "(should be 'b = a')" | sed -e "s@^[^.]*\(.[^ ]*\) line \([0-9]*\) .*@sed -i -e '\2s/==/=/g' \1;@") $ eval $mycmd Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: I9032130bc4717e111de11a73187c2f1052376e45
2021-04-13[COMMON] Fix shell scripts missing shebangsGuillaume Lambert1-2/+2
pointed out by checkbashisms. $ tox -e checkbashisms |grep 'interpreter line' | cut -d' ' -f2 |xargs grep -lv '#!/bin/sh' | xargs sed -i -e '1i#!/bin/sh' -e '1i\\' plus manual fixes Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Ic41fec6ebadd162cecf889f2b119ac82551bd21d
2021-03-02[COMMON] Get rid of python2Guillaume Lambert1-1/+2
Python 2 is no more supported and Python 3 must be used. Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: I81158561fa0af4b1441b27b3a4546b815fb659e3
2020-10-21[SDNC] change comment styleJakub Latusek8-0/+16
Signed-off-by: Jakub Latusek <j.latusek@samsung.com> Change-Id: Ia390319f744931f435615af49246c0e13cdb8564 Issue-ID: OOM-2562
2020-05-08[Tree-wide] Make chart build process predictibleKrzysztof Opasiak10-0/+618
ONAP is built using plain makefile rules. List of targets is generated using wildcard function. Based on make changelog: http://git.savannah.gnu.org/cgit/make.git/tree/NEWS since version 3.82 wildcard is not going to sort its results which means that charts are being processed in an arbitrary order which may lead to build failure due to missing dependencies. Since version 4.3 make started sorting the wildcard results once again which may lead to build issues. To avoid that and make our builds predictible independently from Makefile version let's make sure that we always sort wildcard results. Addinally let's use 'file://' instead of '@local' for charts in common to resolve dependencies between them. Issue-ID: OOM-2399 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Change-Id: Iacb02dcdbd577ce0e9ca1078dd0586d296ec9375