Age | Commit message (Collapse) | Author | Files | Lines |
|
Variable attribute 'local' is not POSIX but is LSB supported.
It is available in other shells such as ash or dash.
And in ksh, local is the default scope of functions vaiables.
Though, the syntax "local var=XX" is only supported and found in bash.
Sadly, this is not detected by checkbashims.
- fix "local var=XX" bashisms
- add a manual command in tox.ini to detect them in the CI
https://wiki.ubuntu.com/DashAsBinSh#local
https://wiki.ubuntu.com/DashAsBinSh#declare_or_typeset
https://stackoverflow.com/questions/12000949/scope-of-variables-in-ksh
Issue-ID: OOM-2643
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: Iff26e50cd352eeb760d923a4740a6f92184fe0f2
|
|
Move all Chart.yaml to use apiVersion: 2
Move dependencies from requirements.yaml to Chart.yaml
Changes to all makeFiles
Changes to helm deploy plugin
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: I03c5290eee9e40f76eacbf171e774204cf5fb1c0
Issue-ID: OOM-2845
|
|
- create a .pre-commit-config.yaml configuration file with
* gitlint
* trailing blanks linter
* tabs removal linter
- exclude .git folder from it
- exclude Makefiles since tabs are mandatory by default in them
- create a tox pre-commit profile to run it from tox
note gitlint is not runnable at this pre-commit stage
- create pre-commit-install and pre-commit-uninstall tox profiles to
(un)install hooks locally and (un)perform tests at each "git commit"
call (i.e. without calling manually the pre-commit tox profile)
- precise pre-commit stages/types in the pre-commit configuration file
so that hooks are installed correctly. This avoids messages about
skipped tests when they are run at a wrong stage.
Issue-ID: OOM-2643
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: Ie95bb4f6f90be80b05a1398973caffeff7936881
|
|
- 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
|
|
with the following command
$ find . -not -path '*/\.*' -name *.sh -exec sed -i 's/\t/ /g' {} +
then realign manually what deserves it and in particular,
unindent some EOF scripting tags so they do not trigger errors.
Issue-ID: OOM-2643
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: Ibfa463ec8083d5a39de18a54d9c1d8746710fe03
|
|
Non-breaking spaces (0xa0) are interpreted differently than spaces,
what makes shell scripts debugging very tricky.
Issue-ID: OOM-264
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: Ica60bdc1274ae6f949c1df1cbef0836abd249654
|
|
pointed out by checkbashisms.
Issue-ID: OOM-2643
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: Ic9c4edc0fc6bd94a95bcb85d84379e868fb09930
|
|
pointed out by checkbashisms
$ mycmd=$(tox -e checkbashisms
| grep '(\[\[ foo \]\] should be \[ foo \])'
| sed -e "s@^[^.]*\(.[^ ]*\) line \([0-9]*\) .*@sed -i '\2s/\\\[\\\[\\\(
[^]]*\\\)\\\]\\\]/[\\\1]/g' \1;@")
$ eval $mycmd
plus fix manually quoting hells induced and bash specific regex
and multi-conditions
Issue-ID: OOM-2643
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: Ia9626256b5efc837ba12b25d351c8d8a0ba75fb4
|
|
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
|
|
This commit makes Contrib chart to use the new generator for repositories and
images.
As new templates doesn't work well with "sub charts", we move also
subcharts to components folder.
Issue-ID: OOM-2364
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: I33ca36a2b25e67fd9f74ae408cd34f58405d6b80
|
|
Extract ingress controller IP address which
is same as node where the metalLB is deployed
Signed-off-by: Lucjan Bryndza <l.bryndza@samsung.com>
Issue-ID: OOM-2289
Change-Id: I16e6d1704e54b679cb39caa3c720538a5ff60a60
|
|
Add info option for displaying target machine
configuration manual when DNS server is already
deployed on the cluster
Signed-off-by: Lucjan Bryndza <l.bryndza@samsung.com>
Issue-ID: OOM-2289
Change-Id: Ia876fd9ee51fbe852fae2f9daf8f769ff32efe46
|
|
Testing ingress controller based on virtual hosts
requires a lot of entries in the /etc/hosts.
The better way is to create DNS server for testing purposes.
Signed-off-by: Lucjan Bryndza <l.bryndza@samsung.com>
Issue-ID: OOM-2289
Change-Id: I2ab104c7391e9634972931ac7e79bec5711d2b39
Signed-off-by: Lucjan Bryndza <l.bryndza@samsung.com>
|