github.com/unicornultrafoundation/go-u2u@v1.0.0-rc1.0.20240205080301-e74a83d3fadc/buildspec.yml (about)

     1  version: 0.2
     2  
     3  phases:
     4    install:
     5      runtime-versions:
     6        golang: 1.20
     7    pre_build:
     8      commands:
     9        - aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/v5t9f2i2
    10        - REPOSITORY_URI=public.ecr.aws/v5t9f2i2/go-u2u
    11        - COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-40)
    12        - IMAGE_TAG=${COMMIT_HASH:=latest}
    13    build:
    14      commands:
    15        - echo Build started on `date`
    16        - echo Building the Docker image...
    17        - export DOCKER_CLI_EXPERIMENTAL=enabled
    18        #- mkdir -p ~/.docker/cli-plugins/
    19        #- curl --silent -L "https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
    20        #- chmod a+x ~/.docker/cli-plugins/docker-buildx
    21        - echo "$REPOSITORY_URI:$IMAGE_TAG"
    22        - curl -O https://raw.githubusercontent.com/unicornultrafoundation/u2u-genesis/main/mainnet.g
    23        #- docker buildx create --use
    24        #- docker buildx build --platform linux/arm64,linux/amd64 --tag $REPOSITORY_URI:$IMAGE_TAG -f ./docker/Dockerfile.u2u . --push
    25        - docker build --tag $REPOSITORY_URI:$IMAGE_TAG -f ./docker/Dockerfile.u2u . --push
    26    post_build:
    27      commands:
    28        - echo Build completed on `date`