-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerfile.windows: escape quotes properly for GO_TAGS environment va…
…riable (#763) (#815) * Dockerfile.windows: escape quotes Using single quotes led to recursive variable definitions in Make, while double quotes caused the build to fail. To work around this, escaped double quotes must be used. * ci: add test to build Docker images (cherry picked from commit 577ea1f) Co-authored-by: Robert Fratto <[email protected]>
- Loading branch information
1 parent
69bafef
commit 9200adf
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Check Docker images | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- Dockerfile | ||
- Dockerfile.windows | ||
- Makefile | ||
- 'tools/make/*' | ||
|
||
jobs: | ||
# NOTE(rfratto): We only test building the Docker images for the host | ||
# platform, but we're really only looking for issues that are | ||
# architecture-independent. | ||
linux: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build image | ||
run: | | ||
docker build -t alloy-test:latest -f Dockerfile . | ||
windows: | ||
runs-on: windows-2019 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build image | ||
run: | | ||
docker build -t alloy-test:latest -f Dockerfile.windows . | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ SHELL ["cmd", "/S", "/C"] | |
# we can before moving on to the next step. | ||
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} make generate-ui && rm -rf web/ui/node_modules && yarn cache clean --all"" | ||
|
||
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} GO_TAGS='builtinassets ${GO_TAGS}' make alloy"" | ||
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} GO_TAGS=\"builtinassets ${GO_TAGS}\" make alloy"" | ||
# In this case, we're separating the clean command from make alloy to avoid an issue where access to some mod cache | ||
# files is denied immediately after make alloy, for example: | ||
# "go: remove C:\go\pkg\mod\golang.org\[email protected]\bin\go.exe: Access is denied." | ||
|