Skip to content
This repository was archived by the owner on May 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
2d597fc
Merkle Mountain Range pallet improvements (#7891)
tomusdrw Jan 28, 2021
64df2f9
Introduce a `Slot` type (#7997)
bkchr Jan 28, 2021
68d7157
Clarify and expand ProvideInherent docs (#7941)
JoshOrndorff Jan 28, 2021
ae3dabb
Introduce sc_peerset::DropReason (#7996)
tomaka Jan 29, 2021
a51a988
Doc fixes for sc-telemetry & API struct rename (#7934)
cecton Jan 29, 2021
1d5d13a
Fix telemetry span not entering properly & enter span in sc-cli (#7951)
cecton Jan 29, 2021
93b231e
Update parity-scale-codec to 2.0 (#7994)
gui1117 Jan 29, 2021
caff191
Test is_inherent_required (#8002)
4meta5 Jan 29, 2021
9659509
Sync: Fix issue of not freeing a block announcement slot (#8006)
bkchr Jan 29, 2021
a45e3f2
CI: return flaming fir deployment (#8007)
TriplEight Jan 29, 2021
30ec0be
chore: fix typos (#8013)
yjhmelody Feb 1, 2021
017a9a0
Fix tracing spans are not being forwarded to spawned task (#8009)
bkchr Feb 1, 2021
043cb0a
make AllModules public (#8017)
apopiak Feb 1, 2021
5a5f06e
client/network: Use request response for light client requests (#7895)
mxinden Feb 1, 2021
b7fc46d
relax translate closure to FnMut (#8019)
apopiak Feb 1, 2021
26f3d68
Remove outdated Grafana information (#8012)
tomaka Feb 1, 2021
b201d7c
contracts: Emit event on contract termination (#8014)
athei Feb 2, 2021
7cb5eed
Fix tracing tests (#8022)
bkchr Feb 2, 2021
aaf6598
contracts: Improve documentation (#8018)
athei Feb 2, 2021
d5b0856
Disable Kademlia random walk when --reserved-nodes is passed (#7999)
tomaka Feb 2, 2021
81ca765
Convert AURA to new pallet macro (#8020)
bkchr Feb 2, 2021
bc69520
Rename system_networkState to system_unstable_networkState (#8001)
tomaka Feb 2, 2021
075796f
Decouple the session validators from im-online (#7127)
liuchengxu Feb 2, 2021
c7f52d1
better formatting for doc comments (#8030)
JoshOrndorff Feb 2, 2021
5a94966
Add a send_request function to NetworkService (#8008)
eskimor Feb 2, 2021
56c64cf
Storage chains: serve transactions over IPFS/bitswap (#7963)
arkpar Feb 3, 2021
9d7b884
Improve log line (#8032)
tomaka Feb 3, 2021
2fb4534
Export `IfDisconnected` in public module. (#8034)
eskimor Feb 3, 2021
9b40d50
frame-system: Index type 'MaybeSerializeDeserialize' bound. (#8035)
shaunxw Feb 3, 2021
f80d23b
contracts: Make ChainExtension trait generic over the runtime (#8003)
athei Feb 3, 2021
840478a
AURA: Switch to `CurrentSlot` instead of `LastTimestamp` (#8023)
bkchr Feb 3, 2021
dc02c65
contracts: Charge rent for code storage (#7935)
athei Feb 4, 2021
169b16f
Migrate assets pallet to new macros (#7984)
dvdplm Feb 4, 2021
85c479f
babe, grandpa: cleanup stale equivocation reports (#8041)
andresilva Feb 4, 2021
05eb8d9
move some pallet test to use construct_runtime (#8049)
gui1117 Feb 4, 2021
6105169
Migrate more pallet tests to construct_runtime (#8051)
ascjones Feb 4, 2021
a675f9a
Update dependencies ahead of next release (#8015)
gnunicorn Feb 4, 2021
3c9b031
transaction-pool: drop unpropagable txs if local node cant author blo…
andresilva Feb 4, 2021
cc71cca
Fix some problems with `prove_warp_sync` (#8037)
expenses Feb 5, 2021
09ba69f
CheckSpecVersion reference fix (#8056)
al3mart Feb 5, 2021
f14488d
contracts: Remove ConfigCache (#8047)
athei Feb 5, 2021
26e9a11
Extend SS58 network identifiers (#8039)
gavofyork Feb 6, 2021
0b719f8
Use construct_runtime in tests (#8059)
gui1117 Feb 6, 2021
bbc7b0e
Bump wasmtime from 0.19.0 to 0.22.0 (#7865)
dependabot[bot] Feb 8, 2021
29aca98
Remove backwards-compatibility networking hack (#8068)
tomaka Feb 8, 2021
07a5f29
Switch to latest `impl-trait-for-tuples` (#8082)
bkchr Feb 9, 2021
66cfa92
Add Crust Network SS58 Address (#8064)
badkk Feb 9, 2021
077c480
Add Ares SS58 address type (#8061)
jiyilanzhou Feb 9, 2021
273bc7b
Replace last usages of `<() as PalletInfo>` in substrate (#8080)
gui1117 Feb 9, 2021
4777aba
Remove PalletInfo impl for () (#8090)
ascjones Feb 9, 2021
48e9d49
WasmExecutor takes a cache directory (#8057)
pepyakin Feb 9, 2021
9c5da5c
Add Aventus ss58 address (#8050)
nahuseyoum Feb 9, 2021
28b950e
sc-network: switch on default features for libp2p on non-wasm-builds …
gnunicorn Feb 10, 2021
91a7418
pallet macro: easier syntax for `#[pallet::pallet]` with `struct Pall…
gui1117 Feb 10, 2021
90c9706
Pallet attribute macro migrate guidelines minor fixes (#8094)
shaunxw Feb 10, 2021
90bb153
Switch to use `diener patch` for companion build (#8073)
bkchr Feb 10, 2021
22441aa
Migrate pallet-balances to pallet attribute macro (#7936)
ascjones Feb 10, 2021
ce018b8
babe, grandpa: set longevity for equivocation report transactions (#8…
andresilva Feb 10, 2021
ba290e0
Migrate pallet-timestamp to pallet attribute macro. (#8078)
shaunxw Feb 10, 2021
12562bb
Use log level error to report telemetry (#8097)
cecton Feb 10, 2021
49a4103
Releasing 3.0 (#8098)
gnunicorn Feb 10, 2021
3957f43
[CI] Move check_labels to github actions (#8099)
s3krit Feb 11, 2021
27c03f2
Update sc-finality-grandp-warp-sync to 0.9.0 and remove 'publish = fa…
expenses Feb 12, 2021
4e50238
Remove all code related to sentry nodes (#8079)
tomaka Feb 15, 2021
386914e
Add code blocks to doc diagrams (#8118)
shawntabrizi Feb 15, 2021
13b6998
Simplify runtime api error handling (#8114)
bkchr Feb 15, 2021
171ad23
CI: temp. allow cargo deny to fail (#8122)
TriplEight Feb 15, 2021
da6b3e2
Update Grafana dashboards (#8127)
tomaka Feb 15, 2021
e03ca38
grandpa: make the VotingRule API async (#8101)
andresilva Feb 15, 2021
d054593
Create a macro which automates creation of benchmark test suites. (#8…
coriolinus Feb 16, 2021
5e8df39
Move dust collection hook to outside of account mutate (#8087)
gavofyork Feb 16, 2021
fb1b15c
fix deprecated usage of panic (#8134)
gui1117 Feb 16, 2021
7d2de01
Remove inherent in pallet-babe (#8124)
gui1117 Feb 16, 2021
743accb
Fix telemetry span not entering properly attempt 3 (#8043)
cecton Feb 17, 2021
cd11670
Unbreak browser test CI (#8149)
tomaka Feb 18, 2021
75a2d29
Benchmark macro: Allow multiple bounds in where (#8116)
weichweich Feb 18, 2021
ca63242
Make it clear in CLI that paritydb is experimental (#8152)
bkchr Feb 18, 2021
2c99434
Extract transactions handling from protocol.rs (#8110)
tomaka Feb 18, 2021
f53d72f
Remove `OnSlot` associated type (#8156)
bkchr Feb 18, 2021
1c842c4
Fix warning in rustdoc job (#8159)
bkchr Feb 19, 2021
9029ab0
CI: test and update ci image, codeowners (#8142)
TriplEight Feb 19, 2021
394c52e
Migration testing runtime API/Bot (#8038)
kianenigma Feb 19, 2021
3c1c49e
Ensure we spawn the block import worker as an essential task (#8155)
bkchr Feb 19, 2021
e808d14
Update to libp2p-0.35.1 (#8141)
romanb Feb 22, 2021
824adac
contracts: Consider contract size in weights (#8086)
athei Feb 22, 2021
11e879f
Allow `transfer_keep_alive` to transfer all free balance (#8125)
gui1117 Feb 22, 2021
fd88fbf
Migrate examples to use pallet macro (#8138)
gui1117 Feb 22, 2021
5949485
Make keystore return `None` when a key doesn't exist (#8163)
bkchr Feb 22, 2021
4f9ee57
contracts: Convert to framev2 macros (#8157)
athei Feb 22, 2021
061ff5d
Fix: stash account reaped when ledger.active == ED (#8170)
gui1117 Feb 22, 2021
2237564
Bump thread_local (#8174)
arkpar Feb 22, 2021
528c14b
Return number of keys removed when calling `storage_kill` on child tr…
shawntabrizi Feb 22, 2021
904495b
Make Regex in ss58codec and secret phrase crypto static (#8117) (#8177)
anvie Feb 22, 2021
e6ac7e7
Add a Prometheus alert on no incoming connection (#7517)
tomaka Feb 23, 2021
27e1f89
Bump lru dependency (#8182)
tomaka Feb 23, 2021
1c434cd
Decouple Staking and Election - Part 2 Unsigned Phase (#7909)
kianenigma Feb 23, 2021
ad8c585
Remove suicide from frame_system weights (#8184)
s3krit Feb 23, 2021
c736c60
Reserve ss58 prefix 48 for Neatcoin (#8165)
sorpaas Feb 23, 2021
8643b9d
Make `on_slot` return the block with the post header (#8188)
bkchr Feb 24, 2021
6bd9aad
[multisig, insubstantial] WeightTooLow -> MaxWeightTooLow (#8112)
Feb 24, 2021
1db5108
Update lib.rs (#8192)
kianenigma Feb 24, 2021
61b1eb8
Fix transactions not being propagated to authorities (#8212)
tomaka Feb 26, 2021
76ce4dc
Merge remote-tracking branch 'upstream/polkadot-v0.8.29' into feature…
MRamanenkau Sep 7, 2022
177de33
Fixes after merge
MRamanenkau Sep 7, 2022
6703bd9
Use actual ddc-pallet
MRamanenkau Sep 7, 2022
e86ec81
Update ddc-pallet
MRamanenkau Sep 7, 2022
4bd527a
Update codec versions
MRamanenkau Sep 7, 2022
46870a5
Fix issue with getrandom
MRamanenkau Sep 7, 2022
f9e76d5
Add PalletInfo implementation
MRamanenkau Sep 8, 2022
45487ea
Fix ddc-metrics-offchain-worker
MRamanenkau Sep 8, 2022
f015dc8
Add PalletInfo implementation in erc721
MRamanenkau Sep 8, 2022
92cfcc4
Fix remining issues with tests
MRamanenkau Sep 8, 2022
2e17c3f
Fix path to binary
MRamanenkau Sep 8, 2022
d31bd2a
Update ddc pallet
MRamanenkau Sep 9, 2022
ad98d51
Fix bridge tests
MRamanenkau Sep 9, 2022
4224d54
Use constract_runtime! in ddc-metrics-offchain-worker
MRamanenkau Sep 9, 2022
86e82fd
Fix PalletInfo in erc721
MRamanenkau Sep 9, 2022
6b09ce6
Update ddc-pallet
MRamanenkau Sep 9, 2022
b1cd98a
Adjust max wasm code size
MRamanenkau Sep 10, 2022
38c9954
Update MaxCodeSize
MRamanenkau Sep 12, 2022
c903063
Add release notes
MRamanenkau Sep 12, 2022
a1040cb
Remove old commented code
MRamanenkau Sep 13, 2022
dbf947c
Merge branch 'feature/update-to-polkadot-v0-8-28' into feature/update…
MRamanenkau Nov 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .github/workflows/check-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check labels

on:
pull_request:
types: [labeled, opened, synchronize, unlabeled]

jobs:
check-labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check labels
run: bash ${{ github.workspace }}/.maintain/github/check_labels.sh
env:
GITHUB_PR: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ rls*.log
frame/ddc-metrics-offchain-worker/src/tests/test_data/ddc.wasm
frame/ddc-metrics-offchain-worker/src/tests/test_data/metadata.json
.cargo-remote.toml
*.bin
169 changes: 59 additions & 110 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ variables: &default-vars
CARGO_INCREMENTAL: 0
DOCKER_OS: "debian:stretch"
ARCH: "x86_64"
CI_IMAGE: "paritytech/ci-linux:production"
# FIXME set to release
CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.11"
CARGO_UNLEASH_PKG_DEF: "--skip node node-* pallet-template pallet-example pallet-example-* subkey chain-spec-builder"
Expand All @@ -60,7 +61,7 @@ default:
interruptible: true

.docker-env: &docker-env
image: paritytech/ci-linux:production
image: "${CI_IMAGE}"
before_script:
- rustup show
- cargo --version
Expand All @@ -84,9 +85,36 @@ default:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1

.test-refs-no-trigger: &test-refs-no-trigger
rules:
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME == "tags"
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1

.build-refs: &build-refs
rules:
# .publish-refs with manual on PRs
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME == "tags"
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
when: manual
allow_failure: true

.publish-refs: &publish-refs
rules:
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME == "tags"
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
Expand Down Expand Up @@ -145,6 +173,8 @@ test-dependency-rules:
stage: check
image: paritytech/tools:latest
<<: *kubernetes-build
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
script:
- .maintain/ensure-deps.sh

Expand All @@ -153,36 +183,28 @@ test-prometheus-alerting-rules:
image: paritytech/tools:latest
<<: *kubernetes-build
rules:
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
- if: $CI_COMMIT_BRANCH
changes:
- .gitlab-ci.yml
- .maintain/monitoring/**/*
script:
- promtool check rules .maintain/monitoring/alerting-rules/alerting-rules.yaml
- cat .maintain/monitoring/alerting-rules/alerting-rules.yaml | promtool test rules .maintain/monitoring/alerting-rules/alerting-rule-tests.yaml
- cat .maintain/monitoring/alerting-rules/alerting-rules.yaml |
promtool test rules .maintain/monitoring/alerting-rules/alerting-rule-tests.yaml

#### stage: test

cargo-audit:
stage: test
<<: *docker-env
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
when: never
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
script:
- cargo audit
allow_failure: true

cargo-deny:
stage: test
<<: *docker-env
rules:
- if: $CI_COMMIT_MESSAGE =~ /skip-checks/
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
- changes:
- "Cargo.lock"
- "**/Cargo.toml"
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
Expand All @@ -199,11 +221,13 @@ cargo-deny:
when: always
paths:
- deny.log
# FIXME: Temorarily allow to fail.
allow_failure: true

cargo-check-benches:
stage: test
<<: *docker-env
<<: *test-refs
<<: *test-refs-no-trigger
script:
- SKIP_WASM_BUILD=1 time cargo +nightly check --benches --all
- cargo run --release -p node-bench -- ::node::import::native::sr25519::transfer_keep_alive::paritydb::small
Expand Down Expand Up @@ -260,9 +284,8 @@ unleash-check:
stage: test
<<: *docker-env
rules:
- if: $CI_COMMIT_MESSAGE =~ /skip-checks/
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
# .test-refs
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME == "tags"
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
Expand All @@ -279,7 +302,7 @@ test-frame-examples-compile-to-wasm:
<<: *default-vars
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: -Cdebug-assertions=y
RUSTFLAGS: "-Cdebug-assertions=y"
RUST_BACKTRACE: 1
script:
- cd frame/example-offchain-worker/
Expand Down Expand Up @@ -331,7 +354,7 @@ test-full-crypto-feature:
<<: *default-vars
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: -Cdebug-assertions=y
RUSTFLAGS: "-Cdebug-assertions=y"
RUST_BACKTRACE: 1
script:
- cd primitives/core/
Expand All @@ -344,7 +367,7 @@ cargo-check-macos:
stage: test
# shell runner on mac ignores the image set in *docker-env
<<: *docker-env
<<: *test-refs
<<: *test-refs-no-trigger
script:
- SKIP_WASM_BUILD=1 time cargo check --release
- sccache -s
Expand All @@ -365,7 +388,7 @@ check-polkadot-companion-status:
check-polkadot-companion-build:
stage: build
<<: *docker-env
<<: *test-refs
<<: *test-refs-no-trigger
needs:
- job: test-linux-stable-int
artifacts: false
Expand Down Expand Up @@ -394,15 +417,7 @@ build-linux-substrate: &build-binary
stage: build
<<: *collect-artifacts
<<: *docker-env
rules:
# .build-refs with manual on PRs
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME == "tags"
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
when: manual
allow_failure: true
<<: *build-refs
needs:
- job: test-linux-stable
artifacts: false
Expand All @@ -429,15 +444,7 @@ build-linux-subkey: &build-subkey
stage: build
<<: *collect-artifacts
<<: *docker-env
rules:
# .build-refs with manual on PRs
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME == "tags"
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
when: manual
allow_failure: true
<<: *build-refs
needs:
- job: cargo-check-subkey
artifacts: false
Expand All @@ -461,34 +468,10 @@ build-macos-subkey:
tags:
- osx

build-rust-doc:
stage: build
<<: *docker-env
<<: *test-refs
needs:
- job: test-linux-stable
artifacts: false
variables:
<<: *default-vars
RUSTFLAGS: -Dwarnings
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc"
when: on_success
expire_in: 7 days
paths:
- ./crate-docs/
script:
- rm -f ./crate-docs/index.html # use it as an indicator if the job succeeds
- SKIP_WASM_BUILD=1 RUSTDOCFLAGS="--html-in-header $(pwd)/.maintain/rustdoc-header.html"
time cargo +nightly doc --no-deps --workspace --all-features --verbose
- mv ./target/doc ./crate-docs
- echo "<meta http-equiv=refresh content=0;url=sc_service/index.html>" > ./crate-docs/index.html
- sccache -s

#### stage: publish

.build-push-docker-image: &build-push-docker-image
<<: *build-refs
<<: *publish-refs
<<: *kubernetes-build
image: quay.io/buildah/stable
variables: &docker-build-vars
Expand Down Expand Up @@ -521,17 +504,19 @@ build-rust-doc:
publish-docker-substrate:
stage: publish
<<: *build-push-docker-image
# collect VERSION artifact here to pass it on to kubernetes
<<: *collect-artifacts
needs:
- job: build-linux-substrate
artifacts: true
variables:
<<: *docker-build-vars
PRODUCT: substrate
after_script:
# only VERSION information is needed for the deployment
- find ./artifacts/ -depth -not -name VERSION -type f -delete
- echo "VERSION=${VERSION}" >> build.env
artifacts:
reports:
# this artifact is used in trigger-simnet job
# https://docs.gitlab.com/ee/ci/multi_project_pipelines.html#with-variable-inheritance
dotenv: artifacts/substrate/build.env

publish-docker-subkey:
stage: publish
Expand All @@ -545,7 +530,7 @@ publish-docker-subkey:

publish-s3-release:
stage: publish
<<: *build-refs
<<: *publish-refs
<<: *kubernetes-build
needs:
- job: build-linux-substrate
Expand All @@ -565,32 +550,6 @@ publish-s3-release:
- aws s3 ls s3://${BUCKET}/${PREFIX}/latest/
--recursive --human-readable --summarize

publish-s3-doc:
stage: publish
image: paritytech/awscli:latest
allow_failure: true
needs:
- job: build-rust-doc
artifacts: true
- job: build-linux-substrate
artifacts: false
<<: *build-refs
<<: *kubernetes-build
variables:
GIT_STRATEGY: none
BUCKET: "releases.parity.io"
PREFIX: "substrate-rustdoc"
script:
- test -r ./crate-docs/index.html || (
echo "./crate-docs/index.html not present, build:rust:doc:release job not complete";
exit 1
)
- aws s3 sync --delete --size-only --only-show-errors
./crate-docs/ s3://${BUCKET}/${PREFIX}/
after_script:
- aws s3 ls s3://${BUCKET}/${PREFIX}/
--human-readable --summarize

publish-draft-release:
stage: publish
image: paritytech/tools:latest
Expand Down Expand Up @@ -635,6 +594,8 @@ deploy-prometheus-alerting-rules:
- kubectl -n ${NAMESPACE} patch prometheusrule ${PROMETHEUSRULE}
--type=merge --patch "$(sed 's/^/ /;1s/^/spec:\n/' ${RULES})"
rules:
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
- if: $CI_COMMIT_REF_NAME == "master"
changes:
- .gitlab-ci.yml
Expand All @@ -647,19 +608,7 @@ trigger-simnet:
- if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly"
needs:
- job: publish-docker-substrate
artifacts: false
trigger:
project: parity/simnet
branch: master
strategy: depend

#### stage: .post

check-labels:
stage: .post
image: paritytech/tools:latest
<<: *kubernetes-build
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
script:
- ./.maintain/gitlab/check_labels.sh
12 changes: 9 additions & 3 deletions .maintain/gitlab/lib.sh → .maintain/common/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,17 @@ has_label(){
repo="$1"
pr_id="$2"
label="$3"

# These will exist if the function is called in Gitlab.
# If the function's called in Github, we should have GITHUB_ACCESS_TOKEN set
# already.
if [ -n "$GITHUB_RELEASE_TOKEN" ]; then
out=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$api_base/$repo/pulls/$pr_id")
else
out=$(curl -H "Authorization: token $GITHUB_PR_TOKEN" -s "$api_base/$repo/pulls/$pr_id")
GITHUB_TOKEN="$GITHUB_RELEASE_TOKEN"
elif [ -n "$GITHUB_PR_TOKEN" ]; then
GITHUB_TOKEN="$GITHUB_PR_TOKEN"
fi

out=$(curl -H "Authorization: token $GITHUB_TOKEN" -s "$api_base/$repo/pulls/$pr_id")
[ -n "$(echo "$out" | tr -d '\r\n' | jq ".labels | .[] | select(.name==\"$label\")")" ]
}

Expand Down
Loading