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

Commit

Permalink
Support for amazonlinux2 (#6841)
Browse files Browse the repository at this point in the history
  • Loading branch information
NorseGaud authored Feb 26, 2019
1 parent 511e532 commit 6db1d6d
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 78 deletions.
148 changes: 74 additions & 74 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,26 @@ steps:
workdir: /data/job
timeout: 60
# - command: |
# echo "+++ :hammer: Building" && \
# ./scripts/eosio_build.sh -y && \
# echo "--- :compression: Compressing build directory" && \
# tar -pczf build.tar.gz build/
# label: ":aws: 2 Build"
# agents:
# queue: "automation-large-builder-fleet"
# artifact_paths: "build.tar.gz"
# plugins:
# ecr#v1.1.4:
# login: true
# account_ids: "436617320021"
# no-include-email: true
# region: "us-west-2"
# docker#v2.1.0:
# debug: true
# image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-1"
# workdir: /data/job
# timeout: 60
- command: |
echo "+++ :hammer: Building" && \
./scripts/eosio_build.sh -y && \
echo "--- :compression: Compressing build directory" && \
tar -pczf build.tar.gz build/
label: ":aws: 2 Build"
agents:
queue: "automation-large-builder-fleet"
artifact_paths: "build.tar.gz"
plugins:
ecr#v1.1.4:
login: true
account_ids: "436617320021"
no-include-email: true
region: "us-west-2"
docker#v2.1.0:
debug: true
image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-1"
workdir: /data/job
timeout: 60
- command: |
echo "+++ :hammer: Building" && \
Expand Down Expand Up @@ -373,59 +373,59 @@ steps:
workdir: /data/job
timeout: 60
# - command: |
# echo "--- :arrow_down: Downloading build directory" && \
# buildkite-agent artifact download "build.tar.gz" . --step ":aws: 2 Build" && \
# tar -zxf build.tar.gz && \
# echo "--- :m: Starting MongoDB" && \
# ~/bin/mongod --fork --dbpath ~/data/mongodb -f ~/etc/mongod.conf --logpath "$(pwd)"/mongod.log && \
# echo "+++ :microscope: Running tests" && \
# cd /data/job/build && PATH=\$PATH:~/opt/mongodb/bin ctest -j8 -LE _tests --output-on-failure
# label: ":aws: 2 Tests"
# agents:
# queue: "automation-large-builder-fleet"
# artifact_paths:
# - "mongod.log"
# - "build/genesis.json"
# - "build/config.ini"
# plugins:
# ecr#v1.1.4:
# login: true
# account_ids: "436617320021"
# no-include-email: true
# region: "us-west-2"
# docker#v2.1.0:
# debug: true
# image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-1"
# workdir: /data/job
# timeout: 60

# - command: |
# echo "--- :arrow_down: Downloading build directory" && \
# buildkite-agent artifact download "build.tar.gz" . --step ":aws: 2 Build" && \
# tar -zxf build.tar.gz && \
# echo "--- :m: Starting MongoDB" && \
# ~/bin/mongod --fork --dbpath ~/data/mongodb -f ~/etc/mongod.conf --logpath "$(pwd)"/mongod.log && \
# echo "+++ :microscope: Running tests" && \
# cd /data/job/build && PATH=\$PATH:~/opt/mongodb/bin ctest -L nonparallelizable_tests --output-on-failure
# label: ":aws: 2 NP Tests"
# agents:
# queue: "automation-large-builder-fleet"
# artifact_paths:
# - "mongod.log"
# - "build/genesis.json"
# - "build/config.ini"
# plugins:
# ecr#v1.1.4:
# login: true
# account_ids: "436617320021"
# no-include-email: true
# region: "us-west-2"
# docker#v2.1.0:
# debug: true
# image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-1"
# workdir: /data/job
# timeout: 60
- command: |
echo "--- :arrow_down: Downloading build directory" && \
buildkite-agent artifact download "build.tar.gz" . --step ":aws: 2 Build" && \
tar -zxf build.tar.gz && \
echo "--- :m: Starting MongoDB" && \
~/bin/mongod --fork --dbpath ~/data/mongodb -f ~/etc/mongod.conf --logpath "$(pwd)"/mongod.log && \
echo "+++ :microscope: Running tests" && \
cd /data/job/build && PATH=\$PATH:~/opt/mongodb/bin ctest -j8 -LE _tests --output-on-failure
label: ":aws: 2 Tests"
agents:
queue: "automation-large-builder-fleet"
artifact_paths:
- "mongod.log"
- "build/genesis.json"
- "build/config.ini"
plugins:
ecr#v1.1.4:
login: true
account_ids: "436617320021"
no-include-email: true
region: "us-west-2"
docker#v2.1.0:
debug: true
image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-1"
workdir: /data/job
timeout: 60
- command: |
echo "--- :arrow_down: Downloading build directory" && \
buildkite-agent artifact download "build.tar.gz" . --step ":aws: 2 Build" && \
tar -zxf build.tar.gz && \
echo "--- :m: Starting MongoDB" && \
~/bin/mongod --fork --dbpath ~/data/mongodb -f ~/etc/mongod.conf --logpath "$(pwd)"/mongod.log && \
echo "+++ :microscope: Running tests" && \
cd /data/job/build && PATH=\$PATH:~/opt/mongodb/bin ctest -L nonparallelizable_tests --output-on-failure
label: ":aws: 2 NP Tests"
agents:
queue: "automation-large-builder-fleet"
artifact_paths:
- "mongod.log"
- "build/genesis.json"
- "build/config.ini"
plugins:
ecr#v1.1.4:
login: true
account_ids: "436617320021"
no-include-email: true
region: "us-west-2"
docker#v2.1.0:
debug: true
image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-1"
workdir: /data/job
timeout: 60
- command: |
echo "--- :arrow_down: Downloading build directory" && \
Expand Down Expand Up @@ -716,4 +716,4 @@ steps:
artifact_paths:
- "build/packages/eosio_highsierra.rb"
- "build/packages/eosio.rb"
timeout: 60
timeout: 60
3 changes: 1 addition & 2 deletions scripts/full_uninstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ if [ -d "/usr/local/include/eosio" ] || [ -d "$HOME/opt/eosio" ] || [ $FORCED ==
elif [ $1 == 1 ] || [ $FORCED == 1 ]; then
ANSWER=1
fi
echo "Uninstalling..."
case $ANSWER in
1 | [Yy]* )
echo "Uninstalling..."
if [ -d "$HOME/opt/eosio" ] || [[ $1 == "force-new" ]]; then
if [ $( uname ) == "Darwin" ]; then
# gettext and other brew packages are not modified as they can be dependencies for things other than eosio
Expand Down Expand Up @@ -128,7 +128,6 @@ if [ -d "/usr/local/include/eosio" ] || [ -d "$HOME/opt/eosio" ] || [ $FORCED ==
;;
[Nn]* )
printf "Skipping\n\n"
exit 0
;;
esac
fi
10 changes: 8 additions & 2 deletions tests/testUtils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import re
import errno
import subprocess
import time
Expand Down Expand Up @@ -219,10 +220,15 @@ def arePortsAvailable(ports):

@staticmethod
def pgrepCmd(serverName):
pgrepOpts="-fl"
# pylint: disable=deprecated-method
if platform.linux_distribution()[0] in ["Ubuntu", "LinuxMint", "Fedora","CentOS Linux","arch"]:
# pgrep differs on different platform (amazonlinux1 and 2 for example). We need to check if pgrep -h has -a available and add that if so:
try:
pgrepHelp = re.search('-a', subprocess.Popen("pgrep --help 2>/dev/null", shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8'))
pgrepHelp.group(0) # group() errors if -a is not found, so we don't need to do anything else special here.
pgrepOpts="-a"
except AttributeError as error:
# If no -a, AttributeError: 'NoneType' object has no attribute 'group'
pgrepOpts="-fl"

return "pgrep %s %s" % (pgrepOpts, serverName)

Expand Down

0 comments on commit 6db1d6d

Please sign in to comment.