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

Test packaged EOSIO Linux artifacts against standard dockers. #10431

Merged
merged 3 commits into from
Jul 8, 2021
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
55 changes: 55 additions & 0 deletions .cicd/generate-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,33 @@ cat <<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 @@ -580,6 +607,20 @@ cat <<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 @@ -594,6 +635,20 @@ cat <<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