From c3238afac6745de445cd7dc085be95d391ade902 Mon Sep 17 00:00:00 2001 From: Tsotne Tabidze Date: Fri, 19 Nov 2021 14:15:11 -0800 Subject: [PATCH] Fix ECR Image build on master branch Signed-off-by: Tsotne Tabidze --- .github/workflows/build_feature_server.yml | 31 ---------------------- .github/workflows/integration_tests.yml | 29 ++++++++++++++++++++ 2 files changed, 29 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/build_feature_server.yml diff --git a/.github/workflows/build_feature_server.yml b/.github/workflows/build_feature_server.yml deleted file mode 100644 index d9a0515978a..00000000000 --- a/.github/workflows/build_feature_server.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: build_feature_server_aws - -on: - push: - branches: - - master - paths: - - "protos/**" - - "sdk/python**" - -jobs: - build-docker-image: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - run: | - docker build \ - --file sdk/python/feast/infra/feature_servers/aws_lambda/Dockerfile \ - --tag feastdev/feature-server:`git rev-parse HEAD` \ - . - docker push feastdev/feature-server:`git rev-parse HEAD` diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 64a32bbed76..666bb083788 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -6,7 +6,36 @@ on: - master jobs: + build-docker-image: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Set up AWS SDK + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v1 + - name: Build and push + env: + ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} + ECR_REPOSITORY: feast-python-server + # Note: the image tags should be in sync with sdk/python/feast/infra/aws.py:_get_docker_image_version + run: | + docker build \ + --file sdk/python/feast/infra/feature_servers/aws_lambda/Dockerfile \ + --tag $ECR_REGISTRY/$ECR_REPOSITORY:`git rev-parse HEAD` \ + . + docker push $ECR_REGISTRY/$ECR_REPOSITORY:`git rev-parse HEAD` integration-test-python: + needs: build-docker-image runs-on: ${{ matrix.os }} strategy: fail-fast: false