Skip to content

Commit

Permalink
Update docker registry address
Browse files Browse the repository at this point in the history
  • Loading branch information
leavauchier committed Feb 5, 2024
1 parent bbf6c96 commit 744c90f
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ on:
- main
- staging-*

env:
nexus_server: 10.128.81.69:8082

jobs:
CICD:
runs-on: self-hosted
Expand Down Expand Up @@ -86,7 +83,7 @@ jobs:
docker run myria3d:${{github.ref_name}} bash # Run the new, tagged image at least once so that is it not prunned by mistake when using docker system prune
# docker save myria3d:${{github.ref_name}} -o /var/data/cicd/CICD_github_assets/CICD_docker_images/myria3d_${github.ref_name}.tar # Save the docker image as myria3d_${github.ref_name}.tar
# get version number and date, to tag the image pushed to nexus
# get version number and date, to tag the image pushed to a private docker registry
- name: get version number
id: tag
run: |
Expand All @@ -103,17 +100,17 @@ jobs:
# we push on nexus an image from the main branch when it has been updated (push or accepted pull request)
if: ((github.ref_name == 'main') && (github.event_name == 'push'))
run: |
docker tag myria3d $nexus_server/lidar_hd/myria3d:${{steps.tag.outputs.version}}-${{steps.tag.outputs.date}}
docker login $nexus_server --username svc_lidarhd --password ${{ secrets.PASSWORD_SVC_LIDARHD }}
docker push $nexus_server/lidar_hd/myria3d:${{steps.tag.outputs.version}}-${{steps.tag.outputs.date}}
docker tag myria3d ${{ secrets.DOCKER_REGISTRY }}/lidar_hd/myria3d:${{steps.tag.outputs.version}}-${{steps.tag.outputs.date}}
docker login ${{ secrets.DOCKER_REGISTRY }} --username svc_lidarhd --password ${{ secrets.PASSWORD_SVC_LIDARHD }}
docker push ${{ secrets.DOCKER_REGISTRY }}/lidar_hd/myria3d:${{steps.tag.outputs.version}}-${{steps.tag.outputs.date}}
- name: push branch docker on nexus (tagged with the branch name)
# we push on nexus an image from a branch when it's pushed
if: ((github.event_name == 'push') && (github.ref_name != 'main'))
run: |
docker tag myria3d $nexus_server/lidar_hd/myria3d:${{steps.tag.outputs.version}}-${{github.ref_name}}
docker login $nexus_server --username svc_lidarhd --password ${{ secrets.PASSWORD_SVC_LIDARHD }}
docker push $nexus_server/lidar_hd/myria3d:${{steps.tag.outputs.version}}-${{github.ref_name}}
docker tag myria3d ${{ secrets.DOCKER_REGISTRY }}/lidar_hd/myria3d:${{steps.tag.outputs.version}}-${{github.ref_name}}
docker login ${{ secrets.DOCKER_REGISTRY }} --username svc_lidarhd --password ${{ secrets.PASSWORD_SVC_LIDARHD }}
docker push ${{ secrets.DOCKER_REGISTRY }}/lidar_hd/myria3d:${{steps.tag.outputs.version}}-${{github.ref_name}}
- name: Clean dangling docker images
if: always() # always do it, even if something failed
Expand Down

0 comments on commit 744c90f

Please sign in to comment.