fix: change image name
This commit is contained in:
parent
58db1ac2c8
commit
0b47a703f9
4 changed files with 25 additions and 25 deletions
14
.github/actions/image_builder/action.yaml
vendored
14
.github/actions/image_builder/action.yaml
vendored
|
|
@ -1,20 +1,20 @@
|
||||||
name: 'Build Docker images for PromethAI'
|
name: 'Build Docker images for Cognee'
|
||||||
description: 'Build PromethAI-related Docker images and push to the Docker registry (AWS ECR)'
|
description: 'Build cognee-related Docker images and push to the Docker registry (AWS ECR)'
|
||||||
inputs:
|
inputs:
|
||||||
stage:
|
stage:
|
||||||
description: 'The stage of the pipeline, such as "dev" or "prd", for the PromethAI app'
|
description: 'The stage of the pipeline, such as "dev" or "prd", for the Cognee app'
|
||||||
required: true
|
required: true
|
||||||
aws_account_id:
|
aws_account_id:
|
||||||
description: 'The AWS account ID for the PromethAI app'
|
description: 'The AWS account ID for the Cognee app'
|
||||||
required: true
|
required: true
|
||||||
should_publish:
|
should_publish:
|
||||||
description: 'Whether to publish the PromethAI Docker image to AWS ECR; should be either "true" or "false"'
|
description: 'Whether to publish the Cognee Docker image to AWS ECR; should be either "true" or "false"'
|
||||||
required: true
|
required: true
|
||||||
ecr_image_repo_name:
|
ecr_image_repo_name:
|
||||||
description: 'The Docker image ECR repository name for the PromethAI app, such as "workflows"'
|
description: 'The Docker image ECR repository name for the Cognee app, such as "workflows"'
|
||||||
required: true
|
required: true
|
||||||
dockerfile_location:
|
dockerfile_location:
|
||||||
description: 'The directory location of the Dockerfile for the PromethAI app'
|
description: 'The directory location of the Dockerfile for the Cognee app'
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
|
|
|
||||||
22
.github/workflows/cd.yaml
vendored
22
.github/workflows/cd.yaml
vendored
|
|
@ -15,13 +15,13 @@ env:
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
publish_docker_to_ecr:
|
publish_docker_to_ecr:
|
||||||
name: Publish Docker PromethAI image
|
name: Publish Cognee Docker image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write
|
id-token: write
|
||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Take code from repo
|
- name: Checkout code from repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Set environment variable for stage
|
- name: Set environment variable for stage
|
||||||
id: set-env
|
id: set-env
|
||||||
|
|
@ -40,23 +40,23 @@ jobs:
|
||||||
with:
|
with:
|
||||||
role-to-assume: ${{ env.AWS_ROLE_DEV_CICD }}
|
role-to-assume: ${{ env.AWS_ROLE_DEV_CICD }}
|
||||||
aws-region: eu-west-1
|
aws-region: eu-west-1
|
||||||
- name: Create Docker image and push to ECR
|
- name: Build Docker image and push to ECR
|
||||||
uses: ./.github/actions/image_builder
|
uses: ./.github/actions/image_builder
|
||||||
id: generate-promethai-docker
|
id: build-cognee-docker-image
|
||||||
with:
|
with:
|
||||||
stage: dev
|
stage: dev
|
||||||
aws_account_id: ${{ env.AWS_ACCOUNT_ID_DEV }}
|
aws_account_id: ${{ env.AWS_ACCOUNT_ID_DEV }}
|
||||||
should_publish: true
|
should_publish: true
|
||||||
ecr_image_repo_name: promethai-dev-backend-promethai-backend
|
ecr_image_repo_name: cognee-dev-backend-cognee-api/cognee-dev
|
||||||
dockerfile_location: ./
|
dockerfile_location: ./
|
||||||
- name: Export Docker image tag
|
- name: Export Cognee image tag
|
||||||
id: export-promethai-docker-tag
|
id: export-cognee-image-tag
|
||||||
run: |
|
run: |
|
||||||
export DOCKER_TAG=$(cat /tmp/.DOCKER_IMAGE_VERSION)
|
export IMAGE_TAG=$(cat /tmp/.DOCKER_IMAGE_VERSION)
|
||||||
echo "Docker tag is: $DOCKER_TAG"
|
echo "Docker tag is: $IMAGE_TAG"
|
||||||
echo "promethai_docker_tag_backend=$DOCKER_TAG" >> $GITHUB_OUTPUT
|
echo "cognee_image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
|
||||||
outputs:
|
outputs:
|
||||||
promethai_docker_tag_backend: ${{ steps.export-promethai-docker-tag.outputs.promethai_docker_tag_backend }}
|
cognee_image_tag: ${{ steps.export-cognee-image-tag.outputs.cognee_image_tag }}
|
||||||
|
|
||||||
apply_tf:
|
apply_tf:
|
||||||
name: Trigger terraform apply workflow
|
name: Trigger terraform apply workflow
|
||||||
|
|
|
||||||
12
.github/workflows/ci.yaml
vendored
12
.github/workflows/ci.yaml
vendored
|
|
@ -8,18 +8,18 @@ env:
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build_docker:
|
build_docker:
|
||||||
name: Build PromethAI Backend Docker App Image
|
name: Build Cognee Backend Docker App Image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out PromethAI code
|
- name: Check out Cognee code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Build PromethAI backend Docker image tag
|
- name: Build Cognee Docker image
|
||||||
id: backend-docker-tag
|
id: cognee-docker-tag
|
||||||
run: |
|
run: |
|
||||||
export SHA_SHORT="$(git rev-parse --short HEAD)"
|
export SHA_SHORT="$(git rev-parse --short HEAD)"
|
||||||
export CUR_DATE="$(date +%Y%m%d%H%M%S)"
|
export CUR_DATE="$(date +%Y%m%d%H%M%S)"
|
||||||
export VERSION="dev-$CUR_DATE-$SHA_SHORT"
|
export VERSION="dev-$CUR_DATE-$SHA_SHORT"
|
||||||
image_name="backend" docker_login="false" version="$VERSION" account="${{ env.AWS_ACCOUNT_ID_DEV }}" app_dir="backend" publish="false" ./bin/dockerize
|
image_name="cognee" docker_login="false" version="$VERSION" account="${{ env.AWS_ACCOUNT_ID_DEV }}" app_dir="." publish="false" ./bin/dockerize
|
||||||
export DOCKER_TAG=$(cat /tmp/.DOCKER_IMAGE_VERSION)
|
export DOCKER_TAG=$(cat /tmp/.DOCKER_IMAGE_VERSION)
|
||||||
echo "Successfully built PromethAI backend Docker tag is: $DOCKER_TAG"
|
echo "Successfully built cognee Docker image. Tag is: $DOCKER_TAG"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ STAGE=${stage:-"dev"}
|
||||||
SHA_SHORT="$(git rev-parse --short HEAD)"
|
SHA_SHORT="$(git rev-parse --short HEAD)"
|
||||||
CUR_DATE="$(date +%Y%m%d%H%M%S)"
|
CUR_DATE="$(date +%Y%m%d%H%M%S)"
|
||||||
VERSION="$STAGE-$CUR_DATE-$SHA_SHORT"
|
VERSION="$STAGE-$CUR_DATE-$SHA_SHORT"
|
||||||
IMAGE_NAME=${image_name:-promethai-${STAGE}-promethai-backend}
|
IMAGE_NAME=${image_name:-cognee-${STAGE}}
|
||||||
|
|
||||||
REPO_NAME="${AWS_REPOSITORY}/${IMAGE_NAME}"
|
REPO_NAME="${AWS_REPOSITORY}/${IMAGE_NAME}"
|
||||||
FULL_IMAGE_NAME="${REPO_NAME}:${VERSION}"
|
FULL_IMAGE_NAME="${REPO_NAME}:${VERSION}"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue