Skip to content

Commit

Permalink
Merge pull request #49 from intershop/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jlistemann-ish authored Aug 2, 2022
2 parents 986907d + b0bbe4c commit adc95b7
Show file tree
Hide file tree
Showing 39 changed files with 1,111 additions and 286 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sync-to-azure-boards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
github_token: "${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}"
ado_organization: "intershop-com"
ado_project: "Products"
ado_area_path: "Products\\Intershop Order Management\\Blueprint Projekt"
ado_area_path: "Products\\Intershop Order Management\\Blueprint Project"
ado_iteration_path: "Products\\Domain Order Management"
ado_wit: "Task"
ado_new_state: "New"
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ devenv-share/
filebeat-kubernetes.yaml
.idea/
*.iml
devenv.user.properties
devenv.user.properties
testframework-config.user.yaml
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ extends:
parameters:
agentPool: ubuntu-20.4-DS4_v2-adopt-adoptium-jdk-ora
artifactsFeed: order-iom-releases
dockerRepoIOMServiceConnection: order-iom-docker.intershop.de.dockerhub
dockerRepoIOM: docker.intershop.de/intershophub
dockerRepoIOMServiceConnection: order-iom-docker.tools.intershop.com
dockerRepoIOM: docker.tools.intershop.com/iom/intershophub
acrServiceConnection: order-iomInternalACR-ISH-ENG-IOM
acr: iominternalacr.azurecr.io
projectEnvName: dev
37 changes: 37 additions & 0 deletions devenv-4-iom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,43 @@ If _devenv-4-iom_ is already installed and you are looking for a short overview
```
devenv-cli.sh -h
```
# Release Information 2.2.0

## Compatibility

At the time of release of _devenv-4-iom_, it is compatible with the latest version of IOM. As long as there is no new release of _devenv-4-iom_, it is ensured, that new releases of IOM are compatible with _devenv-4-iom_. If a new version of IOM requires an update of _devenev-4-iom_, the release notes of IOM will contain an according statement.

At the time of writing, _devenv-4-iom 2.2.0_ is compatible with all IOM versions between 3.0 and 4.1 (inclusive).

## New Features

### Documentation, Comments and Default Values were adapted for new Intershop Docker Registry <!-- 77974 -->

Intershop provides Docker images of their products now on _docker.tools.intershop.com_. All documentation, comments and default values were changed to use this new server.

## Migration Notes

### Default value of _DB_ACCOUNT_IMAGE_ was changed <!-- 77974 -->

The Docker repository, that is used by the default value of DB_ACCOUNT_IMAGE was changed to _docker.tools.intershop.com_. Since this repository requires authorization to access its images, a new Pull-Secret has to be created (see chapter [Accessing in Private Docker Registry](docs/04_development_process.md#accessing-a-private-docker-registry)).

# Release Information 2.1.0

## Compatibility

At the time of release of _devenv-4-iom_, it is compatible with the latest version of IOM. As long as there is no new release of _devenv-4-iom_, it is ensured, that new releases of IOM are compatible with _devenv-4-iom_. If a new version of IOM requires an update of _devenev-4-iom_, the release notes of IOM will contain an according statement.

At the time of writing, _devenv-4-iom 2.1.0_ is compatible with all IOM versions between 3.0 and 4.1 (inclusive).

## New Features

### Support for bash completion <!-- 77729 -->

_devenv-4-iom_ now supports bash completion. In order to use this new feature, the according completion script has to be installed, see [documentation of installation](doc/00_installation.md).

### Support for IOM Test-Framework <!-- 75996 -->

When starting the IOM application server (`create iom`), a file _testframework-config.user.yaml_ is created within the project root directory, containing all necessary information to run local tests based on [IOM Test-Framework](https://github.com/intershop/iom-test-framework). Along with support for this file, one new configuration properties was added: _CREATE_TEST_CONFIG_, which controls the creation of the configuration file.

# Release Information 2.0.5

Expand Down
256 changes: 256 additions & 0 deletions devenv-4-iom/bin/devenv-cli-completion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
# returns $command if $input is somewhere between $prefix and $command, otherwise false is returned.
_devenv_is_command() {
local input prefix command
# remove everything from $input, that cannot be accepted
input=$(echo "$1" | sed 's/[^a-zA-Z-]//g')
prefix="$2"
command="$3"

if echo "$input" | grep -qi "^$prefix" && echo "$command" | grep -qi "^$input"; then
echo "$command"
else
false
fi
}

_devenv_dirs() {
ls -d "$1"* 2> /dev/null | while read LINE; do
if file "$LINE" | grep -q 'directory$'; then
echo -n "$LINE/ "
fi
done
}

_devenv_cli() {
local cur prev property_file cmd sub_cmd

# Array variable storing the possible completions.
COMPREPLY=()

cur=${COMP_WORDS[$COMP_CWORD]}
prev=${COMP_WORDS[$(($COMP_CWORD - 1))]}

#---------------------------------------------------------------------------
# investigate arguments, that are already present at the command line
#---------------------------------------------------------------------------

# according to devenv-cli.sh, the first arg is assumed to be a property file, if a local
# file with that name exists.
if [ "$COMP_CWORD" -gt 1 -a -f "${COMP_WORDS[1]}" ]; then
property_file="${COMP_WORDS[1]}"
fi

# determine $cmd
if [ -z "$property_file" -a "$COMP_CWORD" -gt 1 ]; then
cmd="${COMP_WORDS[1]}"
elif [ ! -z "$property_file" -a "$COMP_CWORD" -gt 2 ]; then
cmd="${COMP_WORDS[2]}"
fi

# expand $cmd (user might have entered an abbrevation)
if [ ! -z "$cmd" ]; then
cmd=$(_devenv_is_command $cmd i info ||
_devenv_is_command $cmd c create ||
_devenv_is_command $cmd de delete ||
_devenv_is_command $cmd a apply ||
_devenv_is_command $cmd du dump ||
_devenv_is_command $cmd g get ||
_devenv_is_command $cmd l log)
fi

# determine $sub_cmd
if [ -z "$property_file" -a "$COMP_CWORD" -gt 2 ]; then
sub_cmd="${COMP_WORDS[2]}"
elif [ ! -z "$property_file" -a "$COMP_CWORD" -gt 3 ]; then
sub_cmd="${COMP_WORDS[3]}"
fi

# expand $sub_cmd (user might have entered an abbrevation)
if [ ! -z "$sub_cmd" ]; then
case "$cmd" in
info)
sub_cmd=$(_devenv_is_command $sub_cmd i iom ||
_devenv_is_command $sub_cmd p postgres ||
_devenv_is_command $sub_cmd m mailserver ||
_devenv_is_command $sub_cmd s storage ||
_devenv_is_command $sub_cmd cl cluster ||
_devenv_is_command $sub_cmd co config)
;;
create)
sub_cmd=$(_devenv_is_command $sub_cmd s storage ||
_devenv_is_command $sub_cmd n namespace ||
_devenv_is_command $sub_cmd m mailserver ||
_devenv_is_command $sub_cmd p postgres ||
_devenv_is_command $sub_cmd i iom ||
_devenv_is_command $sub_cmd c cluster)
;;
delete)
sub_cmd=$(_devenv_is_command $sub_cmd s storage ||
_devenv_is_command $sub_cmd n namespace ||
_devenv_is_command $sub_cmd m mailserver ||
_devenv_is_command $sub_cmd p postgres ||
_devenv_is_command $sub_cmd i iom ||
_devenv_is_command $sub_cmd c cluster)
;;
apply)
sub_cmd=$(_devenv_is_command $sub_cmd de deployment ||
_devenv_is_command $sub_cmd m mail-templates ||
_devenv_is_command $sub_cmd x xsl-templates ||
_devenv_is_command $sub_cmd sql-s sql-scripts ||
_devenv_is_command $sub_cmd sql-c sql-config ||
_devenv_is_command $sub_cmd j json-config ||
_devenv_is_command $sub_cmd db dbmigrate)
;;
dump)
sub_cmd=$(_devenv_is_command $sub_cmd c create ||
_devenv_is_command $sub_cmd l load)
;;
get)
sub_cmd=$(_devenv_is_command $sub_cmd c config ||
_devenv_is_command $sub_cmd g geb-props ||
_devenv_is_command $sub_cmd w ws-props ||
_devenv_is_command $sub_cmd s soap-props ||
_devenv_is_command $sub_cmd b bash-completion)
;;
log)
sub_cmd=$(_devenv_is_command $sub_cmd d dbaccount ||
_devenv_is_command $sub_cmd c config ||
_devenv_is_command $sub_cmd i iom ||
_devenv_is_command $sub_cmd ap app ||
_devenv_is_command $sub_cmd ac access)
;;
esac
fi

#---------------------------------------------------------------------------
# provide COMPREPLY for current input
#---------------------------------------------------------------------------

# First argument might be the name of a property file or the top-level command
if [ "$COMP_CWORD" -eq 1 ]; then
COMPREPLY=( $(compgen -W "info create delete apply dump get log -h --help" -G "$cur*.properties" -- $cur) )


# If the first argument is the name of a property file, the second argument has to
# be the top-level command.
elif [ "$COMP_CWORD" -eq 2 -a ! -z "$property_file" ]; then
COMPREPLY=( $(compgen -W "info create delete apply dump get log -h --help" -- $cur) )


# If no property file was passed, sub-cmd is expected on second position.
# OR
# If a property file was passed, sub-cmd is expeceted on third position.
elif [ \( "$COMP_CWORD" -eq 2 -a -z "$property_file" \) -o \
\( "$COMP_CWORD" -eq 3 -a ! -z "$property_file" \) ]; then
case "$cmd" in
get)
COMPREPLY=( $(compgen -W 'config geb-probs ws-probs soap-probs bash-completion -h --help' -- $cur) )
;;
info)
COMPREPLY=( $(compgen -W 'iom postgres mailserver storage cluster config -h --help' -- $cur) )
;;
create)
COMPREPLY=( $(compgen -W 'storage namespace mailserver postgres iom cluster -h --help' -- $cur) )
;;
delete)
COMPREPLY=( $(compgen -W 'storage namespace mailserver postgres iom cluster -h --help' -- $cur) )
;;
apply)
COMPREPLY=( $(compgen -W 'deployment mail-templates xsl-templates sql-scripts sql-config json-config dbmigrate -h --help' -- $cur) )
;;
dump)
COMPREPLY=( $(compgen -W 'create load -h --help' -- $cur) )
;;
log)
COMPREPLY=( $(compgen -W 'dbaccount config iom app access -h --help' -- $cur) )
;;
-h|--help)
;;
esac


# If no property file was passed, first argument for sub-command is expected on third position.
# OR
# If a property file was passed, first argument for sub-command is expected on 4th position.
elif [ \( "$COMP_CWORD" -eq 3 -a -z "$property_file" \) -o \
\( "$COMP_CWORD" -eq 4 -a ! -z "$property_file" \) ]; then
case "$cmd" in
apply)
case "$sub_cmd" in
sql-scripts)
# "apply sql-scripts" requires sql-file or directory as argument
COMPREPLY=( $(compgen -W '-h --help' -- $cur) $(compgen -G "$cur*.sql" -- $cur) $(_devenv_dirs "$cur") )
;;
deployment)
COMPREPLY=( $(compgen -W '-h --help <regex>' -- $cur) )
;;
*)
COMPREPLY=( $(compgen -W '-h --help' -- $cur) )
esac
;;
get)
case "$sub_cmd" in
config)
COMPREPLY=( $(compgen -W '-h --help --skip-config --skip-user-config' -- $cur) )
;;
*)
COMPREPLY=( $(compgen -W '-h --help' -- $cur) )
;;
esac
;;
log)
case "$sub_cmd" in
dbaccount|config|iom|app)
COMPREPLY=( $(compgen -W '-h --help -f fatal error warn info debug trace' -- $cur) )
;;
access)
COMPREPLY=( $(compgen -W '-h --help -f error all' -- $cur) )
;;
*)
COMPREPLY=( $(compgen -W '-h --help' -- $cur) )
esac
;;
*)
COMPREPLY=( $(compgen -W '-h --help' -- $cur) )
;;

esac


# If no property file was passed, second argument for sub-command is expected on 4th position.
# OR
# If a property file was passed, second argument for sub-command is expected on 5th position.
elif [ \( "$COMP_CWORD" -eq 4 -a -z "$property_file" \) -o \
\( "$COMP_CWORD" -eq 5 -a ! -z "$property_file" \) ]; then
case "$cmd" in
log)
case "$sub_cmd" in
dbaccount|config|iom|app)
case "$prev" in
-f)
COMPREPLY=( $(compgen -W 'fatal error warn info debug trace' -- $cur) )
;;
*)
COMPREPLY=( $(compgen -W '-f' -- $cur) )
esac
;;
access)
case "$prev" in
-f)
COMPREPLY=( $(compgen -W 'error all' -- $cur) )
;;
*)
COMPREPLY=( $(compgen -W '-f' -- $cur) )
;;
esac
;;
esac
;;
esac
fi

return 0
}


complete -F _devenv_cli devenv-cli.sh
Loading

0 comments on commit adc95b7

Please sign in to comment.