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 #988 from EOSIO/updating_cicd_for_release
Browse files Browse the repository at this point in the history
Updating default branch with new ci/cd and dependabot settings
  • Loading branch information
Brad Hart authored Jul 12, 2021
2 parents 649f523 + a1fbfb3 commit ea34fb9
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 95 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ updates:
directory: "/"
schedule:
interval: "weekly"
target-branch: "release/21.0.x"
target-branch: "release/22.0.x"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
target-branch: "release/22.0.x"
target-branch: "release/22.1.x"
37 changes: 8 additions & 29 deletions .github/eosjs-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,31 @@ WORKDIR /root
RUN apt-get update \
&& apt-get install -yq curl git

RUN if [ "$CDTBRANCH" = "release_1.7.x" ]; then \
git clone https://github.com/EOSIO/tropical-example-web-app \
&& mkdir -p /root/contracts/eosio.bios_v1.8.3 && mv ./tropical-example-web-app/eosio/contracts/eosio.bios-v1.8.3/* /root/contracts/eosio.bios_v1.8.3/ \

&& git clone https://github.com/EOSIO/eos \
&& cd eos \
&& git checkout v2.0.12 \
&& mkdir -p /root/contracts/eosio.bios/ && mv ./unittests/contracts/eosio.bios/* /root/contracts/eosio.bios/ \
&& mkdir -p /root/contracts/eosio.system/ && mv ./unittests/contracts/eosio.system/* /root/contracts/eosio.system/ \
&& mkdir -p /root/contracts/eosio.msig/ && mv ./unittests/contracts/eosio.msig/* /root/contracts/eosio.msig/ \
&& mkdir -p /root/contracts/eosio.token/ && mv ./unittests/contracts/eosio.token/* /root/contracts/eosio.token/ \
; fi

RUN if [ "$CDTBRANCH" = "release_1.8.x" ] || [ "$CDTBRANCH" = "develop" ]; then \
git clone https://github.com/EOSIO/eos \
RUN git clone https://github.com/EOSIO/eos \
&& cd eos \
&& git checkout develop \
&& mkdir -p /root/contracts/eosio.bios/ && mv ./contracts/contracts/eosio.bios/bin/* /root/contracts/eosio.bios/ \
&& mkdir -p /root/contracts/eosio.boot/ && mv ./contracts/contracts/eosio.boot/bin/* /root/contracts/eosio.boot/ \
&& mkdir -p /root/contracts/eosio.system/ && mv ./unittests/contracts/eosio.system/* /root/contracts/eosio.system/ \
&& mkdir -p /root/contracts/eosio.msig/ && mv ./unittests/contracts/eosio.msig/* /root/contracts/eosio.msig/ \
&& mkdir -p /root/contracts/eosio.token/ && mv ./unittests/contracts/eosio.token/* /root/contracts/eosio.token/ \
; fi
&& mkdir -p /root/contracts/eosio.token/ && mv ./unittests/contracts/eosio.token/* /root/contracts/eosio.token/

RUN if [ "$CDTBRANCH" = "develop" ]; then \
git clone https://github.com/EOSIO/eosio.cdt \
RUN git clone https://github.com/EOSIO/eosio.cdt \
&& cd eosio.cdt \
&& git checkout develop \
&& mkdir -p build/read_only_query_tests/ \
&& eosio-cpp -abigen ./tests/unit/test_contracts/read_only_query_tests.cpp -o ./build/read_only_query_tests/read_only_query_tests.wasm \
&& mkdir -p /root/contracts/read_only_query_tests/ && mv ./build/read_only_query_tests/* /root/contracts/read_only_query_tests/ \
; fi
&& mkdir -p /root/contracts/read_only_query_tests/ && mv ./build/read_only_query_tests/* /root/contracts/read_only_query_tests/

RUN if [ "$CDTBRANCH" = "release_1.8.x" ] || [ "$CDTBRANCH" = "develop" ]; then \
git clone https://github.com/EOSIO/key-value-example-app.git \
RUN git clone https://github.com/EOSIO/key-value-example-app.git \
&& cd key-value-example-app \
&& eosio-cpp -abigen ./contracts/kv_todo/src/kv_todo.cpp -o ./contracts/kv_todo/build/kv_todo.wasm -R ./contracts/kv_todo/ricardian/ -I ./contracts/kv_todo/include/ \
&& mkdir -p /root/contracts/kv_todo/ && mv ./contracts/kv_todo/build/* /root/contracts/kv_todo/ \
; fi
&& mkdir -p /root/contracts/kv_todo/ && mv ./contracts/kv_todo/build/* /root/contracts/kv_todo/

RUN if [ "$CDTBRANCH" = "release_1.8.x" ] || [ "$CDTBRANCH" = "develop" ]; then \
git clone https://github.com/EOSIO/return-values-example-app.git \
RUN git clone https://github.com/EOSIO/return-values-example-app.git \
&& cd return-values-example-app \
&& eosio-cpp -abigen ./contracts/action_return_value/src/action_return_value.cpp -o ./contracts/action_return_value/build/action_return_value.wasm -R ./contracts/action_return_value/ricardian/ \
&& mkdir -p /root/contracts/action_return_value/ && mv ./contracts/action_return_value/build/* /root/contracts/action_return_value/ \
; fi
&& mkdir -p /root/contracts/action_return_value/ && mv ./contracts/action_return_value/build/* /root/contracts/action_return_value/

RUN mkdir cfhello
COPY ./contracts/cfhello.cpp /root/cfhello
Expand Down
78 changes: 27 additions & 51 deletions .github/eosjs-ci/scripts/deploy_contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,36 +169,16 @@ cleos create account cfhello cfactor $CFACTOR_PUBLIC_KEY
# preactivate concensus upgrades
post_preactivate

if [ $EOSBRANCH = "release_2.0.x" ]; then
sleep 1s
setabi eosio $CONTRACTS_DIR/eosio.bios_v1.8.3/eosio.bios.abi
setcode eosio $CONTRACTS_DIR/eosio.bios_v1.8.3/eosio.bios.wasm

sleep 1s
activate_feature "299dcb6af692324b899b39f16d5a530a33062804e41f09dc97e9f156b4476707"

sleep 1s
setabi eosio $CONTRACTS_DIR/eosio.bios/eosio.bios.abi
setcode eosio $CONTRACTS_DIR/eosio.bios/eosio.bios.wasm

sleep 1s
fi

if [ $EOSBRANCH = "release_2.1.x" ] || [ $EOSBRANCH = "develop" ]; then
sleep 1s
setabi eosio $CONTRACTS_DIR/eosio.boot/eosio.boot.abi
setcode eosio $CONTRACTS_DIR/eosio.boot/eosio.boot.wasm

sleep 1s
activate_feature "299dcb6af692324b899b39f16d5a530a33062804e41f09dc97e9f156b4476707"
fi
sleep 1s
setabi eosio $CONTRACTS_DIR/eosio.boot/eosio.boot.abi
setcode eosio $CONTRACTS_DIR/eosio.boot/eosio.boot.wasm

if [ $EOSBRANCH = "release_2.1.x" ] || [ $EOSBRANCH = "develop" ]; then
activate_feature "825ee6288fb1373eab1b5187ec2f04f6eacb39cb3a97f356a07c91622dd61d16"
activate_feature "c3a6138c5061cf291310887c0b5c71fcaffeab90d5deb50d3b9e687cead45071"
activate_feature "bf61537fd21c61a60e542a5d66c3f6a78da0589336868307f94a82bccea84e88"
activate_feature "5443fcf88330c586bc0e5f3dee10e7f63c76c00249c87fe4fbf7f38c082006b4"
fi
sleep 1s
activate_feature "299dcb6af692324b899b39f16d5a530a33062804e41f09dc97e9f156b4476707"
activate_feature "825ee6288fb1373eab1b5187ec2f04f6eacb39cb3a97f356a07c91622dd61d16"
activate_feature "c3a6138c5061cf291310887c0b5c71fcaffeab90d5deb50d3b9e687cead45071"
activate_feature "bf61537fd21c61a60e542a5d66c3f6a78da0589336868307f94a82bccea84e88"
activate_feature "5443fcf88330c586bc0e5f3dee10e7f63c76c00249c87fe4fbf7f38c082006b4"
activate_feature "4e7bf348da00a945489b2a681749eb56f5de00b900014e137ddae39f48f69d67"
activate_feature "f0af56d2c5a48d60a4a5b5c903edfb7db3a736a94ed589d0b797df33ff9d3e1d"
activate_feature "2652f5f96006294109b3dd0bbde63693f55324af452b799ee137a81a905eed25"
Expand All @@ -209,33 +189,31 @@ activate_feature "e0fb64b1085cc5538970158d05a009c24e276fb94e1a0bf6a528b48fbc4ff5
activate_feature "ef43112c6543b88db2283a2e077278c315ae2c84719a8b25f25cc88565fbea99"
activate_feature "4a90c00d55454dc5b059055ca213579c6ea856967712a56017487886a4d4cc0f"
activate_feature "1a99a59d87e06e09ec5b028a9cbb7749b4a5ad8819004365d02dc4379a8b7241"
if [ $EOSBRANCH = "develop" ]; then
if [ $EOSBRANCH = "release_2.2.x" ] || [ $EOSBRANCH = "develop" ]; then
activate_feature "808c49387292c34ccb3970e00b08a690b6b3370c1cbcec46d46c19d5dfafab03"
fi

if [ $EOSBRANCH = "release_2.1.x" ] || [ $EOSBRANCH = "develop" ]; then
sleep 1s
setabi eosio $CONTRACTS_DIR/eosio.bios/eosio.bios.abi
setcode eosio $CONTRACTS_DIR/eosio.bios/eosio.bios.wasm
sleep 1s
setabi eosio $CONTRACTS_DIR/eosio.bios/eosio.bios.abi
setcode eosio $CONTRACTS_DIR/eosio.bios/eosio.bios.wasm

sleep 1s
cleos push action eosio setkvparams '[{"max_key_size":1024, "max_value_size":4096, "max_iterators":1024}]' -p eosio@active
cleos push action eosio setpparams '["01110000400100000000"]' -p eosio@active
sleep 1s
cleos push action eosio setkvparams '[{"max_key_size":1024, "max_value_size":4096, "max_iterators":1024}]' -p eosio@active
cleos push action eosio setpparams '["01110000400100000000"]' -p eosio@active

sleep 1s
setabi todo $CONTRACTS_DIR/kv_todo/kv_todo.abi
setcode todo $CONTRACTS_DIR/kv_todo/kv_todo.wasm
sleep 1s
setabi todo $CONTRACTS_DIR/kv_todo/kv_todo.abi
setcode todo $CONTRACTS_DIR/kv_todo/kv_todo.wasm

sleep 1s
setabi returnvalue $CONTRACTS_DIR/action_return_value/action_return_value.abi
setcode returnvalue $CONTRACTS_DIR/action_return_value/action_return_value.wasm
fi
sleep 1s
setabi returnvalue $CONTRACTS_DIR/action_return_value/action_return_value.abi
setcode returnvalue $CONTRACTS_DIR/action_return_value/action_return_value.wasm

sleep 1s
setabi cfhello $CONTRACTS_DIR/cfhello/cfhello.abi
setcode cfhello $CONTRACTS_DIR/cfhello/cfhello.wasm

if [ $EOSBRANCH = "develop" ]; then
if [ $EOSBRANCH = "release_2.2.x" ] || [ $EOSBRANCH = "develop" ]; then
sleep 1s
setabi readonly $CONTRACTS_DIR/read_only_query_tests/read_only_query_tests.abi
setcode readonly $CONTRACTS_DIR/read_only_query_tests/read_only_query_tests.wasm
Expand Down Expand Up @@ -270,13 +248,11 @@ cleos push action eosio.token transfer '["eosio", "alice", "1000.0000 SYS", "mem
cleos push action eosio.token transfer '["eosio", "bobr1", "1000.0000 SYS", "memo"]' -p eosio
cleos push action eosio.token transfer '["eosio", "alicer1", "1000.0000 SYS", "memo"]' -p eosio

if [ $EOSBRANCH = "release_2.1.x" ] || [ $EOSBRANCH = "develop" ]; then
cleos push action todo upsert '["bf581bee-9f2c-447b-94ad-78e4984b6f51", "todo", "Write Hello World Contract", false]' -p todo@active
cleos push action todo upsert '["b7b0d09d-a82b-44d9-b067-3bae2d02917e", "todo", "Start Blockchain", false]' -p todo@active
cleos push action todo upsert '["ac8acfe7-cd4e-4d22-8400-218b697a4517", "todo", "Deploy Hello World Contract", false]' -p todo@active
fi
cleos push action todo upsert '["bf581bee-9f2c-447b-94ad-78e4984b6f51", "todo", "Write Hello World Contract", false]' -p todo@active
cleos push action todo upsert '["b7b0d09d-a82b-44d9-b067-3bae2d02917e", "todo", "Start Blockchain", false]' -p todo@active
cleos push action todo upsert '["ac8acfe7-cd4e-4d22-8400-218b697a4517", "todo", "Deploy Hello World Contract", false]' -p todo@active

if [ $EOSBRANCH = "develop" ]; then
if [ $EOSBRANCH = "release_2.2.x" ] || [ $EOSBRANCH = "develop" ]; then
cleos push action readonly setup '[]' -p readonly@active
fi

Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
workflow_dispatch:

jobs:
build-docker-2_0_x:
name: Build Docker - nodeos release/2.0.x
build-docker-2_1_x:
name: Build Docker - nodeos release/2.1.x
runs-on: ubuntu-18.04
steps:
- name: Checkout
Expand All @@ -18,7 +18,7 @@ jobs:
uses: actions/github-script@v3
with:
script: |
const nodeosVersion = 'v2.0.';
const nodeosVersion = 'v2.1.';
const releaseList = await github.paginate('GET /repos/eosio/eos/releases');
const releases = releaseList.map(release => {
return {
Expand Down Expand Up @@ -56,13 +56,13 @@ jobs:
push: true
no-cache: true
build-args: |
EOSBRANCH=release_2.0.x
CDTBRANCH=release_1.7.x
EOSBRANCH=release_2.1.x
CDTBRANCH=release_1.8.x
tags: |
eosio/eosjs-ci:release_2.0.x
eosio/eosjs-ci:release_2.1.x
eosio/eosjs-ci:${{ steps.nodeos-sha.outputs.NODEOS_SHA }}
build-docker-2_1_x:
name: Build Docker - nodeos release/2.1.x
build-docker-2_2_x:
name: Build Docker - nodeos release/2.2.x
runs-on: ubuntu-18.04
steps:
- name: Checkout
Expand All @@ -74,7 +74,7 @@ jobs:
uses: actions/github-script@v3
with:
script: |
const nodeosVersion = 'v2.1.';
const nodeosVersion = 'v2.2.';
const releaseList = await github.paginate('GET /repos/eosio/eos/releases');
const releases = releaseList.map(release => {
return {
Expand Down Expand Up @@ -112,10 +112,10 @@ jobs:
push: true
no-cache: true
build-args: |
EOSBRANCH=release_2.1.x
EOSBRANCH=release_2.2.x
CDTBRANCH=release_1.8.x
tags: |
eosio/eosjs-ci:release_2.1.x
eosio/eosjs-ci:release_2.2.x
eosio/eosjs-ci:${{ steps.nodeos-sha.outputs.NODEOS_SHA }}
build-docker-develop:
name: Build Docker - nodeos develop
Expand All @@ -130,9 +130,7 @@ jobs:
uses: actions/github-script@v3
with:
script: |
const nodeosVersion = 'v2.1.';
const developRef = await github.request('GET /repos/eosio/eos/git/refs/heads/develop');
console.log(developRef);
return developRef.data.object.sha;
- name: Nodeos sha
id: nodeos-sha
Expand Down

0 comments on commit ea34fb9

Please sign in to comment.