From 50adf39ded23a8ebcc07e9e6fecd1032a9845a73 Mon Sep 17 00:00:00 2001 From: Will Meister Date: Wed, 16 Sep 2020 10:26:38 -0500 Subject: [PATCH] Adding uat and testnet build push on merge to uat and testnet branches, respectively. Making dev entrypoint have the same startup params as the main entrypoint (#20) --- .github/workflows/testnet-ecr-build-push.yml | 45 ++++++++++++++++++++ .github/workflows/uat-ecr-build-push.yml | 45 ++++++++++++++++++++ docker/dev_entrypoint.sh | 1 + 3 files changed, 91 insertions(+) create mode 100644 .github/workflows/testnet-ecr-build-push.yml create mode 100644 .github/workflows/uat-ecr-build-push.yml diff --git a/.github/workflows/testnet-ecr-build-push.yml b/.github/workflows/testnet-ecr-build-push.yml new file mode 100644 index 000000000..5dec43d5b --- /dev/null +++ b/.github/workflows/testnet-ecr-build-push.yml @@ -0,0 +1,45 @@ +name: Build & Tag Container, Push testnet build to ECR + +on: + push: + branches: + - testnet + +jobs: + build: + name: Build, Tag & push testnet build to ECR + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup golang + uses: actions/setup-go@v2 + with: + go-version: '1.14.2' + + - name: Install & Build + run: make all + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_CI_USER_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_CI_USER_SECRET_ACCESS_KEY }} + aws-region: us-east-2 + + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v1 + + - name: Build, tag, and push image to Amazon ECR + env: + ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} + ECR_REPOSITORY: optimism/geth + IMAGE_TAG: testnet + run: | + docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . + docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG + + - name: Logout of Amazon ECR + if: always() + run: docker logout ${{ steps.login-ecr.outputs.registry }} diff --git a/.github/workflows/uat-ecr-build-push.yml b/.github/workflows/uat-ecr-build-push.yml new file mode 100644 index 000000000..53f1bb9d2 --- /dev/null +++ b/.github/workflows/uat-ecr-build-push.yml @@ -0,0 +1,45 @@ +name: Build & Tag Container, Push UAT build to ECR + +on: + push: + branches: + - uat + +jobs: + build: + name: Build, Tag & push UAT build to ECR + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup golang + uses: actions/setup-go@v2 + with: + go-version: '1.14.2' + + - name: Install & Build + run: make all + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_CI_USER_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_CI_USER_SECRET_ACCESS_KEY }} + aws-region: us-east-2 + + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v1 + + - name: Build, tag, and push image to Amazon ECR + env: + ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} + ECR_REPOSITORY: optimism/geth + IMAGE_TAG: uat + run: | + docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . + docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG + + - name: Logout of Amazon ECR + if: always() + run: docker logout ${{ steps.login-ecr.outputs.registry }} diff --git a/docker/dev_entrypoint.sh b/docker/dev_entrypoint.sh index 25c5b8767..c05d174ad 100755 --- a/docker/dev_entrypoint.sh +++ b/docker/dev_entrypoint.sh @@ -20,6 +20,7 @@ TARGET_GAS_LIMIT=${TARGET_GAS_LIMIT:-4294967295} --rpc \ --rpcaddr $HOSTNAME \ --rpcvhosts='*' \ + --rpccorsdomain='*' \ --rpcport $PORT \ --networkid $NETWORK_ID \ --rpcapi 'eth,net' \