Skip to content

Commit

Permalink
Merge branch 'master' into ondemand-module-compile
Browse files Browse the repository at this point in the history
  • Loading branch information
magicxyyz authored Oct 23, 2024
2 parents d8468bf + 9a157f4 commit 08f2b2e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 0.2

phases:
pre_build:
commands:
- git submodule update --init
- echo Logging in to Dockerhub....
- docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
- aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin $REPOSITORY_URI
- COMMIT_HASH=$(git rev-parse --short=7 HEAD || echo "latest")
- VERSION_TAG=$(git tag --points-at HEAD | sed '/-/!s/$/_/' | sort -rV | sed 's/_$//' | head -n 1 | grep ^ || git show -s --pretty=%D | sed 's/, /\n/g' | grep -v '^origin/' |grep -v '^grafted\|HEAD\|master\|main$' || echo "dev")
- NITRO_VERSION=${VERSION_TAG}-${COMMIT_HASH}
- IMAGE_TAG=${NITRO_VERSION}
- NITRO_DATETIME=$(git show -s --date=iso-strict --format=%cd)
- NITRO_MODIFIED="false"
- echo ${NITRO_VERSION} > ./.nitro-tag.txt
build:
commands:
- echo Build started on `date`
- echo Building the Docker image ${NITRO_VERSION}...
- DOCKER_BUILDKIT=1 docker build . -t nitro-node-slim --target nitro-node-slim --build-arg version=$NITRO_VERSION --build-arg datetime=$NITRO_DATETIME --build-arg modified=$NITRO_MODIFIED
- DOCKER_BUILDKIT=1 docker build . -t nitro-node --target nitro-node --build-arg version=$NITRO_VERSION --build-arg datetime=$NITRO_DATETIME --build-arg modified=$NITRO_MODIFIED
- DOCKER_BUILDKIT=1 docker build . -t nitro-node-dev --target nitro-node-dev --build-arg version=$NITRO_VERSION --build-arg datetime=$NITRO_DATETIME --build-arg modified=$NITRO_MODIFIED
- DOCKER_BUILDKIT=1 docker build . -t nitro-node-validator --target nitro-node-validator --build-arg version=$NITRO_VERSION --build-arg datetime=$NITRO_DATETIME --build-arg modified=$NITRO_MODIFIED
- docker tag nitro-node:latest $REPOSITORY_URI:$IMAGE_TAG-$ARCH_TAG
- docker tag nitro-node-slim:latest $REPOSITORY_URI:$IMAGE_TAG-slim-$ARCH_TAG
- docker tag nitro-node-dev:latest $REPOSITORY_URI:$IMAGE_TAG-dev-$ARCH_TAG
- docker tag nitro-node-validator:latest $REPOSITORY_URI:$IMAGE_TAG-validator-$ARCH_TAG
post_build:
commands:
- echo Build completed on `date`
- echo pushing to repo
- docker push $REPOSITORY_URI:$IMAGE_TAG-$ARCH_TAG
- docker push $REPOSITORY_URI:$IMAGE_TAG-slim-$ARCH_TAG
- docker push $REPOSITORY_URI:$IMAGE_TAG-dev-$ARCH_TAG
- docker push $REPOSITORY_URI:$IMAGE_TAG-validator-$ARCH_TAG
1 change: 1 addition & 0 deletions das/dasRpcClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ func (c *DASRPCClient) Store(ctx context.Context, message []byte, timeout uint64
var startChunkedStoreResult StartChunkedStoreResult
if err := c.clnt.CallContext(ctx, &startChunkedStoreResult, "das_startChunkedStore", hexutil.Uint64(timestamp), hexutil.Uint64(nChunks), hexutil.Uint64(c.chunkSize), hexutil.Uint64(totalSize), hexutil.Uint64(timeout), hexutil.Bytes(startReqSig)); err != nil {
if strings.Contains(err.Error(), "the method das_startChunkedStore does not exist") {
log.Info("Legacy store is used by the DAS client", "url", c.url)
return c.legacyStore(ctx, message, timeout)
}
return nil, err
Expand Down

0 comments on commit 08f2b2e

Please sign in to comment.