Skip to content

Commit

Permalink
Treat CI images as differently
Browse files Browse the repository at this point in the history
Create the CI images in different job units to work around image size
issues.
  • Loading branch information
bryteise committed Jun 14, 2024
1 parent 13117a3 commit 5a0a2fb
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 7 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,44 @@ env:
GITHUB_TOKEN: ${{ github.token }}

jobs:
clr-installer-ci:
if: (github.event_name == 'create' && github.event.ref_type == 'tag')
name: Release
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Delete unused tools folder
run: rm -rf /opt/hostedtoolcache
- name: Code Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
run: ./build-and-push-images.sh ${{ github.event.ref }} clr-installer-ci
mixer-ci:
if: (github.event_name == 'create' && github.event.ref_type == 'tag')
name: Release
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Delete unused tools folder
run: rm -rf /opt/hostedtoolcache
- name: Code Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
run: ./build-and-push-images.sh ${{ github.event.ref }} mixer-ci
release:
if: (github.event_name == 'create' && github.event.ref_type == 'tag')
name: Release
Expand Down
12 changes: 8 additions & 4 deletions build-and-push-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@ build_and_push_image() {
main() {
local ver="$1"
build_and_push_image os-core "${ver}"
build_and_push_image clr-installer-ci "${ver}"
# httpd is used by cgit so it must be pushed first
# httpd is used by cgit so it must be pushed first
build_and_push_image httpd "${ver}"
build_and_push_image cgit "${ver}"
build_and_push_image golang "${ver}"
build_and_push_image haproxy "${ver}"
build_and_push_image iperf "${ver}"
build_and_push_image mariadb "${ver}"
build_and_push_image memcached "${ver}"
build_and_push_image mixer-ci "${ver}"
build_and_push_image nginx "${ver}"
build_and_push_image node "${ver}"
build_and_push_image numpy-mp "${ver}"
Expand All @@ -51,4 +49,10 @@ main() {
build_and_push_image tesseract-ocr "${ver}"
}

main $1
if [ "$2" == "clr-installer-ci" ]; then
build_and_push_image clr-installer-ci "$1"
elif [ "$2" == "mixer-ci" ]; then
build_and_push_image mixer-ci "$1"
else
main $1
fi
3 changes: 2 additions & 1 deletion clr-installer-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM clearlinux:latest
ARG clear_ver

# Configure Go
ENV GOPATH="/go" PATH="/go/bin:${PATH}"

# Update and add bundles
RUN swupd update && \
RUN swupd update -V $clear_ver && \
swupd bundle-add sysadmin-basic storage-utils network-basic go-basic-dev devpkg-gtk3 clr-installer-gui && \
swupd clean && \
# Install the Go Linters
Expand Down
4 changes: 2 additions & 2 deletions mixer-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM clearlinux:latest
ARG clear_ver

# Configure Go
ENV GOPATH /home/clr/go
ENV PATH="/home/clr/go/bin:${PATH}"

# Update and add bundles
RUN swupd update && \
RUN swupd update -V $clear_ver && \
swupd bundle-add mixer go-basic c-basic os-core-update-dev sudo && \
useradd -G wheelnopw clr && \
mkdir -p /run/lock
USER clr
RUN git config --global user.email "[email protected]" && \
git config --global user.name "Travis CI"

0 comments on commit 5a0a2fb

Please sign in to comment.