Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add go integration tests with supervisord #3526

Merged
merged 1 commit into from
Jan 3, 2020
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
35 changes: 17 additions & 18 deletions .buildkite/hooks/pre-artifact
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

set -eo pipefail

# Currently this is only needed for the new pipeline, so if we aren't on the new
# pipeline just exit.
if [ ! "$BUILDKITE_PIPELINE_SLUG" == "scionproto2" ]; then
exit 0
fi
case ${BUILDKITE_PIPELINE_SLUG} in
scionproto2 | scion )
;;
*)
exit 0 # If we aren't on the new pipeline, then just exit.
;;
esac

# Now we build the artifact name next, for this we first need TARGET and BUILD,
# see below.
Expand All @@ -24,27 +26,24 @@ BUILD="build-${BUILDKITE_BUILD_NUMBER}"
[ -n "$NIGHTLY" ] && BUILD=nightly-"$(date +%s)"
echo "\$BUILD=$BUILD"

ARTIFACTS="buildkite.${BUILDKITE_ORGANIZATION_SLUG}.${TARGET}.${BUILD}.${BUILDKITE_STEP_KEY}.${BUILDKITE_JOB_ID}"
echo "\$ARTIFACTS=$ARTIFACTS"

ARTIFACTS_DIR="artifacts"
echo "\$ARTIFACTS_DIR=$ARTIFACTS_DIR"
ARTIFACTS="buildkite.${BUILDKITE_ORGANIZATION_SLUG}.${TARGET}.${BUILD}.${BUILDKITE_STEP_KEY:-unset}.${BUILDKITE_JOB_ID}"
mkdir -p "artifacts/$ARTIFACTS" artifacts.out

function save {
if [ -d "$1" ]; then
echo Found artifacts: "$1"
find "$1"
cp -R "$1" "$ARTIFACTS_DIR/$ARTIFACTS"
fi
if [ -d "$1" ]; then
echo Found artifacts: "$1"
cp -R "$1" "artifacts/$ARTIFACTS"
fi
}

mkdir -p "$ARTIFACTS_DIR/$ARTIFACTS" artifacts.out

save "bazel-testlogs"
save "logs"
save "traces"
save "gen"
save "gen-cache"
save "$TEST_ARTIFACTS"

tar chaf "artifacts.out/$ARTIFACTS.tar.gz" -C "$ARTIFACTS_DIR" "$ARTIFACTS"
tar chaf "artifacts.out/$ARTIFACTS.tar.gz" -C artifacts "$ARTIFACTS"
rm -rf artifacts

echo "Output tar= artifacts.out/$ARTIFACTS.tar.gz"
19 changes: 19 additions & 0 deletions .buildkite/pipeline_buildlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,22 @@ steps:
automatic:
- exit_status: -1 # Agent was lost
- exit_status: 255 # Forced agent shutdown
- label: "Integration: {cert_req,pp,end2end,scmp}_integration"
command:
- bazel --bazelrc=.bazelrc_ci build //:scion //:scion-ci >/dev/null 2>&1
- tar -kxf bazel-bin/scion.tar -C bin --overwrite
- tar -kxf bazel-bin/scion-ci.tar -C bin --overwrite
- ./scion.sh topology nobuild
- ./scion.sh run nobuild && sleep 10
- ./bin/cert_req_integration -log.console warn
- ./bin/pp_integration -log.console warn
- ./bin/scmp_integration -log.console warn
- ./bin/end2end_integration -log.console warn
artifact_paths:
- "artifacts.out/**/*"
timeout_in_minutes: 5
key: integration_tests
retry:
automatic:
- exit_status: -1 # Agent was lost
- exit_status: 255 # Forced agent shutdown
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ tags
# bazel artifacts
/bazel-*
/.bazel-cache

# local buildkite run
/artifacts.out