Skip to content

Commit

Permalink
Add deprecation warning for DOCKER_USERNAME and DOCKER_PASSWORD
Browse files Browse the repository at this point in the history
Signed-off-by: Jeroen Knoops <jeroen.knoops@philips.com>
  • Loading branch information
JeroenKnoops committed Aug 31, 2022
1 parent 79c1e0c commit 8cea492
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
15 changes: 11 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project uses the version of main tool as main version number .

## [Unreleased]

- Rename arguments to reflect multiple container registries.

### DEPRECATION

- `DOCKER_USERNAME`, `DOCKER_PASSWORD`, and `DOCKER_REGISTRY` are deprecated. Please use `REGISTRY_USERNAME`, `REGISTRY_TOKEN`, and `REGISTRY_URL`.

## v4.4.0
- [#50] - Fix: Automatic push of README to docker hub is broken.
- [#48] - Loop through entire array of push-branches
- [#34] - ** BREAKING ** Rename variables DOCKER_USERNAME, DOCKER_PASSWORD and DOCKER_REGISTRY
Expand All @@ -22,7 +29,7 @@ and this project uses the version of main tool as main version number .
- Allow users to specify specific dockerfile instead of path

The `docker build` command is now being called from the root of the project
instead of the directory.
instead of the directory.

This has impact when your project has:
- Directories with multiple dockerfiles
Expand All @@ -31,15 +38,15 @@ This has impact when your project has:
You now need to change the path to include the directory.

Example:
- `ADD /scripts/entrypoint.sh entrypoint.sh` becomes: `ADD /6/java/scripts/entrypoint.sh entrypoint`
- `ADD /scripts/entrypoint.sh entrypoint.sh` becomes: `ADD /6/java/scripts/entrypoint.sh entrypoint`

## v2.2.1 - 2020-05-18
### Changed
- [#38] - Auto update readme was not working anymore
- [#38] - Auto update readme was not working anymore

## v2.2.0
- [#33] - DOCKER_ORGANIZATION is optional when other repository store is used.
- [#32] - DOCKER_REGISTRY should be an environment variable.
- [#32] - DOCKER_REGISTRY should be an environment variable.
- Fix shellinter

### Add
Expand Down
17 changes: 16 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,23 @@ if [ -z "$6" ]
then
export PUSH_BRANCHES="$4"
else
echo "DEPRECATION WARNING: push-branch will be replaced by push-branches"
echo "DEPRECATION WARNING: push-branch will be replaced by push-branches. Please update scripts." >> "$GITHUB_STEP_SUMMARY"
export PUSH_BRANCHES="$6"
fi

if [ -n "${DOCKER_USERNAME}" ]; then
echo "DEPRECATION WARNING: DOCKER_USERNAME will be replaced by REGISTRY_USERNAME in the next release. Please update scripts." >> "$GITHUB_STEP_SUMMARY"
export REGISTRY_USERNAME="${DOCKER_USERNAME}"
fi

if [ -n "${DOCKER_PASSWORD}" ]; then
echo "DEPRECATION WARNING: DOCKER_PASSWORD will be replaced by REGISTRY_TOKEN in the next release. Please update scripts." >> "$GITHUB_STEP_SUMMARY"
export REGISTRY_TOKEN="${DOCKER_PASSWORD}"
fi

if [ -n "${DOCKER_REGISTRY}" ]; then
echo "DEPRECATION WARNING: DOCKER_REGISTRY will be replaced by REGISTRY_URL in the next release. Please update scripts." >> "$GITHUB_STEP_SUMMARY"
export REGISTRY_URL="${DOCKER_REGISTRY}
fi
"${FOREST_DIR}"/docker_build_and_push.sh "$1" "$2" "$5" "$3"

0 comments on commit 8cea492

Please sign in to comment.