Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #10431 from EOSIO/develop_package_tests
Browse files Browse the repository at this point in the history
Test packaged EOSIO Linux artifacts against standard dockers.
  • Loading branch information
kj4ezj authored Jul 8, 2021
2 parents 294b475 + 8bd101f commit 35cd50c
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .cicd/generate-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,33 @@ EOF
PKGTYPE: "rpm"
agents:
queue: "$BUILDKITE_TEST_AGENT_QUEUE"
key: "centos7pb"
timeout: ${TIMEOUT:-10}
skip: ${SKIP_CENTOS_7_7}${SKIP_PACKAGE_BUILDER}${SKIP_LINUX}
- label: ":centos: CentOS 7 - Test Package"
command:
- "buildkite-agent artifact download '*.rpm' . --step ':centos: CentOS 7.7 - Package Builder' --agent-access-token \$\$BUILDKITE_AGENT_ACCESS_TOKEN"
- "./.cicd/test-package.sh"
env:
IMAGE: "centos:7"
agents:
queue: "$BUILDKITE_TEST_AGENT_QUEUE"
depends_on: "centos7pb"
allow_dependency_failure: false
timeout: ${TIMEOUT:-10}
skip: ${SKIP_CENTOS_7_7}${SKIP_PACKAGE_BUILDER}${SKIP_LINUX}
- label: ":aws: Amazon Linux 2 - Test Package"
command:
- "buildkite-agent artifact download '*.rpm' . --step ':centos: CentOS 7.7 - Package Builder' --agent-access-token \$\$BUILDKITE_AGENT_ACCESS_TOKEN"
- "./.cicd/test-package.sh"
env:
IMAGE: "amazonlinux:2"
agents:
queue: "$BUILDKITE_TEST_AGENT_QUEUE"
depends_on: "centos7pb"
allow_dependency_failure: false
timeout: ${TIMEOUT:-10}
skip: ${SKIP_CENTOS_7_7}${SKIP_PACKAGE_BUILDER}${SKIP_LINUX}
Expand All @@ -603,6 +630,20 @@ EOF
PKGTYPE: "deb"
agents:
queue: "$BUILDKITE_TEST_AGENT_QUEUE"
key: "ubuntu1804pb"
timeout: ${TIMEOUT:-10}
skip: ${SKIP_UBUNTU_18_04}${SKIP_PACKAGE_BUILDER}${SKIP_LINUX}
- label: ":ubuntu: Ubuntu 18.04 - Test Package"
command:
- "buildkite-agent artifact download '*.deb' . --step ':ubuntu: Ubuntu 18.04 - Package Builder' --agent-access-token \$\$BUILDKITE_AGENT_ACCESS_TOKEN"
- "./.cicd/test-package.sh"
env:
IMAGE: "ubuntu:18.04"
agents:
queue: "$BUILDKITE_TEST_AGENT_QUEUE"
depends_on: "ubuntu1804pb"
allow_dependency_failure: false
timeout: ${TIMEOUT:-10}
skip: ${SKIP_UBUNTU_18_04}${SKIP_PACKAGE_BUILDER}${SKIP_LINUX}
Expand All @@ -617,6 +658,20 @@ EOF
PKGTYPE: "deb"
agents:
queue: "$BUILDKITE_TEST_AGENT_QUEUE"
key: "ubuntu2004pb"
timeout: ${TIMEOUT:-10}
skip: ${SKIP_UBUNTU_20_04}${SKIP_PACKAGE_BUILDER}${SKIP_LINUX}
- label: ":ubuntu: Ubuntu 20.04 - Test Package"
command:
- "buildkite-agent artifact download '*.deb' . --step ':ubuntu: Ubuntu 20.04 - Package Builder' --agent-access-token \$\$BUILDKITE_AGENT_ACCESS_TOKEN"
- "./.cicd/test-package.sh"
env:
IMAGE: "ubuntu:20.04"
agents:
queue: "$BUILDKITE_TEST_AGENT_QUEUE"
depends_on: "ubuntu2004pb"
allow_dependency_failure: false
timeout: ${TIMEOUT:-10}
skip: ${SKIP_UBUNTU_20_04}${SKIP_PACKAGE_BUILDER}${SKIP_LINUX}
Expand Down
25 changes: 25 additions & 0 deletions .cicd/test-package.run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
set -eu

echo '+++ :minidisc: Installing EOSIO'

if [[ $(apt-get --version 2>/dev/null) ]]; then # debian family
UPDATE='apt-get update'
echo "$ $UPDATE"
eval $UPDATE
INSTALL="apt-get install -y /eos/*.deb"
echo "$ $INSTALL"
eval $INSTALL
elif [[ $(yum --version 2>/dev/null) ]]; then # RHEL family
UPDATE='yum check-update || :'
echo "$ $UPDATE"
eval $UPDATE
INSTALL="yum install -y /eos/*.rpm"
echo "$ $INSTALL"
eval $INSTALL
else
echo 'ERROR: Package manager not detected!'
exit 3
fi

nodeos --full-version
7 changes: 7 additions & 0 deletions .cicd/test-package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -eu

echo '--- :docker: Selecting Container'

docker pull $IMAGE
docker run --rm -v "$(pwd):/eos" -w '/eos' -it $IMAGE ./.cicd/test-package.run.sh

0 comments on commit 35cd50c

Please sign in to comment.