Skip to content

Commit

Permalink
New test how to build containers
Browse files Browse the repository at this point in the history
  • Loading branch information
juztas committed Jan 23, 2024
1 parent 9870b35 commit 2035910
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/build-condor-wn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
DOCKER_SDN_USER: ${{secrets.DOCKER_SDN_USER}}
DOCKER_SDN_PASSWORD: ${{secrets.DOCKER_SDN_PASSWORD}}
DOCKER_SDN_REGISTRY: ${{secrets.DOCKER_SDN_REGS}}
DOCKER_TIER2_USER: ${{secrets.DOCKER_TIER2_USER}}
DOCKER_TIER2_PASSWORD: ${{secrets.DOCKER_TIER2_PASSWORD}}
DOCKER_TIER2_REGISTRY: ${{secrets.DOCKER_TIER2_REGS}}
IMAGE_NAME: "cmscaltech/condor-wn"
steps:
- name: Checkout tools repo
uses: actions/checkout@v3
Expand All @@ -29,21 +33,30 @@ jobs:
run: |
docker login $DOCKER_REGISTRY -u $DOCKER_USER -p $DOCKER_PASSWORD
docker login $DOCKER_SDN_REGISTRY -u $DOCKER_SDN_USER -p $DOCKER_SDN_PASSWORD
docker login $DOCKER_TIER2_REGISTRY -u $DOCKER_TIER2_USER -p $DOCKER_TIER2_PASSWORD
- name: Build Condor WN Docker image
run: |
cd cmscaltech-docker/condor-wn
docker build . --file Dockerfile --tag cmscaltech/condor-wn:${{ github.event.inputs.buildtag }}-$(date +%Y%m%d)
docker build . --file Dockerfile \
--tag $IMAGE_NAME:${{ github.event.inputs.buildtag }} \
--tag $IMAGE_NAME:${{ github.event.inputs.buildtag }}-$(date +%Y%m%d) \
--tag $DOCKER_SDN_REGISTRY/$IMAGE_NAME:${{ github.event.inputs.buildtag }} \
--tag $DOCKER_SDN_REGISTRY/$IMAGE_NAME:${{ github.event.inputs.buildtag }}-$(date +%Y%m%d) \
--tag $DOCKER_TIER2_REGISTRY/$IMAGE_NAME:${{ github.event.inputs.buildtag }} \
--tag $DOCKER_TIER2_REGISTRY/$IMAGE_NAME:${{ github.event.inputs.buildtag }}-$(date +%Y%m%d)
- name: Docker Push Condor WN Image to first registry
run: |
docker push cmscaltech/condor-wn:${{ github.event.inputs.buildtag }}-$(date +%Y%m%d)
docker tag cmscaltech/condor-wn:${{ github.event.inputs.buildtag }}-$(date +%Y%m%d) cmscaltech/condor-wn:${{ github.event.inputs.buildtag }}
docker push cmscaltech/condor-wn:${{ github.event.inputs.buildtag }}-$(date +%Y%m%d)
docker push $IMAGE_NAME:${{ github.event.inputs.buildtag }}-$(date +%Y%m%d)
docker push $IMAGE_NAME:${{ github.event.inputs.buildtag }}
- name: Docker Push Condor WN Image to second registry
run: |
docker tag cmscaltech/condor-wn:${{ github.event.inputs.buildtag }} $DOCKER_SDN_REGISTRY/cmscaltech/condor-wn:${{ github.event.inputs.buildtag }}
docker push $DOCKER_SDN_REGISTRY/cmscaltech/condor-wn:${{ github.event.inputs.buildtag }}
docker tag $DOCKER_SDN_REGISTRY/cmscaltech/condor-wn:${{ github.event.inputs.buildtag }} $DOCKER_SDN_REGISTRY/cmscaltech/condor-wn:${{ github.event.inputs.buildtag }}-$(date +%Y%m%d)
docker push $DOCKER_SDN_REGISTRY/cmscaltech/condor-wn:${{ github.event.inputs.buildtag }}-$(date +%Y%m%d)
docker push $DOCKER_SDN_REGISTRY/$IMAGE_NAME:${{ github.event.inputs.buildtag }}
docker push $DOCKER_SDN_REGISTRY/$IMAGE_NAME:${{ github.event.inputs.buildtag }}-$(date +%Y%m%d)
- name: Docker Push Condor WN Image to third registry
run: |
docker push $DOCKER_TIER2_REGISTRY/$IMAGE_NAME:${{ github.event.inputs.buildtag }}
docker push $DOCKER_TIER2_REGISTRY/$IMAGE_NAME:${{ github.event.inputs.buildtag }}-$(date +%Y%m%d)

0 comments on commit 2035910

Please sign in to comment.