Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter v2S
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
acb8ec45
Commit
acb8ec45
authored
4 months ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
fix(
#278
): update client specs when producing a new client
parent
14b9f289
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+11
-3
11 additions, 3 deletions
.gitlab-ci.yml
with
11 additions
and
3 deletions
.gitlab-ci.yml
+
11
−
3
View file @
acb8ec45
...
@@ -24,7 +24,7 @@ workflow:
...
@@ -24,7 +24,7 @@ workflow:
-
Cargo.lock
-
Cargo.lock
.is_network_branch
:
&is_network_branch
.is_network_branch
:
&is_network_branch
if
:
$CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_BRANCH =~ /^(
network
\/).+/
if
:
$CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_BRANCH =~ /^(
278-chain-file
\/).+/
.is_runtime_branch
:
&is_runtime_branch
.is_runtime_branch
:
&is_runtime_branch
if
:
$CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_BRANCH =~ /^(runtime\/).+/
if
:
$CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_BRANCH =~ /^(runtime\/).+/
...
@@ -180,7 +180,7 @@ tests:
...
@@ -180,7 +180,7 @@ tests:
-
cargo cucumber
-
cargo cucumber
.network_branch_vars
:
&define_network_branch_vars
.network_branch_vars
:
&define_network_branch_vars
-
export NETWORK=
$(echo $CI_COMMIT_BRANCH | sed -e "s/network\///g")
-
export NETWORK=
gdev-800
-
echo "NETWORK = $NETWORK"
-
echo "NETWORK = $NETWORK"
-
export RUNTIME=$(echo $NETWORK | grep -Po "gdev|gtest|g1")
-
export RUNTIME=$(echo $NETWORK | grep -Po "gdev|gtest|g1")
-
echo "RUNTIME = $RUNTIME"
-
echo "RUNTIME = $RUNTIME"
...
@@ -438,7 +438,15 @@ build_raw_specs:
...
@@ -438,7 +438,15 @@ build_raw_specs:
-
apt-get update
-
apt-get update
-
apt-get install -y clang cmake protobuf-compiler
-
apt-get install -y clang cmake protobuf-compiler
# Print chainspec to file
# Print chainspec to file
-
cargo xtask print-spec $NETWORK_RELEASE > ${RUNTIME}.json
-
cargo xtask print-spec $NETWORK_RELEASE > ${RUNTIME}-printed.json
# Merge client specs into chainspec file (to update bootnodes for example)
# 1. Download yq to create a json client spec file
-
wget https://github.com/mikefarah/yq/releases/download/v4.44.6/yq_linux_arm64 -O yq
-
chmod +x ./yq
# 2. YML -> JSON for the client specs
-
cat node/specs/${RUNTIME}_client-specs.yaml | ./yq --output-format json > node/specs/${RUNTIME}_client-specs.json
# 3. Merge the client spec file into chainspec file and create the final spec file (e.g. gdev.json)
-
jq -s '.[0] * .[1]' node/specs/${RUNTIME}_client-specs.json ${RUNTIME}-printed.json > ${RUNTIME}.json
# Produce raw spec file
# Produce raw spec file
-
mkdir -p $CI_PROJECT_DIR/release
-
mkdir -p $CI_PROJECT_DIR/release
-
cargo run -Zgit=shallow-deps ${FEATURES} -- build-spec --chain=${RUNTIME}.json --disable-default-bootnode --raw > $RELEASE_FILE_RAW_SPEC
-
cargo run -Zgit=shallow-deps ${FEATURES} -- build-spec --chain=${RUNTIME}.json --disable-default-bootnode --raw > $RELEASE_FILE_RAW_SPEC
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment