From a1fbfb30bc38915c7e74e8843301d212f43fba33 Mon Sep 17 00:00:00 2001 From: Bradley Hart Date: Mon, 12 Jul 2021 12:30:13 -0400 Subject: [PATCH] Updating default branch with new ci/cd and dependabot settings --- .github/dependabot.yml | 4 +- .github/eosjs-ci/Dockerfile | 37 ++-------- .github/eosjs-ci/scripts/deploy_contracts.sh | 78 +++++++------------- .github/workflows/build-docker-images.yml | 24 +++--- 4 files changed, 48 insertions(+), 95 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 02802948a..9d7b90d77 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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" diff --git a/.github/eosjs-ci/Dockerfile b/.github/eosjs-ci/Dockerfile index c04e22d12..a2bcf73ad 100644 --- a/.github/eosjs-ci/Dockerfile +++ b/.github/eosjs-ci/Dockerfile @@ -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 diff --git a/.github/eosjs-ci/scripts/deploy_contracts.sh b/.github/eosjs-ci/scripts/deploy_contracts.sh index 38d3264de..3fdeef8bc 100644 --- a/.github/eosjs-ci/scripts/deploy_contracts.sh +++ b/.github/eosjs-ci/scripts/deploy_contracts.sh @@ -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" @@ -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 @@ -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 diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index ab9629630..63debd717 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -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 @@ -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 { @@ -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 @@ -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 { @@ -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 @@ -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