Skip to content

Commit

Permalink
Prepare for taging (too complex CI but I need quick fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
oshadura committed Apr 22, 2022
1 parent ee11fc5 commit 70afd4f
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 11 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/dockerpublish-harbor-tag-cc-analysis-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

name: CD-cc-analysis-ubuntu-tag

on:
push:
tags:
- '*'

env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}

jobs:
matrix-build:
strategy:
fail-fast: false
matrix:
IMAGE: [cc-analysis-ubuntu,
]
name: ${{ matrix.IMAGE }}
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set Job Environment Variables
run: |
TAG="${GITHUB_REF##*/}"
echo "TAG=${TAG}" >> $GITHUB_ENV
- name: Login to Openscience Harbor Registry
uses: docker/login-action@v1
with:
registry: hub.opensciencegrid.org
username: ${{ secrets.HARBOR_USER }}
password: ${{ secrets.HARBOR_PASSWORD }}
- name: Build Container Image
run: |
cd docker/${{ matrix.IMAGE }}
docker build --build-arg TAG="development" --build-arg HUB="hub.opensciencegrid.org" --build-arg PROJECT="coffea-casa" -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:latest -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:$TAG -f Dockerfile.${{ matrix.IMAGE }} .
- name: Push to Openscience Harbor Registry
run: |
docker push hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:latest
docker push hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:$TAG
43 changes: 43 additions & 0 deletions .github/workflows/dockerpublish-harbor-tag-cc-base-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

name: CD-cc-base-ubuntu-tag

on:
push:
tags:
- '*'

env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}

jobs:
matrix-build:
strategy:
fail-fast: false
matrix:
IMAGE: [cc-base-ubuntu,
]
name: ${{ matrix.IMAGE }}
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set Job Environment Variables
run: |
TAG="${GITHUB_REF##*/}"
echo "TAG=${TAG}" >> $GITHUB_ENV
- name: Login to Openscience Harbor Registry
uses: docker/login-action@v1
with:
registry: hub.opensciencegrid.org
username: ${{ secrets.HARBOR_USER }}
password: ${{ secrets.HARBOR_PASSWORD }}
- name: Build Container Image
run: |
cd docker/${{ matrix.IMAGE }}
docker build --build-arg TAG="development" --build-arg HUB="hub.opensciencegrid.org" --build-arg PROJECT="coffea-casa" -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:latest -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:$TAG -f Dockerfile.${{ matrix.IMAGE }} .
- name: Push to Openscience Harbor Registry
run: |
docker push hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:latest
docker push hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:$TAG
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@

name: Openscience Harbor Registry Publish (Tag)
name: CD-cc-skyhook-ubuntu-tag

on:
workflow_run:
workflows: ["CD-cc-analysis-ubuntu-tag","CD-cc-ubuntu-tag"]
#branches: [master]
types:
- completed
push:
tags:
- '*'
Expand All @@ -15,16 +20,9 @@ jobs:
strategy:
fail-fast: false
matrix:
IMAGE: [cc-base-ubuntu,
#cc-base-centos7,
cc-analysis-ubuntu,
#cc-analysis-centos7,
#cc-centos7,
cc-ubuntu,
IMAGE: [
cc-analysis-ubuntu-skyhook,
#cc-analysis-centos7-skyhook,
cc-ubuntu-skyhook,
#cc-centos7-skyhook
]
name: ${{ matrix.IMAGE }}
runs-on: ubuntu-latest
Expand All @@ -45,7 +43,7 @@ jobs:
- name: Build Container Image
run: |
cd docker/${{ matrix.IMAGE }}
docker build -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:latest -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:$TAG -f Dockerfile.${{ matrix.IMAGE }} .
docker build --build-arg TAG="development" --build-arg HUB="hub.opensciencegrid.org" --build-arg PROJECT="coffea-casa" -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:latest -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:$TAG -f Dockerfile.${{ matrix.IMAGE }} .
- name: Push to Openscience Harbor Registry
run: |
docker push hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:latest
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/dockerpublish-harbor-tag-cc-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

name: CD-cc-ubuntu-tag

on:
workflow_run:
workflows: ["CD-cc-base-ubuntu-tag"]
#branches: [master]
types:
- completed
push:
tags:
- '*'

env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}

jobs:
matrix-build:
strategy:
fail-fast: false
matrix:
IMAGE: [cc-ubuntu,
]
name: ${{ matrix.IMAGE }}
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set Job Environment Variables
run: |
TAG="${GITHUB_REF##*/}"
echo "TAG=${TAG}" >> $GITHUB_ENV
- name: Login to Openscience Harbor Registry
uses: docker/login-action@v1
with:
registry: hub.opensciencegrid.org
username: ${{ secrets.HARBOR_USER }}
password: ${{ secrets.HARBOR_PASSWORD }}
- name: Build Container Image
run: |
cd docker/${{ matrix.IMAGE }}
docker build --build-arg TAG="development" --build-arg HUB="hub.opensciencegrid.org" --build-arg PROJECT="coffea-casa" -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:latest -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:$TAG -f Dockerfile.${{ matrix.IMAGE }} .
- name: Push to Openscience Harbor Registry
run: |
docker push hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:latest
docker push hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:$TAG
2 changes: 1 addition & 1 deletion .github/workflows/dockerpublish-harbor-tag-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Build Container Image
run: |
cd charts/coffea-casa/docker/${{ matrix.IMAGE }}
docker build -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:latest -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:$TAG -f Dockerfile.${{ matrix.IMAGE }} .
docker build -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:latest -t hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:$TAG .
- name: Push to Openscience Harbor Registry
run: |
docker push hub.opensciencegrid.org/coffea-casa/${{ matrix.IMAGE }}:latest
Expand Down

0 comments on commit 70afd4f

Please sign in to comment.