ci: Bring back support for Linux ARMv7 platform
This commit is contained in:
4
.github/workflows/build-and-test.yml
vendored
4
.github/workflows/build-and-test.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
cache-from: |
|
cache-from: |
|
||||||
type=local,src=${{ env.CACHE_PATH }}
|
type=local,src=${{ env.CACHE_PATH }}
|
||||||
ghcr.io/cdalvaro/docker-salt-master:latest
|
ghcr.io/cdalvaro/docker-salt-master:latest
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [linux/amd64, linux/arm64]
|
platform: [linux/amd64, linux/arm64, linux/arm/v7]
|
||||||
env:
|
env:
|
||||||
DOCKER_CLI_EXPERIMENTAL: enabled
|
DOCKER_CLI_EXPERIMENTAL: enabled
|
||||||
SALTAPI_URL: https://localhost:8000/
|
SALTAPI_URL: https://localhost:8000/
|
||||||
|
|||||||
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -14,7 +14,7 @@ on:
|
|||||||
env:
|
env:
|
||||||
GITHUB_REF_NAME: ${{ github.event.release.tag_name }}
|
GITHUB_REF_NAME: ${{ github.event.release.tag_name }}
|
||||||
IMAGE_NAME: cdalvaro/docker-salt-master
|
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
|
CACHE_PATH: /tmp/.buildx-docker-salt-master-cache
|
||||||
EXTRA_REGISTRIES: ghcr.io quay.io
|
EXTRA_REGISTRIES: ghcr.io quay.io
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ Please refer to the SaltStack [Release Notes](https://docs.saltstack.com/en/late
|
|||||||
|
|
||||||
**3002**
|
**3002**
|
||||||
|
|
||||||
|
- Bring back support for Linux ARMv7 platform
|
||||||
- Remove patch for muting sudo `RLIMIT_CORE` message
|
- Remove patch for muting sudo `RLIMIT_CORE` message
|
||||||
- Install `pygit2` and `m2crypto` from ubuntu repositories
|
- Install `pygit2` and `m2crypto` from ubuntu repositories
|
||||||
- Change Docker base image to `ubuntu:focal-20200925`
|
- Change Docker base image to `ubuntu:focal-20200925`
|
||||||
|
|||||||
@@ -4,16 +4,16 @@ set -e
|
|||||||
|
|
||||||
source "${SALT_BUILD_DIR}/functions.sh"
|
source "${SALT_BUILD_DIR}/functions.sh"
|
||||||
|
|
||||||
# Install build dependencies
|
echo "Updating repositories ..."
|
||||||
echo "Installing dependencies ..."
|
|
||||||
BUILD_DEPENDENCIES=(
|
|
||||||
cmake gcc g++ make \
|
|
||||||
libhttp-parser-dev libssl-dev zlib1g-dev \
|
|
||||||
libcurl4-openssl-dev libffi-dev swig \
|
|
||||||
)
|
|
||||||
|
|
||||||
apt-get update
|
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
|
# Create salt user
|
||||||
echo "Creating ${SALT_USER} user ..."
|
echo "Creating ${SALT_USER} user ..."
|
||||||
@@ -27,9 +27,9 @@ EOF
|
|||||||
# Install python3 packages
|
# Install python3 packages
|
||||||
echo "Installing python3 packages ..."
|
echo "Installing python3 packages ..."
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
|
DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
|
||||||
python3-mako python3-pycryptodome python3-cherrypy3 python3-git python3-u-msgpack \
|
python3-mako python3-pycryptodome python3-cherrypy3 python3-git python3-u-msgpack \
|
||||||
python3-redis python3-gnupg python3-mysqldb python3-dateutil python3-libnacl python3-openssl \
|
python3-redis python3-gnupg python3-mysqldb python3-dateutil python3-libnacl python3-openssl \
|
||||||
python3-pygit2 python3-m2crypto
|
python3-pygit2 python3-m2crypto
|
||||||
|
|
||||||
# Bootstrap script options:
|
# Bootstrap script options:
|
||||||
# https://docs.saltstack.com/en/latest/topics/tutorials/salt_bootstrap.html#command-line-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
|
## -p: Extra-package to install
|
||||||
## -x: Changes the python version used to install a git version of salt
|
## -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}" )
|
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 "Installing saltstack ..."
|
||||||
echo "Option: ${SALT_BOOTSTRAP_OPTS[@]}"
|
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}"
|
sh bootstrap-salt.sh ${SALT_BOOTSTRAP_OPTS[@]} git "v${SALT_VERSION}"
|
||||||
chown -R "${SALT_USER}": "${SALT_ROOT_DIR}"
|
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
|
stderr_logfile=${SALT_LOGS_DIR}/supervisor/%(program_name)s.log
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# purge build dependencies and cleanup apt
|
# Purge build dependencies and cleanup apt
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get clean --yes
|
DEBIAN_FRONTEND=noninteractive apt-get clean --yes
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|||||||
Reference in New Issue
Block a user