Skip to content

Commit

Permalink
ci: create pipeline to generate CI images to ghcr.io
Browse files Browse the repository at this point in the history
Note that this commit changes naming of Dockerfiles and no longer
ignores the generated Dockerfiles.

This is part of #2271
  • Loading branch information
flavorjones committed Aug 13, 2021
1 parent f4bb69e commit c12b06d
Show file tree
Hide file tree
Showing 16 changed files with 399 additions and 15 deletions.
105 changes: 105 additions & 0 deletions .github/workflows/generate-ci-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# DO NOT EDIT
# this file is automatically generated by the "docker:pipeline" rake task
name: Generate CI Images
on:
workflow_dispatch: {}
schedule:
- cron: "0 5 * * 3" # At 05:00 on Wednesday # https://crontab.guru/#0_5_*_*_3
# reference: https://github.com/marketplace/actions/build-and-push-docker-images
jobs:
alpine:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
id: docker_build
with:
push: true
tags: ghcr.io/sparklemotion/nokogiri-test:alpine
file: oci-images/nokogiri-test/alpine.dockerfile
- name: Log the image digest
run: echo ${{steps.docker_build.outputs.digest}}
bionic:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
id: docker_build
with:
push: true
tags: ghcr.io/sparklemotion/nokogiri-test:bionic
file: oci-images/nokogiri-test/bionic.dockerfile
- name: Log the image digest
run: echo ${{steps.docker_build.outputs.digest}}
bionic32:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
id: docker_build
with:
push: true
tags: ghcr.io/sparklemotion/nokogiri-test:bionic32
file: oci-images/nokogiri-test/bionic32.dockerfile
- name: Log the image digest
run: echo ${{steps.docker_build.outputs.digest}}
mri_2_5:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
id: docker_build
with:
push: true
tags: ghcr.io/sparklemotion/nokogiri-test:mri-2.5
file: oci-images/nokogiri-test/mri-2.5.dockerfile
- name: Log the image digest
run: echo ${{steps.docker_build.outputs.digest}}
mri_2_6:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
id: docker_build
with:
push: true
tags: ghcr.io/sparklemotion/nokogiri-test:mri-2.6
file: oci-images/nokogiri-test/mri-2.6.dockerfile
- name: Log the image digest
run: echo ${{steps.docker_build.outputs.digest}}
mri_2_7:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
id: docker_build
with:
push: true
tags: ghcr.io/sparklemotion/nokogiri-test:mri-2.7
file: oci-images/nokogiri-test/mri-2.7.dockerfile
- name: Log the image digest
run: echo ${{steps.docker_build.outputs.digest}}
mri_3_0:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
id: docker_build
with:
push: true
tags: ghcr.io/sparklemotion/nokogiri-test:mri-3.0
file: oci-images/nokogiri-test/mri-3.0.dockerfile
- name: Log the image digest
run: echo ${{steps.docker_build.outputs.digest}}
truffle_nightly:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
id: docker_build
with:
push: true
tags: ghcr.io/sparklemotion/nokogiri-test:truffle-nightly
file: oci-images/nokogiri-test/truffle-nightly.dockerfile
- name: Log the image digest
run: echo ${{steps.docker_build.outputs.digest}}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
/ports/
/tmp/

# containers for testing
/oci-images/nokogiri-test/*.generated

# code coverage
/coverage/

Expand Down
21 changes: 21 additions & 0 deletions oci-images/nokogiri-test/alpine.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ruby:alpine3.12

# prelude
RUN apk update
RUN apk add bash build-base

# valgrind
RUN apk add valgrind

# libxml-et-al
RUN apk add libxml2-dev libxslt-dev pkgconfig

# -*- dockerfile -*-

COPY Gemfile nokogiri/
COPY Gemfile.lock nokogiri/
COPY nokogiri.gemspec nokogiri/

RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" nokogiri/Gemfile.lock | tail -n 1)"
RUN cd nokogiri && bundle install

File renamed without changes.
28 changes: 28 additions & 0 deletions oci-images/nokogiri-test/bionic.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM ubuntu:bionic

# -*- dockerfile -*-

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y apt-utils


# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config


# -*- dockerfile -*-

RUN apt-get install -y ruby ruby-dev bundler


# -*- dockerfile -*-

COPY Gemfile nokogiri/
COPY Gemfile.lock nokogiri/
COPY nokogiri.gemspec nokogiri/

RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" nokogiri/Gemfile.lock | tail -n 1)"
RUN cd nokogiri && bundle install

File renamed without changes.
28 changes: 28 additions & 0 deletions oci-images/nokogiri-test/bionic32.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM i386/ubuntu:bionic

# -*- dockerfile -*-

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y apt-utils


# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config


# -*- dockerfile -*-

RUN apt-get install -y ruby ruby-dev bundler


# -*- dockerfile -*-

COPY Gemfile nokogiri/
COPY Gemfile.lock nokogiri/
COPY nokogiri.gemspec nokogiri/

RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" nokogiri/Gemfile.lock | tail -n 1)"
RUN cd nokogiri && bundle install

File renamed without changes.
33 changes: 33 additions & 0 deletions oci-images/nokogiri-test/mri-2.5.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ruby:2.5

# -*- dockerfile -*-

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y apt-utils


# -*- dockerfile -*-

RUN apt-get install -y valgrind


# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config


# -*- dockerfile -*-

RUN gem install bundler


# -*- dockerfile -*-

COPY Gemfile nokogiri/
COPY Gemfile.lock nokogiri/
COPY nokogiri.gemspec nokogiri/

RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" nokogiri/Gemfile.lock | tail -n 1)"
RUN cd nokogiri && bundle install

33 changes: 33 additions & 0 deletions oci-images/nokogiri-test/mri-2.6.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ruby:2.6

# -*- dockerfile -*-

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y apt-utils


# -*- dockerfile -*-

RUN apt-get install -y valgrind


# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config


# -*- dockerfile -*-

RUN gem install bundler


# -*- dockerfile -*-

COPY Gemfile nokogiri/
COPY Gemfile.lock nokogiri/
COPY nokogiri.gemspec nokogiri/

RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" nokogiri/Gemfile.lock | tail -n 1)"
RUN cd nokogiri && bundle install

33 changes: 33 additions & 0 deletions oci-images/nokogiri-test/mri-2.7.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ruby:2.7

# -*- dockerfile -*-

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y apt-utils


# -*- dockerfile -*-

RUN apt-get install -y valgrind


# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config


# -*- dockerfile -*-

RUN gem install bundler


# -*- dockerfile -*-

COPY Gemfile nokogiri/
COPY Gemfile.lock nokogiri/
COPY nokogiri.gemspec nokogiri/

RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" nokogiri/Gemfile.lock | tail -n 1)"
RUN cd nokogiri && bundle install

33 changes: 33 additions & 0 deletions oci-images/nokogiri-test/mri-3.0.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ruby:3.0

# -*- dockerfile -*-

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y apt-utils


# -*- dockerfile -*-

RUN apt-get install -y valgrind


# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config


# -*- dockerfile -*-

RUN gem install bundler


# -*- dockerfile -*-

COPY Gemfile nokogiri/
COPY Gemfile.lock nokogiri/
COPY nokogiri.gemspec nokogiri/

RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" nokogiri/Gemfile.lock | tail -n 1)"
RUN cd nokogiri && bundle install

File renamed without changes.
33 changes: 33 additions & 0 deletions oci-images/nokogiri-test/truffle-nightly.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM flavorjones/truffleruby:nightly

# -*- dockerfile -*-

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y apt-utils


# -*- dockerfile -*-

RUN apt-get install -y valgrind


# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config


# -*- dockerfile -*-

RUN gem install bundler


# -*- dockerfile -*-

COPY Gemfile nokogiri/
COPY Gemfile.lock nokogiri/
COPY nokogiri.gemspec nokogiri/

RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" nokogiri/Gemfile.lock | tail -n 1)"
RUN cd nokogiri && bundle install

File renamed without changes.

0 comments on commit c12b06d

Please sign in to comment.