Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .ci/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ repo=$(realpath "$script_path/../")
# shellcheck disable=SC1090
CMD=$1
TASK=$1
TASK_ARGS=()
VERSION=$2
STACK_VERSION=$VERSION
set -euo pipefail
Expand All @@ -32,8 +33,14 @@ docker build --file .ci/DockerFile --tag elastic/elasticsearch-net .
echo -e "\033[1m>>>>> Run [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"

case $CMD in
clean)
echo -e "\033[36;1mRemoving $output_folder\033[0m"
TASK=clean
rm -rf "$output_folder"
;;
assemble)
TASK=release
TASK_ARGS=("$VERSION" "$output_folder" "skiptests")
;;
*)
echo -e "\nUsage:\n\t $CMD is not supported right now\n"
Expand All @@ -47,4 +54,4 @@ docker run \
--volume "${OUTPUT_DIR}:/sln/${output_folder}" \
--rm \
elastic/elasticsearch-net \
./build.sh release "$VERSION" "$output_folder" "skiptests"
./build.sh $TASK "${TASK_ARGS[@]}"
37 changes: 37 additions & 0 deletions .github/workflows/unified-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Unified Release


on:
pull_request:
paths-ignore:
- 'README.md'
- '.editorconfig'
push:
paths-ignore:
- 'README.md'
- '.editorconfig'
branches:
- main
- master
- '[0-9]+.[0-9]+'
- '[0-9]+.x'

jobs:
assemble:
name: Assemble
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
stack_version: [ '8.0.0-SNAPSHOT']

steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.100'

- run: "./.ci/make.sh assemble ${{ matrix.stack_version }}"
name: Assemble ${{ matrix.stack_version }}

7 changes: 6 additions & 1 deletion build/scripts/Targets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ open System.IO
open Bullseye
open ProcNet
open Fake.Core
open Fake.IO.Globbing.Operators

module Main =

Expand Down Expand Up @@ -60,7 +61,7 @@ module Main =
let canaryChain = [ "version"; "release"; "test-nuget-package";]

// the following are expected to be called as targets directly
conditional "clean" parsed.ReleaseBuild <| fun _ -> Build.Clean parsed
conditional "clean" (parsed.ReleaseBuild || parsed.Target = "clean") <| fun _ -> Build.Clean parsed
target "version" <| fun _ -> printfn "Artifacts Version: %O" artifactsVersion

target "restore" Build.Restore
Expand Down Expand Up @@ -92,6 +93,10 @@ module Main =
printfn "Finished Release Build %O, artifacts available at: %s" artifactsVersion Paths.BuildOutput
| Some path ->
Fake.IO.Shell.cp_r Paths.BuildOutput path
let zipName = sprintf "elasticsearch-net-%O.zip" artifactsVersion.Full
let outputZip = Path.Combine(path, zipName)
let files = !! (sprintf "%s/*.*" path) -- outputZip
Fake.IO.Zip.createZip "." outputZip "elastic/elasticsearch-net artifact" 9 true files
printfn "Finished Release Build %O, output copied to: %s" artifactsVersion path

conditional "test-nuget-package" (not parsed.SkipTests) <| fun _ -> Tests.RunReleaseUnitTests artifactsVersion parsed
Expand Down
3 changes: 3 additions & 0 deletions build/scripts/scripts.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<Content Include="..\..\.github\workflows\test-jobs.yml"><Link>test-jobs.yml</Link></Content>
<Content Include="..\..\.github\workflows\stale-jobs.yml"><Link>stale-jobs.yml</Link></Content>
<Content Include="..\..\.github\workflows\integration-jobs.yml"><Link>integration-jobs.yml</Link></Content>
<Content Include="..\..\.github\workflows\unified-release.yml">
<Link>unified-release.yml</Link>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="5.0.0" />
Expand Down