Skip to content

Commit

Permalink
ci/cd: docker
Browse files Browse the repository at this point in the history
  • Loading branch information
polomarcus committed Dec 19, 2024
1 parent 7b479c4 commit 9ca24eb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,33 +55,46 @@ jobs:
- name: Push mediatree_import Image
run: docker push --all-tags ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/mediatree_import

# Not used anymore
# - name: Build ingest_to_db image
# run: docker build -f Dockerfile_ingest . -t ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/ingest_to_db
# - name: Push ingest_to_db Image
# run: docker push ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/ingest_to_db

- name: update scaleway job definition with version mediatree_import
uses: jawher/[email protected]
env:
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}
SCW_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID }}
SCW_ZONE: ${{ secrets.SCW_ZONE }}
with:
args: jobs definition update ${{ secrets.SCALEWAY_JOB_IMPORT_ID }} image-uri=${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/mediatree_import:${{ env.PROJECT_VERSION }}

- name: Build s3 image
run: docker build -f Dockerfile_api_to_s3 . -t ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/s3:${{ env.PROJECT_VERSION }}
- name: Tag s3 latest image
run: docker tag ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/s3:${{ env.PROJECT_VERSION }} ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/s3:latest
- name: Push s3 Image
run: docker push ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/s3:${{ env.PROJECT_VERSION }}
- name: update scaleway job definition with version mediatree_import

- name: update scaleway job definition with version s3
uses: jawher/[email protected]
env:
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}
SCW_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID }}
SCW_ZONE: ${{ secrets.SCW_ZONE }}
with:
args: jobs definition update ${{ secrets.SCALEWAY_JOB_IMPORT_ID }} image-uri=${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/mediatree_import:${{ env.PROJECT_VERSION }}
- name: update scaleway job definition with version s3
args: jobs definition update ${{ secrets.SCALEWAY_JOB_S3_ID }} image-uri=${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/s3:${{ env.PROJECT_VERSION }}

- name: Build stop_words image
run: docker build -f Dockerfile_stop_words . -t ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/stop_words:${{ env.PROJECT_VERSION }}
- name: Tag stop_words latest image
run: docker tag ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/stop_words:${{ env.PROJECT_VERSION }} ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/stop_words:latest
- name: Push stop_words Image
run: docker push ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/stop_words:${{ env.PROJECT_VERSION }}

- name: update scaleway job definition with version stopwords
uses: jawher/[email protected]
env:
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}
SCW_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID }}
SCW_ZONE: ${{ secrets.SCW_ZONE }}
with:
args: jobs definition update ${{ secrets.SCALEWAY_JOB_S3_ID }} image-uri=${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/s3:${{ env.PROJECT_VERSION }}
args: jobs definition update ${{ secrets.SCALEWAY_STOP_WORDS_ID }} image-uri=${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/stop_words:${{ env.PROJECT_VERSION }}
5 changes: 1 addition & 4 deletions Dockerfile_stop_words
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,4 @@ EXPOSE 5050
COPY docker-entrypoint.sh ./docker-entrypoint.sh
RUN chmod +x ./docker-entrypoint.sh

ENTRYPOINT ["./docker-entrypoint_stop_word.sh"]
build:
context: ./
dockerfile: Dockerfile_api_import
ENTRYPOINT ["./docker-entrypoint_stop_word.sh"]

0 comments on commit 9ca24eb

Please sign in to comment.