Skip to content
Open
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
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
time: "03:00"
timezone: "America/New_York"
43 changes: 43 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: deploy

on:
push:
tags:
- '**'
env:
IMAGE_NAME: fastlanetools/ci

jobs:
docker:
runs-on: ubuntu-latest
environment: deploy
steps:
- uses: actions/checkout@v5

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}

- name: Build and push
uses: docker/build-push-action@v6
with:
sbom: true
push: true
provenance: mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: test

on:
pull_request:
push:
tags-ignore:
- '**'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: build
uses: docker/build-push-action@v6
with:
load: true
tags: fastlaneci:latest

- name: Test installed tools
run: |
set -e
docker run --rm fastlaneci:latest java -version
docker run --rm fastlaneci:latest python3 --version
docker run --rm fastlaneci:latest ruby --version
docker run --rm fastlaneci:latest node --version
docker run --rm fastlaneci:latest xar --version
docker run --rm fastlaneci:latest pip --version
docker run --rm fastlaneci:latest pipenv --version
docker run --rm fastlaneci:latest uv --version
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
69 changes: 34 additions & 35 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,66 +1,65 @@
FROM circleci/ruby:2.7-node
FROM cimg/ruby:3.3-node

ENV XAR_VERSION "2.0.0"
ENV XAR_VERSION="2.0.0"
USER root

# iTMSTransporter needs java installed
# We also have to install make to install xar
# And finally shellcheck
RUN echo 'deb http://archive.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/jessie-backports.list \
&& sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list \
&& apt-get -o Acquire::Check-Valid-Until=false update \
&& apt-get install --yes \
make \
shellcheck \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN apt-get install --yes libssl-dev
# Install dependencies for building Python and xar
# gcc/make/libssl-dev/zlib1g-dev are needed to build xar/python
# openjdk-21-jdk is needed for iTMSTransporter
# shellcheck for linting shell scripts
RUN apt-get update && apt-get install --yes \
gcc \
make \
shellcheck \
libssl-dev \
zlib1g-dev \
openjdk-21-jdk \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp

RUN ls

# Build xar
# Original download location https://github.com/downloads/mackyle/xar/xar-$XAR_VERSION.tar.gz
# Original: https://github.com/downloads/mackyle/xar/xar-$XAR_VERSION.tar.gz
# Now using a fastlane fork that supports OpenSSL 1.1.0
ADD https://github.com/fastlane/xar/archive/$XAR_VERSION.tar.gz .
RUN tar -xzf $XAR_VERSION.tar.gz \
&& mv xar-$XAR_VERSION/xar xar \
&& cd xar \
&& ./autogen.sh --noconfigure \
&& ./configure \
&& make

ENV PATH $PATH:/usr/local/itms/bin

# Java versions to be installed
ENV JAVA_VERSION 8u131
ENV JAVA_DEBIAN_VERSION 8u131-b11-1~bpo8+1
ENV CA_CERTIFICATES_JAVA_VERSION 20161107~bpo8+1
&& make

# Needed for fastlane to work
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8

# Required for iTMSTransporter to find Java
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jre
ENV PATH=$PATH:/usr/local/itms/bin
ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64/jre

# Install Python
ARG BUILDDIR="/tmp/build"
ARG PYTHON_VER="3.6.8"
ARG PYTHON_VER="3.8.13"
WORKDIR ${BUILDDIR}

RUN apt-get update -o Acquire::Check-Valid-Until=false -qq && \
apt-get -o Acquire::Check-Valid-Until=false upgrade -y > /dev/null 2>&1 && \
apt-get install wget gcc make zlib1g-dev -y -qq > /dev/null 2>&1 && \
wget --quiet https://www.python.org/ftp/python/${PYTHON_VER}/Python-${PYTHON_VER}.tgz > /dev/null 2>&1 && \
RUN wget --quiet https://www.python.org/ftp/python/${PYTHON_VER}/Python-${PYTHON_VER}.tgz > /dev/null 2>&1 && \
tar zxf Python-${PYTHON_VER}.tgz && \
cd Python-${PYTHON_VER} && \
./configure > /dev/null 2>&1 && \
make > /dev/null 2>&1 && \
make install > /dev/null 2>&1 && \
rm -rf ${BUILDDIR}
rm -rf ${BUILDDIR}

# Install uv
COPY --from=ghcr.io/astral-sh/uv:0.6.6 /uv /bin/uv
ENV UV_PYTHON_INSTALL_DIR=/opt/uv/python

# Install pip & pipenv
RUN wget --quiet https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py > /dev/null 2>&1 && \
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't uv supposed to replace pip?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I figured I needed both in meantime to do a few "hops" among fastlane/docs so everything didn't go at once.

python /tmp/get-pip.py && \
rm /tmp/get-pip.py && \
pip install pipenv

USER circleci

Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# fastlane-docker
_A `Dockerfile` that is used on _fastlane_'s CIs for testing _fastlane_ on a Linux system with all dependencies._

A `Dockerfile` that is used on _fastlane_'s CIs which is configured for Ruby 2.7, Python 3.6.8, and Java 8.
### Tools included

This is built to be used on a CI (primarly CircleCI) when needing to either test _fastlane_ on a Linux CI or test and deploy _fastlane_ docs using Linux. Using this `Dockerfile` is the most effecient way of using the required Ruby, Python, and Java versions for each build and keeping it consistent.
- Ruby 3.3
- Python 3.8.13
- Java 21
- NodeJS 20
- Xar (for .pkg creation)

## Places being used

- [fastlane/docs](https://github.com/fastlane/docs/blob/master/.circleci/config.yml)
- [fastlane/fastlane](https://github.com/fastlane/fastlane/blob/master/.circleci/config.yml)

## Publishing a new version
## Publishing

```
docker build -t fastlanetools/ci:x.y.z ./
docker push fastlanetools/ci:x.y.z
```
- Push a tag with the version you want to publish (`x.y.z`).