Skip to content

Commit 41d3e17

Browse files
ci: set a version for Chocolatey (#7588)
* ci: set a version for Chocolatey fixes #7574 setting Chocolatey version to 1.4.0 since the version doesn't require .NET 4.8 Signed-off-by: Celalettin Calis <[email protected]> * ci: added windows tests to pr image tests Signed-off-by: celalettin1286 <[email protected]> * ci: changed build method Signed-off-by: celalettin1286 <[email protected]> * ci: changed runner to windows 2019 Signed-off-by: celalettin1286 <[email protected]> * ci: add matrix for windows 2019 and 2022 Signed-off-by: celalettin1286 <[email protected]> * change job title Signed-off-by: celalettin1286 <[email protected]> --------- Signed-off-by: Celalettin Calis <[email protected]> Signed-off-by: celalettin1286 <[email protected]>
1 parent 1d36659 commit 41d3e17

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/pr-image-tests.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- synchronize
88
paths:
99
- 'dockerfiles/Dockerfile'
10+
- 'dockerfiles/Dockerfile.windows'
1011
- 'conf/**'
1112

1213
workflow_dispatch:
@@ -79,3 +80,40 @@ jobs:
7980
# Ensure we disable buildkit
8081
DOCKER_BUILDKIT: 0
8182
shell: bash
83+
pr-image-tests-build-windows-images:
84+
name: PR - Docker windows build test, windows 2019 and 2022
85+
runs-on: windows-${{ matrix.windows-base-version }}
86+
strategy:
87+
fail-fast: true
88+
matrix:
89+
windows-base-version:
90+
# https://github.com/fluent/fluent-bit/blob/1d366594a889624ec3003819fe18588aac3f17cd/dockerfiles/Dockerfile.windows#L3
91+
- '2019'
92+
- '2022'
93+
permissions:
94+
contents: read
95+
steps:
96+
- name: Checkout repository
97+
uses: actions/checkout@v3
98+
99+
- name: Extract metadata from Github
100+
id: meta
101+
uses: docker/metadata-action@v4
102+
with:
103+
images: ${{ github.repository }}/pr-${{ github.event.pull_request.number }}
104+
tags: |
105+
type=sha
106+
flavor: |
107+
suffix=-windows-${{ matrix.windows-base-version }}
108+
109+
- name: Build the windows images
110+
id: build
111+
run: |
112+
docker build -t ${{ steps.meta.outputs.tags }} --build-arg WINDOWS_VERSION=ltsc${{ matrix.windows-base-version }} -f ./dockerfiles/Dockerfile.windows .
113+
114+
- name: Sanity check it runs
115+
# We do this for a simple check of dependencies
116+
run: |
117+
docker run --rm -t ${{ steps.meta.outputs.tags }} --help
118+
shell: bash
119+

dockerfiles/Dockerfile.windows

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ RUN Start-Process /local/vc_redist.x64.exe -ArgumentList '/install', '/quiet', '
4040

4141
# Install Chocolatey and OpenSSL: https://github.com/StefanScherer/dockerfiles-windows/blob/main/openssl/Dockerfile
4242
ENV chocolateyUseWindowsCompression false
43+
ENV chocolateyVersion '1.4.0'
4344
RUN iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); `
4445
choco feature disable --name showDownloadProgress ; `
4546
choco install -y openssl;

0 commit comments

Comments
 (0)