Skip to content

Commit

Permalink
Added workflows to build and push images for CLP core's dependencies …
Browse files Browse the repository at this point in the history
…and CLP's execution environment (#14)
  • Loading branch information
Naman Gulati authored Oct 13, 2021
1 parent e3c302a commit 134416a
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/clp-dependency-image-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Publish Image with Dependencies to Build CLP Core

on:
push:
branches: ['main']
paths:
- 'components/core/tools/docker-images/clp-env-base-focal/**'
- 'components/core/tools/scripts/lib_install/**'
- '.github/workflows/clp-dependency-image-build.yaml'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{github.repository}}/clp-core-dependencies-x86-ubuntu-focal

jobs:
build:
runs-on: ubuntu-20.04
name: Build Image
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v2
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: components/core/
file: components/core/tools/docker-images/clp-env-base-focal/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
43 changes: 43 additions & 0 deletions .github/workflows/clp-execution-image-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Publish Image with Execution Dependencies

on:
push:
branches: ['main']
paths:
- 'components/core/tools/docker-images/clp-execution-base-focal/**'
- 'components/core/tools/scripts/lib_install/**'
- '.github/workflows/clp-execution-image-build.yaml'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{github.repository}}/clp-execution-x86-ubuntu-focal

jobs:
build:
runs-on: ubuntu-20.04
name: Build Image
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v2
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: ./
file: ./tools/docker-images/clp-execution-base-focal/Dockerfile
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ directory:
* [package-template](components/package-template) contains the base directory structure and files of the
CLP package.

## Packages
The packages held by this [repository](https://github.com/orgs/y-scope/packages?repo_name=clp) are:

1. Docker Image `clp/clp-core-dependencies-x86-ubuntu-focal`
- A docker image containing all the necessary dependencies to build CLP core in an x86 environment
2. Docker Image `clp/clp-execution-x86-ubuntu-focal`
- A docker image containing all the necessary dependencies to run the full CLP package in an x86 environment

## Next Steps

This is our open-source release which we will be constantly updating with bug fixes, features, etc.
Expand Down
10 changes: 10 additions & 0 deletions tools/docker-images/clp-execution-base-focal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ubuntu:focal

RUN mkdir -p /root/tools/docker-images/clp-execution-base-focal
ADD ./tools/docker-images/clp-execution-base-focal/setup-scripts /root/tools/docker-images/clp-execution-base-focal/setup-scripts

RUN mkdir -p /root/tools/scripts/lib_install
ADD ./components/core/tools/scripts/lib_install /root/tools/scripts/lib_install

RUN cd /root && ./tools/docker-images/clp-execution-base-focal/setup-scripts/install-prebuilt-packages.sh
RUN cd /root && ./tools/docker-images/clp-execution-base-focal/setup-scripts/install-packages-from-source.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

./tools/scripts/lib_install/mariadb-connector-c.sh 3.2.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y checkinstall \
rabbitmq-server \
rsync \
wget

0 comments on commit 134416a

Please sign in to comment.