Skip to content

Commit 7794a30

Browse files
abbesBenayacheiexec-release-please-app[bot]cursoragent
authored
feat: feat(deployment): add TDX app deployment pipeline for Arbitrum (#246)
* feat: feat(deployment): add TDX app deployment pipeline for Arbitrum * fix: prepare migration to TDX (#247) chore(deps): upgrade iexec package to v8.23.0 * fix(ci): downgrade GitHub Actions runner to ubuntu-22.04 for Scone compatibility * fix(ci): upgrade GitHub Actions runner to ubuntu-latest * fix(deploy): add missing checksum for docker app deployment * fix: prepare migration to TDX (#247) chore(deps): upgrade iexec package to v8.23.0 * chore(main): release web3mail 1.7.4 (#248) Co-authored-by: iexec-release-please-app[bot] <202620906+iexec-release-please-app[bot]@users.noreply.github.com> * feat(dapp): upgrade iexec version to 8.23.0 * fix(ci): disable Trivy security scan in dapp-deploy workflow * refactor: use TEE_FRAMEWORK as var --------- Co-authored-by: iexec-release-please-app[bot] <202620906+iexec-release-please-app[bot]@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 33af547 commit 7794a30

11 files changed

Lines changed: 3359 additions & 4762 deletions

File tree

.github/workflows/dapp-deploy.yml

Lines changed: 76 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,14 @@ jobs:
4444
fi
4545
4646
docker-publish:
47-
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@docker-build-v2.3.1
47+
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@docker-build-v3.1.1
4848
needs: [extract-tag]
4949
with:
5050
image-name: 'iexechub/web3mail-dapp'
5151
registry: 'docker.io'
5252
dockerfile: 'dapp/Dockerfile'
5353
context: 'dapp'
54-
security-scan: true
55-
security-report: 'sarif'
54+
security-scan: false
5655
hadolint: true
5756
push: true
5857
image-tag: ${{ needs.extract-tag.outputs.clean_tag }}
@@ -61,6 +60,7 @@ jobs:
6160
password: ${{ secrets.DOCKERHUB_PAT }}
6261

6362
sconify:
63+
if: startsWith(github.event.inputs.environment, 'bellecour-')
6464
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/sconify.yml@sconify-v2.0.0
6565
needs: [docker-publish, extract-tag]
6666
with:
@@ -87,7 +87,76 @@ jobs:
8787
scontain-password: ${{ secrets.SCONTAIN_REGISTRY_PAT }}
8888
scone-signing-key: ${{ secrets.SCONIFY_SIGNING_PRIVATE_KEY }}
8989

90-
deploy-dapp:
90+
deploy-tdx-dapp:
91+
if: startsWith(github.event.inputs.environment, 'arbitrum-')
92+
needs: [extract-tag, docker-publish]
93+
runs-on: ubuntu-latest
94+
environment: ${{ inputs.environment }}
95+
steps:
96+
- name: Checkout code
97+
uses: actions/checkout@v4
98+
99+
- name: Setup Node.js
100+
uses: actions/setup-node@v4
101+
with:
102+
node-version: '20.19.0'
103+
cache: 'npm'
104+
105+
- name: Install dependencies
106+
run: |
107+
npm ci
108+
cd node_modules/whitelist-smart-contract
109+
npm install --save-dev ts-node
110+
cd ../../deployment-dapp
111+
npm ci
112+
113+
- name: Deploy TDX dapp contract
114+
env:
115+
WALLET_PRIVATE_KEY: ${{ secrets.WEB3MAIL_APP_OWNER_PRIVATEKEY }}
116+
DOCKER_IMAGE_TAG: ${{ needs.extract-tag.outputs.clean_tag }}
117+
CHECKSUM: ${{ needs.docker-publish.outputs.checksum }}
118+
RPC_URL: ${{ secrets.RPC_URL }}
119+
run: |
120+
cd deployment-dapp
121+
npm run deploy-dapp
122+
123+
- name: Push dapp secret
124+
env:
125+
WALLET_PRIVATE_KEY: ${{ secrets.WEB3MAIL_APP_OWNER_PRIVATEKEY }}
126+
MJ_APIKEY_PUBLIC: ${{ secrets.MAILJET_APIKEY_PUBLIC }}
127+
MJ_APIKEY_PRIVATE: ${{ secrets.MAILJET_APIKEY_PRIVATE }}
128+
MJ_SENDER: ${{ secrets.MAILJET_SENDER }}
129+
MAILGUN_APIKEY: ${{ secrets.MAILGUN_APIKEY }}
130+
WEB3MAIL_WHITELISTED_APPS: ${{ vars.WEB3MAIL_WHITELISTED_APPS }}
131+
POCO_SUBGRAPH_URL: ${{ vars.POCO_SUBGRAPH_URL }}
132+
RPC_URL: ${{ secrets.RPC_URL }}
133+
run: |
134+
cd deployment-dapp
135+
npm run push-dapp-secret
136+
137+
- name: Publish free sell order
138+
env:
139+
WALLET_PRIVATE_KEY: ${{ secrets.WEB3MAIL_APP_OWNER_PRIVATEKEY }}
140+
PRICE: ${{ vars.SELL_ORDER_PRICE }}
141+
VOLUME: ${{ vars.SELL_ORDER_VOLUME }}
142+
RPC_URL: ${{ secrets.RPC_URL }}
143+
TEE_FRAMEWORK: ${{ vars.TEE_FRAMEWORK }}
144+
run: |
145+
cd deployment-dapp
146+
npm run publish-sell-order
147+
148+
- name: Add resource to whitelist
149+
env:
150+
CONTRACT_ADDRESS: ${{ vars.WEB3MAIL_WHITELIST_CONTRACT_ADDRESS }}
151+
PRIVATE_KEY: ${{ secrets.WEB3MAIL_APP_OWNER_PRIVATEKEY }}
152+
RPC_URL: ${{ secrets.RPC_URL }}
153+
run: |
154+
cd node_modules/whitelist-smart-contract
155+
export ADDRESS_TO_ADD=$(cat ../../deployment-dapp/.app-address)
156+
npm run addResourceToWhitelist -- --network ${{ vars.WHITELIST_NETWORK_NAME }}
157+
158+
deploy-scone-dapp:
159+
if: startsWith(github.event.inputs.environment, 'bellecour-')
91160
needs: [extract-tag, sconify]
92161
runs-on: ubuntu-latest
93162
environment: ${{ inputs.environment }}
@@ -109,7 +178,7 @@ jobs:
109178
cd ../../deployment-dapp
110179
npm ci
111180
112-
- name: Deploy dapp contract
181+
- name: Deploy SCONE dapp contract
113182
env:
114183
WALLET_PRIVATE_KEY: ${{ secrets.WEB3MAIL_APP_OWNER_PRIVATEKEY }}
115184
DOCKER_IMAGE_TAG: ${{ needs.sconify.outputs.prod-image-tag }}
@@ -131,6 +200,7 @@ jobs:
131200
WEB3MAIL_WHITELISTED_APPS: ${{ vars.WEB3MAIL_WHITELISTED_APPS }}
132201
POCO_SUBGRAPH_URL: ${{ vars.POCO_SUBGRAPH_URL }}
133202
RPC_URL: ${{ secrets.RPC_URL }}
203+
SCONIFY_VERSION: ${{ vars.SCONIFY_VERSION }}
134204
run: |
135205
cd deployment-dapp
136206
npm run push-dapp-secret
@@ -141,6 +211,7 @@ jobs:
141211
PRICE: ${{ vars.SELL_ORDER_PRICE }}
142212
VOLUME: ${{ vars.SELL_ORDER_VOLUME }}
143213
RPC_URL: ${{ secrets.RPC_URL }}
214+
TEE_FRAMEWORK: ${{ vars.TEE_FRAMEWORK }}
144215
run: |
145216
cd deployment-dapp
146217
npm run publish-sell-order

0 commit comments

Comments
 (0)