Skip to content

Commit

Permalink
Merge branch 'release/v8.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
kahoona77 committed Oct 12, 2023
2 parents dcc5c13 + 553fc71 commit 2d42455
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v8.7.1](https://github.com/cloudogu/makefiles/releases/tag/v8.7.1) 2023-10-12
### Fixed
- [#162] fix coder build if secrets dir does not exist

## [v8.7.0](https://github.com/cloudogu/makefiles/releases/tag/v8.7.0) 2023-10-06
### Changed
- [#159] Update Helm binary to 3.13
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Set these to the desired values
ARTIFACT_ID=makefiles
MAKEFILES_VERSION=8.7.0
MAKEFILES_VERSION=8.7.1
VERSION=${MAKEFILES_VERSION}

.DEFAULT_GOAL:=help
Expand Down
30 changes: 17 additions & 13 deletions build/make/coder-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,27 @@ function generateUniqueWorkspaceName() {

function buildImage() {
local tag="$1"
local buildDir="${2:-./build}"
local secretDir="${3:-./secretArgs}"
local containerBuildDir="${2:-./container}"
local secretDir="${3:-./secrets}"
local containerExec="${4:-podman}"
local secretArgs=()

# include build-secrets if there are any
# shellcheck disable=SC2231
for secretPath in $secretDir/*; do
# do not match .sh scripts
[[ $secretPath == *.sh ]] && continue
local secretName
secretName=$(basename "$secretPath")
secretArgs+=("--secret=id=$secretName,src=$secretDir/$secretName")
done
local secretArgs=()
if [ -d "$secretDir" ]; then
# shellcheck disable=SC2231
for secretPath in $secretDir/*; do
# do not match .sh scripts
[[ $secretPath == *.sh ]] && continue
local secretName
secretName=$(basename "$secretPath")
secretArgs+=("--secret=id=$secretName,src=$secretDir/$secretName")
done
fi

if [ "$containerExec" = "podman" ]; then
$containerExec build -t "$tag" --pull=newer "$buildDir" "${secretArgs[@]}"
$containerExec build -t "$tag" --pull=newer "$containerBuildDir" "${secretArgs[@]}"
else
$containerExec build -t "$tag" --pull "$buildDir" "${secretArgs[@]}"
$containerExec build -t "$tag" --pull "$containerBuildDir" "${secretArgs[@]}"
fi
}

Expand Down

0 comments on commit 2d42455

Please sign in to comment.