feat(dockerfile)!: do not download builtins (#162)

* feat(dockerfile)!: do not download builtins

* chore: remove everything related to builtins

* fix(e2e): rename rust-peer-image to nox-image in e2e.yml

* chore: debug download_fluence.sh

* chore: rename rust-peer to nox in fluence.json
This commit is contained in:
folex 2023-07-20 14:53:35 -05:00 committed by GitHub
parent 8831ca7d3b
commit 95b7a910e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 2 additions and 115 deletions

View File

@ -79,4 +79,4 @@ jobs:
- snapshot
uses: fluencelabs/fluence-cli/.github/workflows/tests.yml@main
with:
rust-peer-image: "${{ needs.snapshot.outputs.nox-image }}"
nox-image: "${{ needs.snapshot.outputs.nox-image }}"

View File

@ -1,55 +0,0 @@
name: "update_service"
on:
workflow_dispatch:
inputs:
name:
description: 'Name of the service'
required: true
version:
description: 'Version of the service'
required: true
url:
description: 'Url of the service package'
required: true
sha256:
description: 'SHA256 hash of the service package'
required: true
jobs:
update:
name: "Update service"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.FLUENCEBOT_RELEASE_PLEASE_PAT }}
- name: Download jq
run: |
curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 -o /usr/local/bin/jq
chmod +x /usr/local/bin/jq
- name: Update ${{ github.event.inputs.name }} services.json to ${{ github.event.inputs.version }}
run: |
# check the service already exists
jq -e 'has("${{ github.event.inputs.name }}")' fluence/services.json
# update service's record
UPDATED=$(jq '."${{ github.event.inputs.name }}" = {
"version": "${{ github.event.inputs.version }}",
"url": "${{ github.event.inputs.url }}",
"sha256": "${{ github.event.inputs.sha256 }}"
}' fluence/services.json)
# write updated content to disk
echo "$UPDATED" > fluence/services.json
- name: Commit updated fluence.json
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'fix(deps): Update ${{ github.event.inputs.name }} to ${{ github.event.inputs.version }}'
commit_user_name: fluencebot
commit_user_email: devops@fluence.one
commit_author: fluencebot <devops@fluence.one>

View File

@ -76,7 +76,6 @@ ENV FLUENCE_ENV_CONNECTOR_FROM_BLOCK=0x75f3fbc
# download nox binary, builtins
COPY fluence/ /fluence/
RUN /fluence/download_builtins.sh /fluence/services.json
RUN /fluence/download_fluence.sh /fluence/fluence.json
# copy default fluence config

View File

@ -1,35 +0,0 @@
#!/usr/bin/env bash
set -o pipefail -o errexit -o nounset
CONFIG="${1:-services.json}"
BUILTINS_DIR=/builtins/
TMP_BUILTINS=./tmp/builtins
mkdir -p $BUILTINS_DIR
mkdir -p $TMP_BUILTINS
jq -r '
to_entries | .[] | .key, .value.url, .value.sha256, .value.version
' $CONFIG |
while
read -r name
read -r url
read -r sha256
read -r version
do
echo "*** download $name@$version ***"
TAR="$TMP_BUILTINS/${name}.tar.gz"
# TODO: use --fail-with-body
curl -sL --fail $url -o $TAR || (
echo "failed to download $url" >&2
exit 1
)
echo "$sha256 $TAR" | sha256sum --check --status || (
echo "incorrect SHA256 for $name" >&2
exit 1
)
tar -C $BUILTINS_DIR -xf $TAR
done
rm -rf $TMP_BUILTINS

View File

@ -42,7 +42,7 @@ echo "*** Downloading nox version $VERSION for $ARCHITECTURE ***"
ATTEMPTS=5
while ((ATTEMPTS)); do
curl -sL --fail $URL -o /usr/bin/nox && break
curl -L $URL -o /usr/bin/nox && break
((ATTEMPTS--))
sleep 5
done

View File

@ -1,22 +0,0 @@
{
"aqua-ipfs": {
"version": "0.5.17",
"url": "https://github.com/fluencelabs/aqua-ipfs/releases/download/aqua-ipfs-v0.5.17/aqua-ipfs.tar.gz",
"sha256": "75ce29446cacc230e790ebdcb831cb2d0d45815c7b0e9ec770e2ccd6f5b75e50"
},
"trust-graph": {
"version": "0.4.7",
"url": "https://github.com/fluencelabs/trust-graph/releases/download/trust-graph-v0.4.7/trust-graph.tar.gz",
"sha256": "cbd35e068d592c7c604d9ac0c4487957f6a1387d5af474fe74245b0361ceaed4"
},
"registry": {
"version": "0.8.7",
"url": "https://github.com/fluencelabs/registry/releases/download/registry-v0.8.7/registry.tar.gz",
"sha256": "fc32f169451f818d15b1edd3a80fcc5e3c09964b778b457183badfaf88077c3d"
},
"connector": {
"version": "0.4.17",
"url": "https://github.com/fluencelabs/control-plane/releases/download/connector-v0.4.17/connector.tar.gz",
"sha256": "04a51c63de18b42157e8cdfaac1271df33ef38c0cb9988ae68de8378ba482aad"
}
}