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 #8815 from EOSIO/merge-release-2.0.4-to-master
Browse files Browse the repository at this point in the history
Merge release 2.0.4 to master
  • Loading branch information
arhag authored Mar 12, 2020
2 parents 94354d2 + 1877644 commit b39b6bd
Show file tree
Hide file tree
Showing 88 changed files with 9,080 additions and 756 deletions.
121 changes: 121 additions & 0 deletions .cicd/base-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
steps:
- wait

- label: ":aws: Amazon_Linux 2 - Base Image Pinned"
command:
- "./.cicd/generate-base-images.sh"
env:
FORCE_BASE_IMAGE: true
IMAGE_TAG: amazon_linux-2-pinned
PLATFORM_TYPE: pinned
agents:
queue: "automation-eks-eos-builder-fleet"
timeout: 180

- label: ":centos: CentOS 7.7 - Base Image Pinned"
command:
- "./.cicd/generate-base-images.sh"
env:
FORCE_BASE_IMAGE: true
IMAGE_TAG: centos-7.7-pinned
PLATFORM_TYPE: pinned
agents:
queue: "automation-eks-eos-builder-fleet"
timeout: 180

- label: ":darwin: macOS 10.14 - Base Image Pinned"
command:
- "git clone [email protected]:EOSIO/eos.git eos && cd eos && git checkout -f $BUILDKITE_BRANCH"
- "cd eos && ./.cicd/platforms/pinned/macos-10.14-pinned.sh"
plugins:
- EOSIO/anka#v0.6.0:
debug: true
vm-name: "10.14.6_6C_14G_40G"
no-volume: true
always-pull: true
wait-network: true
vm-registry-tag: "clean::cicd::git-ssh::nas::brew::buildkite-agent"
failover-registries:
- "registry_1"
- "registry_2"
inherit-environment-vars: true
- EOSIO/skip-checkout#v0.1.1:
cd: ~
agents: "queue=mac-anka-node-fleet"
timeout: 180

- label: ":ubuntu: Ubuntu 16.04 - Base Image Pinned"
command:
- "./.cicd/generate-base-images.sh"
env:
FORCE_BASE_IMAGE: true
IMAGE_TAG: ubuntu-16.04-pinned
PLATFORM_TYPE: pinned
agents:
queue: "automation-eks-eos-builder-fleet"
timeout: 180

- label: ":ubuntu: Ubuntu 18.04 - Base Image Pinned"
command:
- "./.cicd/generate-base-images.sh"
env:
FORCE_BASE_IMAGE: true
IMAGE_TAG: ubuntu-18.04-pinned
PLATFORM_TYPE: pinned
agents:
queue: "automation-eks-eos-builder-fleet"
timeout: 180

- label: ":aws: Amazon_Linux 2 - Base Image Unpinned"
command:
- "./.cicd/generate-base-images.sh"
env:
FORCE_BASE_IMAGE: true
IMAGE_TAG: amazon_linux-2-unpinned
PLATFORM_TYPE: unpinned
agents:
queue: "automation-eks-eos-builder-fleet"
timeout: 180

- label: ":centos: CentOS 7.7 - Base Image Unpinned"
command:
- "./.cicd/generate-base-images.sh"
env:
FORCE_BASE_IMAGE: true
IMAGE_TAG: centos-7.7-unpinned
PLATFORM_TYPE: unpinned
agents:
queue: "automation-eks-eos-builder-fleet"
timeout: 180

- label: ":darwin: macOS 10.14 - Base Image Unpinned"
command:
- "git clone [email protected]:EOSIO/eos.git eos && cd eos && git checkout -f $BUILDKITE_BRANCH"
- "cd eos && ./.cicd/platforms/unpinned/macos-10.14-unpinned.sh"
plugins:
- EOSIO/anka#v0.6.0:
debug: true
vm-name: "10.14.6_6C_14G_40G"
no-volume: true
always-pull: true
wait-network: true
vm-registry-tag: "clean::cicd::git-ssh::nas::brew::buildkite-agent"
failover-registries:
- "registry_1"
- "registry_2"
inherit-environment-vars: true
- EOSIO/skip-checkout#v0.1.1:
cd: ~
agents: "queue=mac-anka-node-fleet"
timeout: 180

- label: ":ubuntu: Ubuntu 18.04 - Base Image Unpinned"
command:
- "./.cicd/generate-base-images.sh"
env:
FORCE_BASE_IMAGE: true
IMAGE_TAG: ubuntu-18.04-unpinned
PLATFORM_TYPE: unpinned
agents:
queue: "automation-eks-eos-builder-fleet"
timeout: 180
11 changes: 8 additions & 3 deletions .cicd/generate-base-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ ORG_REPO=$(echo $FULL_TAG | cut -d: -f1)
TAG=$(echo $FULL_TAG | cut -d: -f2)
EXISTS=$(curl -s -H "Authorization: Bearer $(curl -sSL "https://auth.docker.io/token?service=registry.docker.io&scope=repository:${ORG_REPO}:pull" | jq --raw-output .token)" "https://registry.hub.docker.com/v2/${ORG_REPO}/manifests/$TAG")
# build, if neccessary
if [[ $EXISTS =~ '404 page not found' || $EXISTS =~ 'manifest unknown' || $FORCE_BASE_IMAGE == 'true' ]]; then # if we cannot pull the image, we build and push it first
docker build -t $FULL_TAG -f $CICD_DIR/platforms/$PLATFORM_TYPE/$IMAGE_TAG.dockerfile .
docker push $FULL_TAG
if [[ $EXISTS =~ '404 page not found' || $EXISTS =~ 'manifest unknown' || $FORCE_BASE_IMAGE == true ]]; then # if we cannot pull the image, we build and push it first
docker build --no-cache -t $FULL_TAG -f $CICD_DIR/platforms/$PLATFORM_TYPE/$IMAGE_TAG.dockerfile .
if [[ $FORCE_BASE_IMAGE != true ]]; then
docker push $FULL_TAG
else
echo "Base image creation successful. Not pushing...".
exit 0
fi
else
echo "$FULL_TAG already exists."
fi
8 changes: 1 addition & 7 deletions .cicd/submodule-regression-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [[ $BUILDKITE == true ]]; then
else
[[ -z $GITHUB_BASE_REF ]] && echo "Cannot find \$GITHUB_BASE_REF, so we have nothing to compare submodules to. Skipping submodule regression check." && exit 0
BASE_BRANCH=$GITHUB_BASE_REF
CURRENT_BRANCH=$GITHUB_SHA
CURRENT_BRANCH="refs/remotes/pull/$PR_NUMBER/merge"
fi

echo "getting submodule info for $CURRENT_BRANCH"
Expand All @@ -25,12 +25,6 @@ while read -r a b; do
BASE_MAP[$a]=$b
done < <(git submodule --quiet foreach --recursive 'echo $path `git log -1 --format=%ct`')

# We need to switch back to the PR ref/head so we can git log properly
if [[ $BUILDKITE != true ]]; then
echo "git fetch origin +$GITHUB_REF:"
git fetch origin +${GITHUB_REF}: 1> /dev/null
fi

echo "switching back to $CURRENT_BRANCH..."
echo "git checkout -qf $CURRENT_BRANCH"
git checkout -qf $CURRENT_BRANCH 1> /dev/null
Expand Down
Loading

0 comments on commit b39b6bd

Please sign in to comment.