mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
Convince GitLab not to crop collapsed multiline strings (#3971)
Use of `- >` instead of `- |` workarounds GitLab quirk when it crops collapsed multiline `script:` section commands in its CI job logs. This PR also fixes `- |` based `script:` steps to behave properly after `- >` conversion. Resolves https://github.com/paritytech/ci_cd/issues/972.
This commit is contained in:
committed by
GitHub
parent
3836376965
commit
ebdca15c19
+3
-3
@@ -125,10 +125,10 @@ default:
|
|||||||
- cp $FL_FORKLIFT_CONFIG ~/.forklift/config.toml
|
- cp $FL_FORKLIFT_CONFIG ~/.forklift/config.toml
|
||||||
- shopt -s expand_aliases
|
- shopt -s expand_aliases
|
||||||
- export PATH=$PATH:$(pwd)
|
- export PATH=$PATH:$(pwd)
|
||||||
- |
|
- >
|
||||||
if [ "$FORKLIFT_BYPASS" != "true" ]; then
|
if [ "$FORKLIFT_BYPASS" != "true" ]; then
|
||||||
echo "FORKLIFT_BYPASS not set, creating alias cargo='forklift cargo'"
|
echo "FORKLIFT_BYPASS not set, creating alias cargo='forklift cargo'";
|
||||||
alias cargo="forklift cargo"
|
alias cargo="forklift cargo";
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
- echo "FL_FORKLIFT_VERSION ${FL_FORKLIFT_VERSION}"
|
- echo "FL_FORKLIFT_VERSION ${FL_FORKLIFT_VERSION}"
|
||||||
|
|||||||
+14
-14
@@ -105,26 +105,26 @@ build-rustdoc:
|
|||||||
- mv ./target/doc ./crate-docs
|
- mv ./target/doc ./crate-docs
|
||||||
# Inject Simple Analytics (https://www.simpleanalytics.com/) privacy preserving tracker into
|
# Inject Simple Analytics (https://www.simpleanalytics.com/) privacy preserving tracker into
|
||||||
# all .html files
|
# all .html files
|
||||||
- |
|
- >
|
||||||
inject_simple_analytics() {
|
inject_simple_analytics() {
|
||||||
local path="$1"
|
local path="$1";
|
||||||
local script_content="<script async defer src=\"https://apisa.parity.io/latest.js\"></script><noscript><img src=\"https://apisa.parity.io/latest.js\" alt=\"\" referrerpolicy=\"no-referrer-when-downgrade\" /></noscript>"
|
local script_content="<script async defer src=\"https://apisa.parity.io/latest.js\"></script><noscript><img src=\"https://apisa.parity.io/latest.js\" alt=\"\" referrerpolicy=\"no-referrer-when-downgrade\" /></noscript>";
|
||||||
|
|
||||||
# Function that inject script into the head of an html file using sed.
|
# Function that inject script into the head of an html file using sed.
|
||||||
process_file() {
|
process_file() {
|
||||||
local file="$1"
|
local file="$1";
|
||||||
echo "Adding Simple Analytics script to $file"
|
echo "Adding Simple Analytics script to $file";
|
||||||
sed -i "s|</head>|$script_content</head>|" "$file"
|
sed -i "s|</head>|$script_content</head>|" "$file";
|
||||||
}
|
};
|
||||||
export -f process_file
|
export -f process_file;
|
||||||
# xargs runs process_file in seperate shells without access to outer variables.
|
# xargs runs process_file in separate shells without access to outer variables.
|
||||||
# to make script_content available inside process_file, export it as an env var here.
|
# make script_content available inside process_file, export it as an env var here.
|
||||||
export script_content
|
export script_content;
|
||||||
|
|
||||||
# Modify .html files in parallel using xargs, otherwise it can take a long time.
|
# Modify .html files in parallel using xargs, otherwise it can take a long time.
|
||||||
find "$path" -name '*.html' | xargs -I {} -P "$(nproc)" bash -c 'process_file "$@"' _ {}
|
find "$path" -name '*.html' | xargs -I {} -P "$(nproc)" bash -c 'process_file "$@"' _ {};
|
||||||
}
|
};
|
||||||
inject_simple_analytics "./crate-docs"
|
inject_simple_analytics "./crate-docs";
|
||||||
- echo "<meta http-equiv=refresh content=0;url=polkadot_sdk_docs/index.html>" > ./crate-docs/index.html
|
- echo "<meta http-equiv=refresh content=0;url=polkadot_sdk_docs/index.html>" > ./crate-docs/index.html
|
||||||
|
|
||||||
build-implementers-guide:
|
build-implementers-guide:
|
||||||
|
|||||||
+13
-16
@@ -104,23 +104,20 @@ check-toml-format:
|
|||||||
- .docker-env
|
- .docker-env
|
||||||
- .test-pr-refs
|
- .test-pr-refs
|
||||||
script:
|
script:
|
||||||
- |
|
- export RUST_LOG=remote-ext=debug,runtime=debug
|
||||||
export RUST_LOG=remote-ext=debug,runtime=debug
|
- echo "---------- Downloading try-runtime CLI ----------"
|
||||||
|
- curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.4/try-runtime-x86_64-unknown-linux-musl -o try-runtime
|
||||||
echo "---------- Downloading try-runtime CLI ----------"
|
- chmod +x ./try-runtime
|
||||||
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.4/try-runtime-x86_64-unknown-linux-musl -o try-runtime
|
- echo "Using try-runtime-cli version:"
|
||||||
chmod +x ./try-runtime
|
- ./try-runtime --version
|
||||||
echo "Using try-runtime-cli version:"
|
- echo "---------- Building ${PACKAGE} runtime ----------"
|
||||||
./try-runtime --version
|
- time cargo build --release --locked -p "$PACKAGE" --features try-runtime
|
||||||
|
- echo "---------- Executing on-runtime-upgrade for ${NETWORK} ----------"
|
||||||
echo "---------- Building ${PACKAGE} runtime ----------"
|
- >
|
||||||
time cargo build --release --locked -p "$PACKAGE" --features try-runtime
|
|
||||||
|
|
||||||
echo "---------- Executing on-runtime-upgrade for ${NETWORK} ----------"
|
|
||||||
time ./try-runtime ${COMMAND_EXTRA_ARGS} \
|
time ./try-runtime ${COMMAND_EXTRA_ARGS} \
|
||||||
--runtime ./target/release/wbuild/"$PACKAGE"/"$WASM" \
|
--runtime ./target/release/wbuild/"$PACKAGE"/"$WASM" \
|
||||||
on-runtime-upgrade --disable-spec-version-check --checks=all ${SUBCOMMAND_EXTRA_ARGS} live --uri ${URI}
|
on-runtime-upgrade --disable-spec-version-check --checks=all ${SUBCOMMAND_EXTRA_ARGS} live --uri ${URI}
|
||||||
sleep 5
|
- sleep 5
|
||||||
|
|
||||||
# Check runtime migrations for Parity managed relay chains
|
# Check runtime migrations for Parity managed relay chains
|
||||||
check-runtime-migration-westend:
|
check-runtime-migration-westend:
|
||||||
|
|||||||
@@ -113,17 +113,17 @@ trigger_workflow:
|
|||||||
artifacts: true
|
artifacts: true
|
||||||
script:
|
script:
|
||||||
- echo "Triggering workflow"
|
- echo "Triggering workflow"
|
||||||
- |
|
- >
|
||||||
for benchmark in $(ls charts/*.json); do
|
for benchmark in $(ls charts/*.json); do
|
||||||
export bencmark_name=$(basename $benchmark)
|
export benchmark_name=$(basename $benchmark);
|
||||||
echo "Benchmark: $bencmark_name"
|
echo "Benchmark: $benchmark_name";
|
||||||
export benchmark_dir=$(echo $bencmark_name | sed 's/\.json//')
|
export benchmark_dir=$(echo $benchmark_name | sed 's/\.json//');
|
||||||
curl -q -X POST \
|
curl -q -X POST \
|
||||||
-H "Accept: application/vnd.github.v3+json" \
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
-H "Authorization: token $GITHUB_TOKEN" \
|
-H "Authorization: token $GITHUB_TOKEN" \
|
||||||
https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/actions/workflows/subsystem-benchmarks.yml/dispatches \
|
https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/actions/workflows/subsystem-benchmarks.yml/dispatches \
|
||||||
-d '{"ref":"refs/heads/master","inputs":{"benchmark-data-dir-path":"'$benchmark_dir'","output-file-path":"'$bencmark_name'"}}'
|
-d "{\"ref\":\"refs/heads/master\",\"inputs\":{\"benchmark-data-dir-path\":\"$benchmark_dir\",\"output-file-path\":\"$benchmark_name\"}}";
|
||||||
sleep 300
|
sleep 300;
|
||||||
done
|
done
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ test-linux-stable:
|
|||||||
- echo "Node index - ${CI_NODE_INDEX}. Total amount - ${CI_NODE_TOTAL}"
|
- echo "Node index - ${CI_NODE_INDEX}. Total amount - ${CI_NODE_TOTAL}"
|
||||||
# add experimental to features after https://github.com/paritytech/substrate/pull/14502 is merged
|
# add experimental to features after https://github.com/paritytech/substrate/pull/14502 is merged
|
||||||
# "upgrade_version_checks_should_work" is currently failing
|
# "upgrade_version_checks_should_work" is currently failing
|
||||||
- |
|
- >
|
||||||
time cargo nextest run \
|
time cargo nextest run \
|
||||||
--workspace \
|
--workspace \
|
||||||
--locked \
|
--locked \
|
||||||
@@ -34,7 +34,7 @@ test-linux-stable:
|
|||||||
# Upload tests results to Elasticsearch
|
# Upload tests results to Elasticsearch
|
||||||
- echo "Upload test results to Elasticsearch"
|
- echo "Upload test results to Elasticsearch"
|
||||||
- cat target/nextest/default/junit.xml | xq . > target/nextest/default/junit.json
|
- cat target/nextest/default/junit.xml | xq . > target/nextest/default/junit.json
|
||||||
- |
|
- >
|
||||||
curl -v -XPOST --http1.1 \
|
curl -v -XPOST --http1.1 \
|
||||||
-u ${ELASTIC_USERNAME}:${ELASTIC_PASSWORD} \
|
-u ${ELASTIC_USERNAME}:${ELASTIC_PASSWORD} \
|
||||||
https://elasticsearch.parity-build.parity.io/unit-tests/_doc/${CI_JOB_ID} \
|
https://elasticsearch.parity-build.parity.io/unit-tests/_doc/${CI_JOB_ID} \
|
||||||
@@ -87,7 +87,7 @@ test-linux-stable-runtime-benchmarks:
|
|||||||
# script:
|
# script:
|
||||||
# # Build all but only execute 'runtime' tests.
|
# # Build all but only execute 'runtime' tests.
|
||||||
# - echo "Node index - ${CI_NODE_INDEX}. Total amount - ${CI_NODE_TOTAL}"
|
# - echo "Node index - ${CI_NODE_INDEX}. Total amount - ${CI_NODE_TOTAL}"
|
||||||
# - |
|
# - >
|
||||||
# time cargo nextest run \
|
# time cargo nextest run \
|
||||||
# --workspace \
|
# --workspace \
|
||||||
# --locked \
|
# --locked \
|
||||||
|
|||||||
Reference in New Issue
Block a user