Skip to content

Commit

Permalink
Move away from shared project (#8376)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz authored and flobernd committed Oct 11, 2024
1 parent 8c3ab78 commit a484f00
Show file tree
Hide file tree
Showing 314 changed files with 101 additions and 15,403 deletions.
2 changes: 1 addition & 1 deletion .buildkite/DockerFile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG DOTNET_VERSION=8.0.100
ARG DOTNET_VERSION=8.0.400
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS elasticsearch-net-build

ENV NUGET_SCRATCH="/tmp/NuGetScratch"
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ steps:
env:
TEST_SUITE: "{{ matrix.suite }}"
STACK_VERSION: master-SNAPSHOT
DOTNET_VERSION: 8.0.100
DOTNET_VERSION: 8.0.400
matrix:
setup:
suite:
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/run-repository.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ param(
$NODE_NAME,

[string]
$DOTNET_VERSION = "8.0.100"
$DOTNET_VERSION = "8.0.400"
)

$ESC = [char]27
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/run-repository.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
set -euo pipefail

DOTNET_VERSION=${DOTNET_VERSION-8.0.100}
DOTNET_VERSION=${DOTNET_VERSION-8.0.400}
ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"}
elasticsearch_container=${elasticsearch_container-}

Expand Down
2 changes: 1 addition & 1 deletion .buildkite/run-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ param (
$TEST_SUITE = "free",

[string]
$DOTNET_VERSION = "8.0.100"
$DOTNET_VERSION = "8.0.400"
)

$ESC = [char]27
Expand Down
2 changes: 1 addition & 1 deletion .ci/DockerFile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG DOTNET_VERSION=8.0.100
ARG DOTNET_VERSION=8.0.400
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS elasticsearch-net-build

ENV NUGET_SCRATCH="/tmp/NuGetScratch"
Expand Down
8 changes: 4 additions & 4 deletions .ci/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ OUTPUT_DIR="$repo/${output_folder}"
REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}"
mkdir -p "$OUTPUT_DIR"

DOTNET_VERSION=${DOTNET_VERSION-8.0.100}
DOTNET_VERSION=${DOTNET_VERSION-8.0.400}

echo -e "\033[34;1mINFO:\033[0m PRODUCT ${product}\033[0m"
echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m"
Expand Down Expand Up @@ -116,7 +116,7 @@ esac
# ------------------------------------------------------- #
# Build Container
# ------------------------------------------------------- #

echo -e "\033[34;1mINFO: building $product container\033[0m"

docker build --file .ci/DockerFile --tag ${product} \
Expand All @@ -140,7 +140,7 @@ docker run \
--rm \
${product} \
/bin/bash -c "./build.sh $TASK ${TASK_ARGS[*]} && chown -R $(id -u):$(id -g) ."

# ------------------------------------------------------- #
# Post Command tasks & checks
# ------------------------------------------------------- #
Expand Down Expand Up @@ -168,4 +168,4 @@ fi

if [[ "$CMD" == "examplesgen" ]]; then
echo "TODO"
fi
fi
2 changes: 1 addition & 1 deletion .ci/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $ STACK_VERSION=8.0.0-SNAPSHOT ./.ci/run-tests
|-------------------------|-------------|-------------|
| `STACK_VERSION` | `N/A` | The elasticsearch version to target
| `TEST_SUITE` | `basic` | `free` or `platinum` sets which test suite to run and which container to run against. |
| `DOTNET_VERSION` | `8.0.100` | The .NET sdk version used to grab the proper container |
| `DOTNET_VERSION` | `8.0.400` | The .NET sdk version used to grab the proper container |

If you want to manually spin up elasticsearch for these tests and call the runner afterwards you can use

Expand Down
10 changes: 5 additions & 5 deletions .ci/run-repository.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
param(
[System.Uri]
$ELASTICSEARCH_URL,

[string]
$NETWORK_NAME,

[string]
$NODE_NAME,

[string]
$DOTNET_VERSION = "8.0.100"
$DOTNET_VERSION = "8.0.400"
)

$ESC = [char]27
Expand All @@ -39,4 +39,4 @@ docker run `
--volume $repo/build/output:/sln/build/output `
--rm `
elastic/elasticsearch-net `
./build.sh rest-spec-tests -f count -e $ELASTICSEARCH_URL -o /sln/build/output/rest-spec-junit.xml
./build.sh rest-spec-tests -f count -e $ELASTICSEARCH_URL -o /sln/build/output/rest-spec-junit.xml
6 changes: 3 additions & 3 deletions .ci/run-repository.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
set -euo pipefail

DOTNET_VERSION=${DOTNET_VERSION-8.0.100}
DOTNET_VERSION=${DOTNET_VERSION-8.0.400}
ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"}
elasticsearch_container=${elasticsearch_container-}

Expand All @@ -27,13 +27,13 @@ fi
if [[ "$TEST_SECTION" != "" ]]; then
run_script_args="${run_script_args} -s ${TEST_SECTION}"
fi

echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m"
echo -e "\033[34;1mINFO:\033[0m TEST_SUITE ${TEST_SUITE}\033[0m"
echo -e "\033[34;1mINFO:\033[0m URL ${ELASTICSEARCH_URL}\033[0m"
echo -e "\033[34;1mINFO:\033[0m CONTAINER ${elasticsearch_container}\033[0m"
echo -e "\033[34;1mINFO:\033[0m DOTNET_VERSION ${DOTNET_VERSION}\033[0m"

echo -e "\033[1m>>>>> Build [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"

docker build --file .ci/DockerFile --tag elastic/elasticsearch-net \
Expand Down
6 changes: 3 additions & 3 deletions .ci/run-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ param (
$TEST_SUITE = "free",

[string]
$DOTNET_VERSION = "8.0.100"
$DOTNET_VERSION = "8.0.400"
)

$ESC = [char]27
Expand All @@ -29,7 +29,7 @@ function cleanup {
$runParams = @{
NODE_NAME= $NODE_NAME
NETWORK_NAME = "elasticsearch"
CLEANUP = $true
CLEANUP = $true
}

./.ci/run-elasticsearch.ps1 @runParams
Expand Down Expand Up @@ -69,7 +69,7 @@ try {

./.ci/run-repository.ps1 @runParams

cleanup
cleanup
}
catch {
cleanup
Expand Down
2 changes: 1 addition & 1 deletion .ci/test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ TEST_SUITE:
- platinum

DOTNET_VERSION:
- 8.0.100
- 8.0.400

exclude: ~
15 changes: 9 additions & 6 deletions .github/workflows/integration-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
- '[0-9]+.[0-9]+'
- '[0-9]+.x'

env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages

jobs:
integration-tests:
name: Tests
Expand All @@ -34,17 +37,17 @@ jobs:
'8.9.0-SNAPSHOT',
'latest-8'
]

steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.100'
global-json-file: 'global.json'
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
path: ${{ github.workspace }}/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.[cf]sproj*', '**/*.Build.props') }}
restore-keys: |
${{ runner.os }}-nuget-
- uses: actions/cache@v3
Expand All @@ -53,7 +56,7 @@ jobs:
key: ${{ runner.os }}-elastic-managed-${{ matrix.stack_version }}
restore-keys: |
${{ runner.os }}-elastic-managed-
- run: "./build.sh integrate ${{ matrix.stack_version }} random:test_only_one --report"
name: ${{ matrix.stack_version }}
- name: Results ${{ matrix.stack_version }}
Expand All @@ -66,4 +69,4 @@ jobs:
fail_on_failure: true
require_tests: true
check_name: ${{ matrix.stack_version }}

8 changes: 4 additions & 4 deletions .github/workflows/make-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- run: "./.ci/make.sh bump ${{ github.event.inputs.version }}"
name: "Bump ${{ github.event.inputs.version }} on ${{ github.event.inputs.branch }}"
- name: "Version bump PR ${{ github.event.inputs.version }}"
# fixate to known release.
# fixate to known release.
uses: peter-evans/create-pull-request@052fc72b4198ba9fbc81b818c6e1859f747d49a8
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -30,15 +30,15 @@ jobs:
commit-message: "[version] ${{ github.event.inputs.version }} bump"
title: '[version] ${{ github.event.inputs.version }} bump'
body: |
Updates ${{ github.event.inputs.branch }} to version ${{ github.event.inputs.version }}.
Updates ${{ github.event.inputs.branch }} to version ${{ github.event.inputs.version }}.
labels: "infra,code-gen"
# Add version and backport labels automatically
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.100'
global-json-file: 'global.json'
- name: Install dotnet-script
run: dotnet tool install release-notes --tool-path dotnet-tool

- name: Run build script
run: >
dotnet-tool/release-notes apply-labels --version ${{ github.event.inputs.version }} ${{ github.event.organization.login }} ${{ github.event.repository.name }} --token ${{ secrets.GITHUB_TOKEN }} --backportlabelformat "Backport BRANCH"
dotnet-tool/release-notes apply-labels --version ${{ github.event.inputs.version }} ${{ github.event.organization.login }} ${{ github.event.repository.name }} --token ${{ secrets.GITHUB_TOKEN }} --backportlabelformat "Backport BRANCH"
20 changes: 10 additions & 10 deletions .github/workflows/make-release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ jobs:
run: |
curl -s "https://artifacts-api.elastic.co/v1/branches" | jq "[ .branches[] | select(. | startswith(\"6\") | not) ]" --compact-output
curl -s "https://artifacts-api.elastic.co/v1/branches" | jq "[ .branches[] | select(. | startswith(\"6\") | not) ]" --compact-output > branches.json
- id: set-matrix
name: conditional command
run: |
if [[ "${{ github.event.inputs.branch }}" != "" ]]; then
echo "::set-output name=matrix::['${{ github.event.inputs.branch }}']"
elif [[ -f "branches.json" ]]; then
elif [[ -f "branches.json" ]]; then
echo "::set-output name=matrix::$(cat branches.json)"
else
else
echo "::set-output name=matrix::[]"
fi
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

release-notes:
name: Generate
needs: active-branches
Expand All @@ -48,14 +48,14 @@ jobs:
- uses: actions/checkout@v3
with:
ref: "${{ matrix.branch }}"

- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.100'
global-json-file: 'global.json'
- name: Install dotnet-script
run: dotnet tool install release-notes --tool-path dotnet-tool

- name: Set repository name environment variable
- name: Set repository name environment variable
run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV

- name: Find versions for branch
Expand All @@ -65,14 +65,14 @@ jobs:
echo "::set-output name=current::$(echo ${lines[0]})"
echo "::set-output name=next::$(echo ${lines[1]})"
echo ${lines[@]}
- name: Generate release notes
run: |
dotnet-tool/release-notes "${{ github.repository_owner }}" "${{ env.repository_name }}" --version ${{ steps.versions.outputs.next }} --token ${{ secrets.GITHUB_TOKEN }} --format asciidoc --output docs/release-notes
rm dotnet-tool/release-notes
git status
- name: "PR ${{ matrix.branch }}"
# fixate to known release.
# fixate to known release.
uses: peter-evans/create-pull-request@052fc72b4198ba9fbc81b818c6e1859f747d49a8
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -83,4 +83,4 @@ jobs:
title: '[release-notes] Release notes ${{ steps.versions.outputs.next }} on ${{ matrix.branch }} branch'
body: |
Release notes ${{ steps.versions.outputs.next }} on ${{ matrix.branch }} branch
labels: "infra,code-gen"
labels: "infra,code-gen"
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ env:
# Configuration
BUILD_CONFIG: 'Release'
GLOBAL_JSON_FILE: 'global.json'
LOCKFILE_PATTERN: '**/packages.lock.json'
CACHE_PATTERNS: '["**/*.[cf]sproj*", "**/*.Build.props"]'
PACKAGE_PATH: 'nupkg'
# .NET SDK related environment variables
DOTNET_NOLOGO: 1
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
uses: 'actions/cache@v4'
with:
path: '~/.nuget/packages'
key: '${{ runner.os }}-nuget-${{ inputs.flavor }}-${{ hashFiles(env.LOCKFILE_PATTERN) }}'
key: '${{ runner.os }}-nuget-${{ inputs.flavor }}-${{ hashFiles(fromJson(env.CACHE_PATTERNS)) }}'
restore-keys: '${{ runner.os }}-nuget-${{ inputs.flavor }}-'

- name: '.NET Restore'
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/stale-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
- '[0-9]+.[0-9]+'
- '[0-9]+.x'

env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages

jobs:
unit-tests:
name: Documentation
Expand All @@ -24,17 +27,17 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.100'
global-json-file: 'global.json'
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
path: ${{ github.workspace }}/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.[cf]sproj*', '**/*.Build.props') }}
restore-keys: |
${{ runner.os }}-nuget-
- run: ./build.sh documentation
name: Build docs

- run: |
if [ -n "$(git status --porcelain)" ]; then echo Error: changes found after running documentation; git diff; git status; exit 1; fi
name: 'Ensure no stale docs'
Expand Down
Loading

0 comments on commit a484f00

Please sign in to comment.