Skip to content

Commit

Permalink
ci: set a version for Chocolatey (fluent#7588)
Browse files Browse the repository at this point in the history
* ci: set a version for Chocolatey

fixes fluent#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]>
  • Loading branch information
celalettin1286 authored Jun 19, 2023
1 parent 1d36659 commit 41d3e17
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/pr-image-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- synchronize
paths:
- 'dockerfiles/Dockerfile'
- 'dockerfiles/Dockerfile.windows'
- 'conf/**'

workflow_dispatch:
Expand Down Expand Up @@ -79,3 +80,40 @@ jobs:
# Ensure we disable buildkit
DOCKER_BUILDKIT: 0
shell: bash
pr-image-tests-build-windows-images:
name: PR - Docker windows build test, windows 2019 and 2022
runs-on: windows-${{ matrix.windows-base-version }}
strategy:
fail-fast: true
matrix:
windows-base-version:
# https://github.com/fluent/fluent-bit/blob/1d366594a889624ec3003819fe18588aac3f17cd/dockerfiles/Dockerfile.windows#L3
- '2019'
- '2022'
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Extract metadata from Github
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ github.repository }}/pr-${{ github.event.pull_request.number }}
tags: |
type=sha
flavor: |
suffix=-windows-${{ matrix.windows-base-version }}
- name: Build the windows images
id: build
run: |
docker build -t ${{ steps.meta.outputs.tags }} --build-arg WINDOWS_VERSION=ltsc${{ matrix.windows-base-version }} -f ./dockerfiles/Dockerfile.windows .
- name: Sanity check it runs
# We do this for a simple check of dependencies
run: |
docker run --rm -t ${{ steps.meta.outputs.tags }} --help
shell: bash

1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN Start-Process /local/vc_redist.x64.exe -ArgumentList '/install', '/quiet', '

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

0 comments on commit 41d3e17

Please sign in to comment.