Skip to content

Commit

Permalink
Merge pull request #178 from opensciencegrid/SOFTWARE-6017-osg24
Browse files Browse the repository at this point in the history
SOFTWARE-6017: ospool-ep/osg-24
  • Loading branch information
brianhlin authored Oct 28, 2024
2 parents 2db9f6f + 5374820 commit 9aa7b84
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
10 changes: 5 additions & 5 deletions .github/actions/push-digest-local/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ runs:
echo "platform=${platform//\//-}" >> ${GITHUB_OUTPUT}
- name: Registry login
# if: >-
# github.ref == 'refs/heads/master' &&
# github.event_name != 'pull_request' &&
# github.repository_owner == 'opensciencegrid'
if: >-
github.ref == 'refs/heads/master' &&
github.event_name != 'pull_request' &&
contains(fromJson('["opensciencegrid","osg-htc"]'), github.repository_owner)
uses: docker/login-action@v2
with:
registry: ${{ inputs.registry }}
Expand All @@ -79,7 +79,7 @@ runs:
run: |
mkdir -p /tmp/${{ inputs.registry }}/digests
digest="${{ steps.upload-image.outputs.digest }}"
touch "/tmp/${{ inputs.registry }}/digests/${digest#sha256:}"
touch "/tmp/${{ inputs.registry }}/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v4
Expand Down
31 changes: 20 additions & 11 deletions .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ jobs:
fail-fast: false
matrix:
os: ['el9', 'cuda_11_8_0']
osg_series: ['23']
# osg_series: ['23']
repo: ['development', 'testing', 'release']
osg_series:
- series: '24'
image: 'osg-htc/ospool-ep'
- series: '23'
image: 'opensciencegrid/osgvo-docker-pilot'
platform: ['linux/amd64','linux/arm64']
exclude:
# cuda builds take a super long time; only do one of them
Expand All @@ -32,11 +37,12 @@ jobs:

- id: custom-image-name
env:
SERIES: ${{ matrix.osg_series }}
SERIES: ${{ matrix.osg_series.series }}
IMAGE: ${{ matrix.osg_series.image }}
REPO: ${{ matrix.repo }}
OS: ${{ matrix.os }}
run: |
PREFIX="output_image=${GITHUB_REPOSITORY}:${SERIES}"
PREFIX="output_image=${IMAGE}:${SERIES}"
TIMESTAMP=$(date +%Y%m%d-%H%M)
echo "${PREFIX}-${OS}-${REPO}" >> ${GITHUB_OUTPUT}
echo "base_tag=${SERIES}-${OS}-${REPO}" >> ${GITHUB_OUTPUT}
Expand All @@ -47,7 +53,7 @@ jobs:
uses: opensciencegrid/build-container-action@HEAD
with:
registry_url: hub.opensciencegrid.org
osg_series: ${{ matrix.osg_series }}
osg_series: ${{ matrix.osg_series.series }}
osg_repo: ${{ matrix.repo }}
base_os: ${{ matrix.os }}
platform: ${{ matrix.platform }}
Expand Down Expand Up @@ -101,14 +107,14 @@ jobs:
if: >-
github.ref == 'refs/heads/master' &&
github.event_name != 'pull_request' &&
github.repository_owner == 'opensciencegrid'
contains(fromJson('["opensciencegrid","osg-htc"]'), github.repository_owner)
name: Upload By Digest to Harbor
uses: ./.github/actions/push-digest-local
with:
registry: hub.opensciencegrid.org
username: ${{ secrets.OSG_HARBOR_ROBOT_USER }}
password: ${{ secrets.OSG_HARBOR_ROBOT_PASSWORD }}
osg_series: ${{ matrix.osg_series }}
osg_series: ${{ matrix.osg_series.series }}
osg_repo: ${{ matrix.repo }}
base_os: ${{ matrix.os }}
platform: ${{ matrix.platform }}
Expand All @@ -121,10 +127,13 @@ jobs:
# some arch fails. Handling this scenario is future work:
# https://opensciencegrid.atlassian.net/browse/SOFTWARE-6010
- id: upload-by-digest-dockerhub
# TODO support the osg-htc organization on dockerhub
if: >-
github.ref == 'refs/heads/master' &&
github.event_name != 'pull_request' &&
github.repository_owner == 'opensciencegrid'
contains(fromJson('["opensciencegrid","osg-htc"]'), github.repository_owner) &&
startsWith(matrix.osg_series.image, 'opensciencegrid')
name: Upload By Digest to Docker Hub
uses: ./.github/actions/push-digest-local
with:
Expand All @@ -144,15 +153,15 @@ jobs:
if: >-
github.ref == 'refs/heads/master' &&
github.event_name != 'pull_request' &&
github.repository_owner == 'opensciencegrid'
contains(fromJson('["opensciencegrid","osg-htc"]'), github.repository_owner)
needs:
- build-images
strategy:
fail-fast: false
matrix:
os: ['el9', 'cuda_11_8_0']
osg_series: ['23']
repo: ['development', 'testing', 'release']
osg_series: ['23', '24']
registry: [
{
url: hub.opensciencegrid.org,
Expand Down Expand Up @@ -222,10 +231,10 @@ jobs:
env:
DEFAULT_OS: el9
run: |
BASE_IMG=${{ matrix.registry.url }}/opensciencegrid/osgvo-docker-pilot
DIGESTS=$(for digest in $(ls digests/); do echo $BASE_IMG@sha256:$digest; done)
TAGS=$(cat tags/*-amd64)
for tag in ${TAGS//,/ }; do
BASE_IMG=${tag/:*/}
DIGESTS=$(for digest in $(ls digests/); do echo $BASE_IMG@sha256:$digest; done)
docker buildx imagetools create --tag $tag $DIGESTS;
# Also tag the image for the default OS as the OS-less tag
Expand Down

0 comments on commit 9aa7b84

Please sign in to comment.