ci: Bring back support for Linux ARMv7 platform

This commit is contained in:
Carlos Álvaro
2020-10-18 10:40:33 +02:00
parent 0702715f52
commit f319d00adf
4 changed files with 25 additions and 17 deletions

View File

@@ -46,7 +46,7 @@ jobs:
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/arm/v7
cache-from: |
type=local,src=${{ env.CACHE_PATH }}
ghcr.io/cdalvaro/docker-salt-master:latest
@@ -69,7 +69,7 @@ jobs:
needs: build
strategy:
matrix:
platform: [linux/amd64, linux/arm64]
platform: [linux/amd64, linux/arm64, linux/arm/v7]
env:
DOCKER_CLI_EXPERIMENTAL: enabled
SALTAPI_URL: https://localhost:8000/

View File

@@ -14,7 +14,7 @@ on:
env:
GITHUB_REF_NAME: ${{ github.event.release.tag_name }}
IMAGE_NAME: cdalvaro/docker-salt-master
PLATFORMS: linux/amd64,linux/arm64
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
CACHE_PATH: /tmp/.buildx-docker-salt-master-cache
EXTRA_REGISTRIES: ghcr.io quay.io

View File

@@ -5,6 +5,7 @@ Please refer to the SaltStack [Release Notes](https://docs.saltstack.com/en/late
**3002**
- Bring back support for Linux ARMv7 platform
- Remove patch for muting sudo `RLIMIT_CORE` message
- Install `pygit2` and `m2crypto` from ubuntu repositories
- Change Docker base image to `ubuntu:focal-20200925`

View File

@@ -4,16 +4,16 @@ set -e
source "${SALT_BUILD_DIR}/functions.sh"
# Install build dependencies
echo "Installing dependencies ..."
BUILD_DEPENDENCIES=(
cmake gcc g++ make \
libhttp-parser-dev libssl-dev zlib1g-dev \
libcurl4-openssl-dev libffi-dev swig \
)
echo "Updating repositories ..."
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends "${BUILD_DEPENDENCIES[@]}"
# Install arm build dependencies
if [[ "$(uname -i)" =~ ^(arm|aarch64) ]]; then
echo "Installing arm dependencies ..."
DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
make gcc g++ cmake libzmq3-dev \
libhttp-parser-dev libssl-dev libcurl4-openssl-dev
fi
# Create salt user
echo "Creating ${SALT_USER} user ..."
@@ -27,9 +27,9 @@ EOF
# Install python3 packages
echo "Installing python3 packages ..."
DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
python3-mako python3-pycryptodome python3-cherrypy3 python3-git python3-u-msgpack \
python3-redis python3-gnupg python3-mysqldb python3-dateutil python3-libnacl python3-openssl \
python3-pygit2 python3-m2crypto
python3-mako python3-pycryptodome python3-cherrypy3 python3-git python3-u-msgpack \
python3-redis python3-gnupg python3-mysqldb python3-dateutil python3-libnacl python3-openssl \
python3-pygit2 python3-m2crypto
# Bootstrap script options:
# https://docs.saltstack.com/en/latest/topics/tutorials/salt_bootstrap.html#command-line-options
@@ -41,10 +41,17 @@ python3-pygit2 python3-m2crypto
## -p: Extra-package to install
## -x: Changes the python version used to install a git version of salt
SALT_BOOTSTRAP_OPTS=( -M -N -X -d -P -p salt-api -p salt-call -x "python${PYTHON_VERSION}" )
_WGET_ARGS=()
if [[ "$(uname -i)" == 'armv7l' ]]; then
## -I: allow insecure connections while downloading any files
SALT_BOOTSTRAP_OPTS+=( -I )
_WGET_ARGS+=( --no-check-certificate )
fi
echo "Installing saltstack ..."
echo "Option: ${SALT_BOOTSTRAP_OPTS[@]}"
wget -O bootstrap-salt.sh https://bootstrap.saltstack.com
wget ${_WGET_ARGS[@]} -O bootstrap-salt.sh https://bootstrap.saltstack.com
sh bootstrap-salt.sh ${SALT_BOOTSTRAP_OPTS[@]} git "v${SALT_VERSION}"
chown -R "${SALT_USER}": "${SALT_ROOT_DIR}"
@@ -97,6 +104,6 @@ stdout_logfile=${SALT_LOGS_DIR}/supervisor/%(program_name)s.log
stderr_logfile=${SALT_LOGS_DIR}/supervisor/%(program_name)s.log
EOF
# purge build dependencies and cleanup apt
# Purge build dependencies and cleanup apt
DEBIAN_FRONTEND=noninteractive apt-get clean --yes
rm -rf /var/lib/apt/lists/*