Skip to content

Commit

Permalink
Run jaeger-es-index-cleaner and jaeger-es-rollover locally (#5714)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- #5709

## Description of the changes
- added a function build_local_img

## How was this change tested?
- 

## Checklist
- [ ] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [ ] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [ ] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: mehul gautam <mehulsharma4786@gamil.com>
Signed-off-by: mehul gautam  <mehulsharma4786@gmail.com>
Co-authored-by: mehul gautam <mehulsharma4786@gamil.com>
  • Loading branch information
hellspawn679 and mehul gautam committed Jul 8, 2024
1 parent 31e8ef9 commit ea2ec18
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/version/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ func TestString(t *testing.T) {
}
expectedOutput := "git-commit=foobar, git-version=v1.2.3, build-date=2024-01-04"
assert.Equal(t, expectedOutput, test.String())
}
}
4 changes: 2 additions & 2 deletions plugin/storage/integration/es_index_cleaner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const (
samplingIndexName = "jaeger-sampling-2019-01-01"
spanIndexName = "jaeger-span-2019-01-01"
serviceIndexName = "jaeger-service-2019-01-01"
indexCleanerImage = "jaegertracing/jaeger-es-index-cleaner:latest"
rolloverImage = "jaegertracing/jaeger-es-rollover:1.57.0"
indexCleanerImage = "localhost:5000/jaegertracing/jaeger-es-index-cleaner:local-test"
rolloverImage = "localhost:5000/jaegertracing/jaeger-es-rollover:local-test"
rolloverNowEnvVar = `CONDITIONS='{"max_age":"0s"}'`
)

Expand Down
11 changes: 10 additions & 1 deletion scripts/es-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ teardown_storage() {
docker compose -f "${compose_file}" down
}

build_local_img(){
make build-es-index-cleaner GOOS=linux
make build-es-rollover GOOS=linux
make create-baseimg PLATFORMS="linux/$(go env GOARCH)"
#build es-index-cleaner and es-rollover images
GITHUB_SHA=local-test BRANCH=local-test bash scripts/build-upload-a-docker-image.sh -l -b -c jaeger-es-index-cleaner -d cmd/es-index-cleaner -t release -p "linux/$(go env GOARCH)"
GITHUB_SHA=local-test BRANCH=local-test bash scripts/build-upload-a-docker-image.sh -l -b -c jaeger-es-rollover -d cmd/es-rollover -t release -p "linux/$(go env GOARCH)"
}

main() {
check_arg "$@"
local distro=$1
Expand All @@ -108,7 +117,7 @@ main() {
set -x

bring_up_storage "${distro}" "${es_version}"

build_local_img
if [[ "${j_version}" == "v2" ]]; then
STORAGE=${distro} SPAN_STORAGE_TYPE=${distro} make jaeger-v2-storage-integration-test
elif [[ "${j_version}" == "v1" ]]; then
Expand Down

0 comments on commit ea2ec18

Please sign in to comment.