mirror of
https://github.com/elastic/logstash.git
synced 2025-06-27 17:08:55 -04:00
Clean up left over scripts after CI migration (#15926)
Following the CI migration from Jenkins to Buildkite, this commit removes a number of left over helper scripts that aren't needed anymore. Closes https://github.com/elastic/ingest-dev/issues/2850
This commit is contained in:
parent
4e6815b1ea
commit
be3f75e346
13 changed files with 4 additions and 454 deletions
|
@ -1,4 +0,0 @@
|
|||
#!/bin/bash
|
||||
# we may pass "persistent_queues" to FEATURE_FLAG to enable PQ in the integration tests
|
||||
export DOCKER_ENV_OPTS="${DOCKER_ENV_OPTS} -e FEATURE_FLAG"
|
||||
ci/docker_run.sh logstash-integration-tests ci/integration_tests.sh $@
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
export JRUBY_OPTS="-J-Xmx1g"
|
||||
export GRADLE_OPTS="-Xmx2g -Dorg.gradle.daemon=false -Dorg.gradle.logging.level=info"
|
||||
|
||||
ci/docker_run.sh logstash-license-check ci/license_check.sh -m 4G
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash -i
|
||||
|
||||
echo "Removing containers older then 8 hours"
|
||||
docker container prune -f --filter "until=8h"
|
||||
echo "Removing all images, except with the label of retention=keep"
|
||||
docker image prune -a -f --filter "label!=retention=keep"
|
|
@ -1,48 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Syntax is docker_run.sh IMAGE_NAME SCRIPT_NAME *EXTRA_DOCKER_OPTS
|
||||
|
||||
#Note - ensure that the -e flag is NOT set, and explicitly check the $? status to allow for clean up
|
||||
REMOVE_IMAGE=false
|
||||
DOCKER_EXTERNAL_JDK=""
|
||||
if [ -z "$branch_specifier" ]; then
|
||||
# manual
|
||||
REMOVE_IMAGE=true
|
||||
IMAGE_NAME="$1"
|
||||
else
|
||||
IMAGE_NAME=$branch_specifier"-"$(date +%s%N)
|
||||
fi
|
||||
|
||||
if [ "$OSS" == "true" ]; then
|
||||
DOCKER_ENV_OPTS="${DOCKER_ENV_OPTS} -e OSS=true"
|
||||
fi
|
||||
|
||||
echo "Running Docker CI build for '$IMAGE_NAME' "
|
||||
|
||||
# Remove old docker cid just in case
|
||||
rm -f docker_cid
|
||||
|
||||
docker build -t $IMAGE_NAME .
|
||||
exit_code=$?; [[ $exit_code != 0 ]] && exit $exit_code
|
||||
|
||||
cleanup() {
|
||||
if [ -e docker_cid ]; then
|
||||
cat docker_cid | xargs docker rm --force -v
|
||||
fi
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
if [ -n "$JDK" ]; then
|
||||
echo "JDK to use $JDK"
|
||||
DOCKER_EXTERNAL_JDK="--mount type=bind,source=$JDK,target=$JDK,readonly --env BUILD_JAVA_HOME=$JDK"
|
||||
fi
|
||||
|
||||
# Run the command, skip the first argument, which is the image name
|
||||
docker run $DOCKER_ENV_OPTS --cidfile=docker_cid --sig-proxy=true $DOCKER_EXTERNAL_JDK --rm $IMAGE_NAME ${@:2}
|
||||
exit_code=$?
|
||||
|
||||
# Remove the container cid since we ran cleanly, no need to force rm it if we got to this point
|
||||
rm docker_cid
|
||||
|
||||
[[ $REMOVE_IMAGE == "true" ]] && docker rmi $IMAGE_NAME
|
||||
echo "exiting with code: '$exit_code'"
|
||||
exit $exit_code #preserve the exit code from the test run
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
ci/docker_run.sh logstash-unit-tests ci/unit_tests.sh $@
|
|
@ -1,49 +0,0 @@
|
|||
function info {
|
||||
echo "INFO: $1"
|
||||
}
|
||||
|
||||
function error {
|
||||
echo "ERROR: $1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
function save_docker_tarballs {
|
||||
local arch="${1:?architecture required}"
|
||||
local version="${2:?stack-version required}"
|
||||
local images="logstash logstash-oss"
|
||||
if [ "${arch}" != "aarch64" ]; then
|
||||
# No logstash-ubi8 for AARCH64
|
||||
images="logstash logstash-oss logstash-ubi8"
|
||||
fi
|
||||
|
||||
for image in ${images}; do
|
||||
tar_file="${image}-${version}-docker-image-${arch}.tar"
|
||||
docker save -o "build/${tar_file}" \
|
||||
"docker.elastic.co/logstash/${image}:${version}" || \
|
||||
error "Unable to save tar file ${tar_file} for ${image} image."
|
||||
# NOTE: if docker save exited with non-zero the error log already exited the script
|
||||
gzip "build/${tar_file}"
|
||||
done
|
||||
}
|
||||
|
||||
function upload_to_bucket {
|
||||
local file="${1:?file required}"
|
||||
local version="${2:?stack-version required}"
|
||||
info "Uploading ${file}..."
|
||||
gsutil cp "${file}" "gs://logstash-ci-artifacts/dra/${version}/"
|
||||
}
|
||||
|
||||
# Since we are using the system jruby, we need to make sure our jvm process
|
||||
# uses at least 1g of memory, If we don't do this we can get OOM issues when
|
||||
# installing gems. See https://github.com/elastic/logstash/issues/5179
|
||||
export JRUBY_OPTS="-J-Xmx1g"
|
||||
|
||||
# Extract the version number from the version.yml file
|
||||
# e.g.: 8.6.0
|
||||
# The suffix part like alpha1 etc is managed by the optional VERSION_QUALIFIER_OPT environment variable
|
||||
STACK_VERSION=`cat versions.yml | sed -n 's/^logstash\:[[:space:]]\([[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\)$/\1/p'`
|
||||
|
||||
# ARCH is a Environment variable set in Jenkins
|
||||
if [ -z "$ARCH" ]; then
|
||||
ARCH=aarch64
|
||||
fi
|
|
@ -1,90 +0,0 @@
|
|||
#!/bin/bash -ie
|
||||
#Note - ensure that the -e flag is set to properly set the $? status if any command fails
|
||||
echo "####################################################################"
|
||||
echo "##################### Starting $0"
|
||||
echo "####################################################################"
|
||||
|
||||
source ./$(dirname "$0")/dra_common.sh
|
||||
|
||||
# WORKFLOW_TYPE is a CI externally configured environment variable that could assume "snapshot" or "staging" values
|
||||
case "$WORKFLOW_TYPE" in
|
||||
snapshot)
|
||||
info "Building artifacts for the $WORKFLOW_TYPE workflow..."
|
||||
if [ -z "$VERSION_QUALIFIER_OPT" ]; then
|
||||
rake artifact:docker || error "artifact:docker build failed."
|
||||
rake artifact:docker_oss || error "artifact:docker_oss build failed."
|
||||
rake artifact:dockerfiles || error "artifact:dockerfiles build failed."
|
||||
if [ "$ARCH" != "aarch64" ]; then
|
||||
rake artifact:docker_ubi8 || error "artifact:docker_ubi8 build failed."
|
||||
fi
|
||||
else
|
||||
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" rake artifact:docker || error "artifact:docker build failed."
|
||||
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" rake artifact:docker_oss || error "artifact:docker_oss build failed."
|
||||
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" rake artifact:dockerfiles || error "artifact:dockerfiles build failed."
|
||||
if [ "$ARCH" != "aarch64" ]; then
|
||||
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" rake artifact:docker_ubi8 || error "artifact:docker_ubi8 build failed."
|
||||
fi
|
||||
# Qualifier is passed from CI as optional field and specify the version postfix
|
||||
# in case of alpha or beta releases:
|
||||
# e.g: 8.0.0-alpha1
|
||||
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
|
||||
fi
|
||||
STACK_VERSION=${STACK_VERSION}-SNAPSHOT
|
||||
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
|
||||
;;
|
||||
staging)
|
||||
info "Building artifacts for the $WORKFLOW_TYPE workflow..."
|
||||
if [ -z "$VERSION_QUALIFIER_OPT" ]; then
|
||||
RELEASE=1 rake artifact:docker || error "artifact:docker build failed."
|
||||
RELEASE=1 rake artifact:docker_oss || error "artifact:docker_oss build failed."
|
||||
RELEASE=1 rake artifact:dockerfiles || error "artifact:dockerfiles build failed."
|
||||
if [ "$ARCH" != "aarch64" ]; then
|
||||
RELEASE=1 rake artifact:docker_ubi8 || error "artifact:docker_ubi8 build failed."
|
||||
fi
|
||||
else
|
||||
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 rake artifact:docker || error "artifact:docker build failed."
|
||||
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 rake artifact:docker_oss || error "artifact:docker_oss build failed."
|
||||
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 rake artifact:dockerfiles || error "artifact:dockerfiles build failed."
|
||||
if [ "$ARCH" != "aarch64" ]; then
|
||||
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 rake artifact:docker_ubi8 || error "artifact:docker_ubi8 build failed."
|
||||
fi
|
||||
# Qualifier is passed from CI as optional field and specify the version postfix
|
||||
# in case of alpha or beta releases:
|
||||
# e.g: 8.0.0-alpha1
|
||||
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
|
||||
fi
|
||||
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
|
||||
;;
|
||||
*)
|
||||
error "Workflow (WORKFLOW_TYPE variable) is not set, exiting..."
|
||||
;;
|
||||
esac
|
||||
|
||||
info "Saving tar.gz for docker images"
|
||||
save_docker_tarballs "${ARCH}" "${STACK_VERSION}"
|
||||
|
||||
info "GENERATED ARTIFACTS"
|
||||
for file in build/logstash-*; do shasum $file;done
|
||||
|
||||
info "UPLOADING TO INTERMEDIATE BUCKET"
|
||||
# Note the deb, rpm tar.gz AARCH64 files generated has already been loaded by the dra_x86_64.sh
|
||||
images="logstash logstash-oss"
|
||||
if [ "$ARCH" != "aarch64" ]; then
|
||||
# No logstash-ubi8 for AARCH64
|
||||
images="logstash logstash-oss logstash-ubi8"
|
||||
fi
|
||||
for image in ${images}; do
|
||||
upload_to_bucket "build/$image-${STACK_VERSION}-docker-image-${ARCH}.tar.gz" ${STACK_VERSION}
|
||||
done
|
||||
|
||||
# Upload 'docker-build-context.tar.gz' files only when build x86_64, otherwise they will be
|
||||
# overwritten when building aarch64 (or viceversa).
|
||||
if [ "$ARCH" != "aarch64" ]; then
|
||||
for image in logstash logstash-oss logstash-ubi8 logstash-ironbank; do
|
||||
upload_to_bucket "build/${image}-${STACK_VERSION}-docker-build-context.tar.gz" ${STACK_VERSION}
|
||||
done
|
||||
fi
|
||||
|
||||
echo "####################################################################"
|
||||
echo "##################### Finishing $0"
|
||||
echo "####################################################################"
|
139
ci/dra_upload.sh
139
ci/dra_upload.sh
|
@ -1,139 +0,0 @@
|
|||
#!/bin/bash -iex
|
||||
#Note - ensure that the -e flag is set to properly set the $? status if any command fails
|
||||
echo "####################################################################"
|
||||
echo "##################### Starting $0"
|
||||
echo "####################################################################"
|
||||
|
||||
source ./$(dirname "$0")/dra_common.sh
|
||||
PLAIN_STACK_VERSION=$STACK_VERSION
|
||||
|
||||
# This is the branch selector that needs to be passed to the release-manager
|
||||
# It has to be the name of the branch which originates the artifacts.
|
||||
RELEASE_VER=`cat versions.yml | sed -n 's/^logstash\:[[:space:]]\([[:digit:]]*\.[[:digit:]]*\)\.[[:digit:]]*$/\1/p'`
|
||||
if [ -n "$(git ls-remote --heads origin $RELEASE_VER)" ] ; then
|
||||
RELEASE_BRANCH=$RELEASE_VER
|
||||
else
|
||||
RELEASE_BRANCH=main
|
||||
fi
|
||||
|
||||
if [ -n "$VERSION_QUALIFIER_OPT" ]; then
|
||||
# Qualifier is passed from CI as optional field and specify the version postfix
|
||||
# in case of alpha or beta releases:
|
||||
# e.g: 8.0.0-alpha1
|
||||
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
|
||||
PLAIN_STACK_VERSION="${PLAIN_STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
|
||||
fi
|
||||
|
||||
case "$WORKFLOW_TYPE" in
|
||||
snapshot)
|
||||
STACK_VERSION=${STACK_VERSION}-SNAPSHOT
|
||||
;;
|
||||
staging)
|
||||
;;
|
||||
*)
|
||||
error "Worklflow (WORKFLOW_TYPE variable) is not set, exiting..."
|
||||
;;
|
||||
esac
|
||||
|
||||
info "Uploading artifacts for ${WORKFLOW_TYPE} workflow on branch: ${RELEASE_BRANCH}"
|
||||
|
||||
info "Download all the artifacts for version ${STACK_VERSION}"
|
||||
mkdir build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-no-jdk.deb build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}.csv build/
|
||||
|
||||
# no arch
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-no-jdk.deb build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-no-jdk.rpm build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-no-jdk.tar.gz build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-no-jdk.zip build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-no-jdk.deb build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-no-jdk.rpm build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-no-jdk.tar.gz build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-no-jdk.zip build/
|
||||
|
||||
# windows
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-windows-x86_64.zip build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-windows-x86_64.zip build/
|
||||
|
||||
# unix x86
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-amd64.deb build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-x86_64.rpm build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-linux-x86_64.tar.gz build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-darwin-x86_64.tar.gz build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-amd64.deb build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-x86_64.rpm build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-linux-x86_64.tar.gz build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-darwin-x86_64.tar.gz build/
|
||||
|
||||
# unix ARM
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-arm64.deb build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-aarch64.rpm build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-linux-aarch64.tar.gz build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-arm64.deb build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-aarch64.rpm build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-linux-aarch64.tar.gz build/
|
||||
|
||||
if [ "$RELEASE_VER" != "7.17" ]; then
|
||||
# Version 7.17.x doesn't generates ARM artifacts for Darwin
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-darwin-aarch64.tar.gz build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-darwin-aarch64.tar.gz build/
|
||||
fi
|
||||
|
||||
# docker
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-docker-build-context.tar.gz build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-ironbank-${STACK_VERSION}-docker-build-context.tar.gz build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-docker-build-context.tar.gz build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-ubi8-${STACK_VERSION}-docker-build-context.tar.gz build/
|
||||
|
||||
# docker x86
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-docker-image-x86_64.tar.gz build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-docker-image-x86_64.tar.gz build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-ubi8-${STACK_VERSION}-docker-image-x86_64.tar.gz build/
|
||||
|
||||
# docker ARM
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-docker-image-aarch64.tar.gz build/
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-docker-image-aarch64.tar.gz build/
|
||||
# Commenting out ubi8 for aarch64 for the time being. This image itself is not being built, and it is not expected
|
||||
# by the release manager.
|
||||
# See https://github.com/elastic/infra/blob/master/cd/release/release-manager/project-configs/8.5/logstash.gradle
|
||||
# for more details.
|
||||
#gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-ubi8-${STACK_VERSION}-docker-image-aarch64.tar.gz build/
|
||||
|
||||
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}.csv build/
|
||||
|
||||
info "Downloaded ARTIFACTS"
|
||||
for file in build/logstash-*; do shasum $file;done
|
||||
|
||||
mkdir -p build/distributions/dependencies-reports/
|
||||
mv build/logstash-${STACK_VERSION}.csv build/distributions/dependencies-${STACK_VERSION}.csv
|
||||
|
||||
# set required permissions on artifacts and directory
|
||||
chmod -R a+r build/*
|
||||
chmod -R a+w build
|
||||
|
||||
chmod -R a+r $PWD/*
|
||||
chmod -R a+w $PWD
|
||||
|
||||
# ensure the latest image has been pulled
|
||||
docker pull docker.elastic.co/infra/release-manager:latest
|
||||
|
||||
# collect the artifacts for use with the unified build
|
||||
docker run --rm \
|
||||
--name release-manager \
|
||||
-e VAULT_ADDR \
|
||||
-e VAULT_ROLE_ID \
|
||||
-e VAULT_SECRET_ID \
|
||||
--mount type=bind,readonly=false,src="$PWD",target=/artifacts \
|
||||
docker.elastic.co/infra/release-manager:latest \
|
||||
cli collect \
|
||||
--project logstash \
|
||||
--branch ${RELEASE_BRANCH} \
|
||||
--commit "$(git rev-parse HEAD)" \
|
||||
--workflow "${WORKFLOW_TYPE}" \
|
||||
--version "${PLAIN_STACK_VERSION}" \
|
||||
--artifact-set main
|
||||
|
||||
echo "####################################################################"
|
||||
echo "##################### Finishing $0"
|
||||
echo "####################################################################"
|
|
@ -1,63 +0,0 @@
|
|||
#!/bin/bash -ie
|
||||
#Note - ensure that the -e flag is set to properly set the $? status if any command fails
|
||||
echo "####################################################################"
|
||||
echo "##################### Starting $0"
|
||||
echo "####################################################################"
|
||||
|
||||
source ./$(dirname "$0")/dra_common.sh
|
||||
|
||||
# WORKFLOW_TYPE is a CI externally configured environment variable that could assume "snapshot" or "staging" values
|
||||
case "$WORKFLOW_TYPE" in
|
||||
snapshot)
|
||||
info "Building artifacts for the $WORKFLOW_TYPE workflow..."
|
||||
if [ -z "$VERSION_QUALIFIER_OPT" ]; then
|
||||
SKIP_DOCKER=1 rake artifact:all || error "rake artifact:all build failed."
|
||||
else
|
||||
# Qualifier is passed from CI as optional field and specify the version postfix
|
||||
# in case of alpha or beta releases:
|
||||
# e.g: 8.0.0-alpha1
|
||||
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" SKIP_DOCKER=1 rake artifact:all || error "rake artifact:all build failed."
|
||||
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
|
||||
fi
|
||||
STACK_VERSION=${STACK_VERSION}-SNAPSHOT
|
||||
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
|
||||
;;
|
||||
staging)
|
||||
info "Building artifacts for the $WORKFLOW_TYPE workflow..."
|
||||
if [ -z "$VERSION_QUALIFIER_OPT" ]; then
|
||||
RELEASE=1 SKIP_DOCKER=1 rake artifact:all || error "rake artifact:all build failed."
|
||||
else
|
||||
# Qualifier is passed from CI as optional field and specify the version postfix
|
||||
# in case of alpha or beta releases:
|
||||
# e.g: 8.0.0-alpha1
|
||||
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 SKIP_DOCKER=1 rake artifact:all || error "rake artifact:all build failed."
|
||||
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
|
||||
fi
|
||||
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
|
||||
;;
|
||||
*)
|
||||
error "Workflow (WORKFLOW_TYPE variable) is not set, exiting..."
|
||||
;;
|
||||
esac
|
||||
|
||||
info "GENERATED ARTIFACTS"
|
||||
for file in build/logstash-*; do shasum $file;done
|
||||
|
||||
info "Creating dependencies report for ${STACK_VERSION}"
|
||||
mkdir -p build/distributions/dependencies-reports/
|
||||
bin/dependencies-report --csv=build/distributions/dependencies-reports/logstash-${STACK_VERSION}.csv
|
||||
|
||||
info "GENERATED DEPENDENCIES REPORT"
|
||||
shasum build/distributions/dependencies-reports/logstash-${STACK_VERSION}.csv
|
||||
|
||||
info "UPLOADING TO INTERMEDIATE BUCKET"
|
||||
for file in build/logstash-*; do
|
||||
upload_to_bucket $file ${STACK_VERSION}
|
||||
done
|
||||
|
||||
# Upload Dependencies Report
|
||||
upload_to_bucket "build/distributions/dependencies-reports/logstash-${STACK_VERSION}.csv" ${STACK_VERSION}
|
||||
|
||||
echo "####################################################################"
|
||||
echo "##################### Finishing $0"
|
||||
echo "####################################################################"
|
28
qa/Vagrantfile
vendored
28
qa/Vagrantfile
vendored
|
@ -1,28 +0,0 @@
|
|||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
require_relative "./platform_config.rb"
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
platforms = PlatformConfig.new
|
||||
|
||||
platforms.each do |platform|
|
||||
config.vm.define platform.name do |machine|
|
||||
machine.vm.box = platform.box
|
||||
machine.vm.provider "virtualbox" do |v|
|
||||
v.memory = 4096
|
||||
v.cpus = 4
|
||||
end
|
||||
machine.vm.synced_folder "../build", "/logstash-build", create: true
|
||||
|
||||
machine.vm.provision :shell do |sh|
|
||||
sh.path = platform.bootstrap.privileged
|
||||
sh.privileged = true
|
||||
end
|
||||
|
||||
machine.vm.provision :shell do |sh|
|
||||
sh.path = platform.bootstrap.non_privileged
|
||||
sh.privileged = false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -33,15 +33,15 @@ shared_examples "logstash install" do |logstash|
|
|||
context "when the plugin exist" do
|
||||
context "from a local `.GEM` file" do
|
||||
let(:gem_name) { "logstash-filter-qatest-0.1.1.gem" }
|
||||
let(:gem_path_on_vagrant) { "/tmp/#{gem_name}" }
|
||||
let(:gem_tmp_path) { "/tmp/#{gem_name}" }
|
||||
before(:each) do
|
||||
logstash.download("https://rubygems.org/gems/#{gem_name}", gem_path_on_vagrant)
|
||||
logstash.download("https://rubygems.org/gems/#{gem_name}", gem_tmp_path)
|
||||
end
|
||||
|
||||
after(:each) { logstash.delete_file(gem_path_on_vagrant) }
|
||||
after(:each) { logstash.delete_file(gem_tmp_path) }
|
||||
|
||||
it "successfully install the plugin" do
|
||||
command = logstash.run_command_in_path("bin/logstash-plugin install #{gem_path_on_vagrant}")
|
||||
command = logstash.run_command_in_path("bin/logstash-plugin install #{gem_tmp_path}")
|
||||
expect(command).to install_successfully
|
||||
expect(logstash).to have_installed?("logstash-filter-dns")
|
||||
expect(logstash).not_to be_running
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
# or more contributor license agreements. Licensed under the Elastic License;
|
||||
# you may not use this file except in compliance with the Elastic License.
|
||||
if [ -n "${ELASTICSEARCH_SNAPSHOT_URL}" ]; then
|
||||
export DOCKER_ENV_OPTS="${DOCKER_ENV_OPTS} --env ELASTICSEARCH_SNAPSHOT_URL=${ELASTICSEARCH_SNAPSHOT_URL}"
|
||||
fi
|
||||
ci/docker_run.sh logstash-xpack-integration-tests x-pack/ci/integration_tests.sh $@
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
# or more contributor license agreements. Licensed under the Elastic License;
|
||||
# you may not use this file except in compliance with the Elastic License.
|
||||
ci/docker_run.sh logstash-xpack-unit-tests x-pack/ci/unit_tests.sh $@
|
Loading…
Add table
Add a link
Reference in a new issue