Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYSTEMDS-3271] Publish docker test image when requested #1502

Merged
merged 1 commit into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions .github/workflows/docker-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,27 @@ name: Docker Image CI and CD

on:
schedule:
- cron: '30 1 * * *' # everyday at 1:30 PM UTC
cron: '30 1 * * *' # everyday at 1:30 PM UTC
paths-ignore:
- 'docs/**'
- '*.md'
- '*.html'
- 'src/test/**'
- 'src/assembly/**'
- 'dev/**'
workflow_dispatch:


jobs:

build:
build-nightly:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image-pattern: nightly
docker-file: sysds.Dockerfile
include:
- image-pattern: python-nightly
docker-file: pythonsysds.Dockerfile

steps:
- name: Checkout
Expand All @@ -43,28 +56,14 @@ jobs:
with:
images: apache/systemds
tags: |
type=schedule,pattern=nightly
type=schedule,pattern=${{image-pattern}}

# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

## Uncomment the following to inspect buildx build
#
# - name: Inspect builder
# run: |
# echo "Name: ${{ steps.buildx.outputs.name }}"
# echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
# echo "Status: ${{ steps.buildx.outputs.status }}"
# echo "Flags: ${{ steps.buildx.outputs.flags }}"
# echo "Platforms: ${{ steps.buildx.outputs.platforms }}"

# IMPORTANT: The credentials should not be available via the
# Pull request, hence this if condition here.
# github.event_name != 'pull_request'
- name: Login to DockerHub
# if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
Expand All @@ -76,7 +75,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/sysds.Dockerfile
file: ./docker/${{docker-file}}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/docker-testImage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#-------------------------------------------------------------
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#-------------------------------------------------------------


name: Docker Image CI and CD

# This job only tricker if requested in github.
on:
workflow_dispatch:

jobs:
build-test-image:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image-pattern: testing-latest
docker-file: testsysds.Dockerfile

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Configure Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: apache/systemds
tags: |
type=schedule,pattern=${{image-pattern}}

# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# https://github.com/docker/build-push-action
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/${{docker-file}}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}