git.delta.rocks / unique-network / refs/commits / 56c4087ab1ae

difftreelog

ci relay_chain argument for baedeker

Yaroslav Bolyukin2023-09-03parent: #98753ec.patch.diff
in: master

5 files changed

modified.baedeker/xcm-opal.jsonnetdiffbeforeafterboth
--- a/.baedeker/xcm-opal.jsonnet
+++ b/.baedeker/xcm-opal.jsonnet
@@ -2,12 +2,14 @@
 m = import 'baedeker-library/mixin/spec.libsonnet',
 ;
 
+function(relay_spec)
+
 local relay = {
 	name: 'relay',
 	bin: 'bin/polkadot',
 	validatorIdAssignment: 'staking',
 	spec: {Genesis:{
-		chain: 'westend-local',
+		chain: relay_spec,
 		modify:: m.genericRelay($, hrmp = [
 			[$.parachains.opal.paraId, $.parachains.westmint.paraId, 8, 512],
 			[$.parachains.westmint.paraId, $.parachains.opal.paraId, 8, 512],
modified.baedeker/xcm-quartz.jsonnetdiffbeforeafterboth
--- a/.baedeker/xcm-quartz.jsonnet
+++ b/.baedeker/xcm-quartz.jsonnet
@@ -2,12 +2,14 @@
 m = import 'baedeker-library/mixin/spec.libsonnet',
 ;
 
+function(relay_spec)
+
 local relay = {
 	name: 'relay',
 	bin: 'bin/polkadot',
 	validatorIdAssignment: 'staking',
 	spec: {Genesis:{
-		chain: 'westend-local',
+		chain: relay_spec,
 		modify:: m.genericRelay($, hrmp = std.join([], [
 			[[$.parachains[a].paraId, $.parachains[b].paraId, 8, 512], [$.parachains[b].paraId, $.parachains[a].paraId, 8, 512]],
 			for [a, b] in [
@@ -113,7 +115,6 @@
 		[name]: {
 			bin: $.bin,
 			wantedKeys: 'para',
-			legacyRpc: true,
 		},
 		for name in ['alice', 'bob']
 	},
modified.baedeker/xcm-unique.jsonnetdiffbeforeafterboth
--- a/.baedeker/xcm-unique.jsonnet
+++ b/.baedeker/xcm-unique.jsonnet
@@ -2,12 +2,14 @@
 m = import 'baedeker-library/mixin/spec.libsonnet',
 ;
 
+function(relay_spec)
+
 local relay = {
 	name: 'relay',
 	bin: 'bin/polkadot',
 	validatorIdAssignment: 'staking',
 	spec: {Genesis:{
-		chain: 'westend-local',
+		chain: relay_spec,
 		modify:: m.genericRelay($, hrmp = std.join([], [
 			[[$.parachains[a].paraId, $.parachains[b].paraId, 8, 512], [$.parachains[b].paraId, $.parachains[a].paraId, 8, 512]],
 			for [a, b] in [
modified.github/actions/prepare/action.ymldiffbeforeafterboth
before · .github/actions/prepare/action.yml
1# .github/actions/prepare/action.yml2name: 'Preparation'3description: ''4runs:5  using: "composite"6  steps:7    - name: Setup Environment (PR)  8      if: ${{ github.event_name == 'pull_request' }}  9      shell: bash  10      run: |  11        echo "LAST_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> ${GITHUB_ENV}  12    - name: Setup Environment (Push)  13      if: ${{ github.event_name == 'push' }}  14      shell: bash  15      run: |  16        echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV}17    - name: Set build SHA18      shell: bash19      run: |20        echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV
modified.github/workflows/xcm.ymldiffbeforeafterboth
--- a/.github/workflows/xcm.yml
+++ b/.github/workflows/xcm.yml
@@ -284,25 +284,16 @@
             fi
         shell: bash
 
-
-      - name: Run find-and-replace to remove slashes from branch name
-        uses: mad9000/actions-find-and-replace-string@4
-        id: branchname
-        with:
-          source: ${{ github.head_ref }}
-          find: '/'
-          replace: '-'
-
       - name: Build unique-chain
         run: |
           docker build --file .docker/Dockerfile-unique \
             --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} \
             --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} \
-            --tag uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-${{ env.BUILD_SHA }} \
+            --tag uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }} \
             .
 
       - name: Push docker image version
-        run: docker push uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-${{ env.BUILD_SHA }}
+        run: docker push uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}
 
       - uses: actions/setup-node@v3.5.1
         with:
@@ -320,10 +311,12 @@
         with:
           jpath: |
             .baedeker/vendor
+          tla-str: |
+            relay_spec=rococo
           inputs: |
             .baedeker/xcm-${{ matrix.network }}.jsonnet
             snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}'}})
-            snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-${{ env.BUILD_SHA }}'}})
+            snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}'}})
             snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/acala':{dockerImage:'uniquenetwork/builder-acala:${{ matrix.acala_version }}'}})
             snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/moonbeam':{dockerImage:'uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }}'}})
             snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/cumulus':{dockerImage:'uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }}'}})