chore: remove aws deployment (#975)

<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
This commit is contained in:
Boris 2025-06-12 11:47:12 +02:00 committed by GitHub
parent d82b73ed39
commit 645e939b72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 0 additions and 209 deletions

View file

@ -1,77 +0,0 @@
name: publish dev | Docker image
on:
push:
branches:
- dev
paths-ignore:
- '**.md'
- 'examples/**'
env:
AWS_ROLE_DEV_CICD: "arn:aws:iam::463722570299:role/cognee-dev-base-role-github-ci-cd"
AWS_ACCOUNT_ID_DEV: "463722570299"
jobs:
publish_docker_to_ecr:
name: Publish Cognee Docker image
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
steps:
- name: Checkout code from repo
uses: actions/checkout@v4
- name: Set environment variable for stage
id: set-env
run: |
echo "STAGE=dev" >> $GITHUB_ENV
echo "::set-output name=stage::dev"
- name: Use output
run: echo "The stage is ${{ steps.set-env.outputs.stage }}"
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_ROLE_DEV_CICD }}
aws-region: eu-west-1
- name: Build Docker image and push to ECR
uses: ./.github/actions/image_builder
id: build-cognee-docker-image
with:
stage: dev
aws_account_id: ${{ env.AWS_ACCOUNT_ID_DEV }}
should_publish: true
ecr_image_repo_name: cognee-dev-backend-cognee-ecr
dockerfile_location: ./
- name: Export Cognee image tag
id: export-cognee-image-tag
run: |
export IMAGE_TAG=$(cat /tmp/.DOCKER_IMAGE_VERSION)
echo "Docker tag is: $IMAGE_TAG"
echo "cognee_image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
outputs:
cognee_image_tag: ${{ steps.export-cognee-image-tag.outputs.cognee_image_tag }}
trigger_deployment:
name: Trigger deployment
runs-on: ubuntu-latest
needs: publish_docker_to_ecr
steps:
- name: Trigger deployment in the infrastructure
uses: actions/github-script@v7
with:
github-token: ${{ secrets.PAT_FOR_CROSS_REPOS_CICD_TRIGGERING }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'topoteretes',
repo: 'cognee-infra',
workflow_id: 'terraform.apply.yml',
ref: 'main'
})

View file

@ -1,106 +0,0 @@
name: publish prd | Docker image
on:
push:
branches:
- main
paths-ignore:
- '**.md'
- 'examples/**'
env:
AWS_ROLE_DEV_CICD: "arn:aws:iam::463722570299:role/cognee-dev-base-role-github-ci-cd"
AWS_ACCOUNT_ID_DEV: "463722570299"
ENVIRONMENT: prd
jobs:
publish_docker_to_ecr:
name: Publish Docker PromethAI image
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
steps:
- name: Checkout code from repo
uses: actions/checkout@v4
- name: Set environment variable for stage
id: set-env
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "STAGE=prd" >> $GITHUB_ENV
echo "::set-output name=stage::prd"
else
echo "STAGE=dev" >> $GITHUB_ENV
echo "::set-output name=stage::dev"
fi
- name: Use output
run: echo "The stage is ${{ steps.set-env.outputs.stage }}"
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_ROLE_DEV_CICD }}
aws-region: eu-west-1
- name: Build Docker image and push to ECR
uses: ./.github/actions/image_builder
id: generate-promethai-docker
with:
stage: prd
aws_account_id: ${{ env.AWS_ACCOUNT_ID_DEV }}
should_publish: true
ecr_image_repo_name: cognee-prd-backend-cognee-ecr
dockerfile_location: ./
- name: Export Docker image tag
id: export-cognee-docker-tag
run: |
export DOCKER_TAG=$(cat /tmp/.DOCKER_IMAGE_VERSION)
echo "Docker tag is: $DOCKER_TAG"
echo "cognee_image_tag=$DOCKER_TAG" >> $GITHUB_OUTPUT
# - name: Create Tag and Release
# runs-on: ubuntu-latest
# uses: actions/checkout@v3
# needs: publish_docker_to_ecr # ensure this job runs after Docker image is pushed
# steps:
# - name: Check out code
# uses: actions/checkout@v3
# - name: Bump version and push tag
# id: bump_version_and_push_tag
# uses: anothrNick/github-tag-action@1.34.0
# env:
# GITHUB_TOKEN: ${{ secrets.PAT_FOR_CROSS_REPOS_CICD_TRIGGERING }}
# WITH_V: true
# DEFAULT_BUMP: 'minor' # or 'minor' or 'major'
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.PAT_FOR_CROSS_REPOS_CICD_TRIGGERING }}
# with:
# tag_name: ${{ steps.bump_version_and_push_tag.outputs.tag }}
# release_name: Release ${{ steps.bump_version_and_push_tag.outputs.tag }}
outputs:
cognee_image_tag: ${{ steps.export-promethai-docker-tag.outputs.cognee_image_tag }}
trigger_deployment:
name: Trigger deployment
runs-on: ubuntu-latest
needs: publish_docker_to_ecr
steps:
- name: TF apply workflow triggers step
uses: actions/github-script@v7
with:
github-token: ${{ secrets.PAT_FOR_CROSS_REPOS_CICD_TRIGGERING }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'topoteretes',
repo: 'cognee-infra',
workflow_id: 'terraform.apply.yml',
ref: 'main'
})

View file

@ -1,26 +0,0 @@
name: build test | Docker image
on:
workflow_call:
env:
AWS_ACCOUNT_ID_DEV: "463722570299"
jobs:
build_docker:
name: Build Cognee Backend Docker App Image
runs-on: ubuntu-22.04
steps:
- name: Check out Cognee code
uses: actions/checkout@v3
- name: Build Cognee Docker image
id: cognee-docker-tag
run: |
export SHA_SHORT="$(git rev-parse --short HEAD)"
export CUR_DATE="$(date +%Y%m%d%H%M%S)"
export VERSION="dev-$CUR_DATE-$SHA_SHORT"
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)
echo "Successfully built cognee Docker image. Tag is: $DOCKER_TAG"