Skip to content

Commit

Permalink
building qualifier artifact, separating build commands
Browse files Browse the repository at this point in the history
  • Loading branch information
l-trotta committed Jan 16, 2025
1 parent 094b6ea commit 1889d38
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 16 deletions.
48 changes: 33 additions & 15 deletions .ci/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,36 @@ DRA_CREDS=$(vault kv get -field=data -format=json kv/ci-shared/release/dra-role)
chmod -R a+r $PWD/.ci/output/*
chmod -R a+w $PWD/.ci/output
# Artifacts should be generated
docker run --rm \
--name release-manager \
-e VAULT_ADDR="$(echo "$DRA_CREDS" | jq -r '.vault_addr')" \
-e VAULT_ROLE_ID="$(echo "$DRA_CREDS" | jq -r '.role_id')" \
-e VAULT_SECRET_ID="$(echo "$DRA_CREDS" | jq -r '.secret_id')" \
--mount type=bind,readonly=false,src="$PWD",target=/artifacts \
docker.elastic.co/infra/release-manager:latest \
cli collect \
--project elasticsearch-java \
--branch "$BRANCH" \
--commit "$(git rev-parse HEAD)" \
--workflow "$WORKFLOW" \
--version "$STACK_VERSION" \
--qualifier "$VERSION_QUALIFIER" \
--artifact-set main
if [ "$WORKFLOW" = "staging" ]; then
docker run --rm \
--name release-manager \
-e VAULT_ADDR="$(echo "$DRA_CREDS" | jq -r '.vault_addr')" \
-e VAULT_ROLE_ID="$(echo "$DRA_CREDS" | jq -r '.role_id')" \
-e VAULT_SECRET_ID="$(echo "$DRA_CREDS" | jq -r '.secret_id')" \
--mount type=bind,readonly=false,src="$PWD",target=/artifacts \
docker.elastic.co/infra/release-manager:latest \
cli collect \
--project elasticsearch-java \
--branch "$BRANCH" \
--commit "$(git rev-parse HEAD)" \
--workflow "$WORKFLOW" \
--version "$STACK_VERSION" \
--artifact-set main
fi
if [ "$WORKFLOW" = "snapshot" ]; then
docker run --rm \
--name release-manager \
-e VAULT_ADDR="$(echo "$DRA_CREDS" | jq -r '.vault_addr')" \
-e VAULT_ROLE_ID="$(echo "$DRA_CREDS" | jq -r '.role_id')" \
-e VAULT_SECRET_ID="$(echo "$DRA_CREDS" | jq -r '.secret_id')" \
--mount type=bind,readonly=false,src="$PWD",target=/artifacts \
docker.elastic.co/infra/release-manager:latest \
cli collect \
--project elasticsearch-java \
--branch "$BRANCH" \
--commit "$(git rev-parse HEAD)" \
--workflow "$WORKFLOW" \
--version "$STACK_VERSION" \
--qualifier "$VERSION_QUALIFIER" \
--artifact-set main
fi
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ allprojects {
group = "co.elastic.clients"
// Release manager provides a $VERSION. If not present, it's a local or CI snapshot build.
version = System.getenv("VERSION") ?:
(File(project.rootDir, "config/version.txt").readText().trim() + "-SNAPSHOT")
(File(project.rootDir, "config/version.txt").readText().trim() + "-" +
File(project.rootDir, "config/version-qualifier.txt").readText().trim() + "-SNAPSHOT")
repositories {
maven {
name = "Elastic-Snapshots"
Expand Down

0 comments on commit 1889d38

Please sign in to comment.