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

Automate Docker images build & push #3

Merged
merged 1 commit into from
May 28, 2024
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
38 changes: 38 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and publish Docker images

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build-and-publish:
runs-on: ubuntu-latest
strategy:
matrix:
pair:
- { dir: 'dns', tag: 'dns' }
- { dir: 'krb5kdc', tag: 'kdc-centos-default' }
- { dir: 'krb5kdc-latest', tag: 'kdc-latest' }
- { dir: 'krb5kdc-older', tag: 'kdc-older' }
- { dir: 'krb5kdc-res', tag: 'kdc-resdom' }
- { dir: 'krb5kdc-shorttickets', tag: 'kdc-shorttickets' }
- { dir: 'krb5kdc-sub', tag: 'kdc-sub' }
- { dir: 'krbhttp', tag: 'http' }
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t ghcr.io/grafana/gokrb5-test:${{ matrix.pair.tag }} testenv/docker/${{ matrix.pair.dir }}
- name: Log in to GitHub Container Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push Docker image
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
docker push ghcr.io/grafana/gokrb5-test:${{ matrix.pair.tag }}
joanlopez marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion testenv/docker/krb5kdc-older/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN yum install -y \

ADD krb5-1.6.3.tar.gz /tmp
RUN cd /tmp/krb5-1.6.3/src && \
./configure && make && make install
./configure && make CFLAGS="-fgnu89-inline" && make install
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the inlining/duplication issue with recent versions of gcc compiler:
👉🏻 https://bugzilla.redhat.com/show_bug.cgi?id=547153


ADD krb5.conf /etc/krb5.conf
ADD kdc.conf /usr/local/var/krb5kdc/kdc.conf
Expand Down
1 change: 0 additions & 1 deletion testenv/docker/krbhttp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ RUN cd /etc/yum.repos.d/ \

RUN yum install -y \
httpd \
mod_auth_kerb \
Copy link
Collaborator Author

@joanlopez joanlopez May 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory with mod_auth_gssapi should be enough
👉🏻 https://projects.theforeman.org/issues/32352

mod_auth_gssapi \
mod_session \
mod_ssl \
Expand Down