Make variable names consistent

pull/3/head
Stefano Ortolani 2023-12-08 08:45:49 +00:00
parent a861906dcf
commit fffaa51572
5 changed files with 21 additions and 21 deletions

View File

@ -86,4 +86,4 @@ New options are added on a regular basis.
A GitHub Action builds both `misp-core` and `misp-modules` images automatically and pushes them to the [GitHub Package registry](https://github.com/orgs/MISP/packages). We do not use tags inside the repository; instead we tag images as they are pushed to the registry. For each build, `misp-core` and `misp-modules` images are tagged as follows:
- `misp-core:${commit-sha1}[0:7]` and `misp-modules:${commit-sha1}[0:7]` where `${commit-sha1}` is the commit hash triggering the build
- `misp-core:latest` and `misp-modules:latest` in order to track the latest builds available
- `misp-core:${MISP_TAG}` and `misp-modules:${MODULES_TAG}` reflecting the underlying version of MISP and MISP modules (as specified inside the `template.env` file at build time)
- `misp-core:${CORE_TAG}` and `misp-modules:${MODULES_TAG}` reflecting the underlying version of MISP and MISP modules (as specified inside the `template.env` file at build time)

View File

@ -3,8 +3,8 @@ ARG DOCKER_HUB_PROXY=""
FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as composer-build
ENV DEBIAN_FRONTEND noninteractive
ENV COMPOSER_ALLOW_SUPERUSER 1
ARG MISP_TAG
ARG MISP_COMMIT
ARG CORE_TAG
ARG CORE_COMMIT
RUN apt-get update; apt-get install -y --no-install-recommends \
ca-certificates \
@ -24,7 +24,7 @@ FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as composer-build
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
ADD https://raw.githubusercontent.com/MISP/MISP/${MISP_COMMIT:-${MISP_TAG}}/app/composer.json /tmp
ADD https://raw.githubusercontent.com/MISP/MISP/${CORE_COMMIT:-${CORE_TAG}}/app/composer.json /tmp
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN composer config --no-interaction allow-plugins.composer/installers true
RUN composer install
@ -64,8 +64,8 @@ FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as php-build
FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as python-build
ENV DEBIAN_FRONTEND noninteractive
ARG MISP_TAG
ARG MISP_COMMIT
ARG CORE_TAG
ARG CORE_COMMIT
ARG PYPI_REDIS_VERSION
ARG PYPI_LIEF_VERSION
ARG PYPI_PYDEEP2_VERSION
@ -83,10 +83,10 @@ FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as python-build
# Download MISP using git in the /var/www/ directory. Remove unnecessary items.
RUN <<-EOF
if [ ! -z "${MISP_COMMIT}" ]; then
git clone https://github.com/MISP/MISP.git /var/www/MISP && cd /var/www/MISP && git checkout "${MISP_COMMIT}"
if [ ! -z "${CORE_COMMIT}" ]; then
git clone https://github.com/MISP/MISP.git /var/www/MISP && cd /var/www/MISP && git checkout "${CORE_COMMIT}"
else
git clone --branch "${MISP_TAG}" --depth 1 https://github.com/MISP/MISP.git /var/www/MISP
git clone --branch "${CORE_TAG}" --depth 1 https://github.com/MISP/MISP.git /var/www/MISP
fi
cd /var/www/MISP || exit; git submodule update --init --recursive .
@ -135,8 +135,8 @@ EOF
FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim"
ENV DEBIAN_FRONTEND noninteractive
ARG MISP_TAG
ARG MISP_COMMIT
ARG CORE_TAG
ARG CORE_COMMIT
ARG PHP_VER
RUN apt-get update; apt-get install -y --no-install-recommends \

View File

@ -58,11 +58,11 @@ variable "LIBFAUP_COMMIT" {
default = ""
}
variable "MISP_TAG" {
variable "CORE_TAG" {
default = ""
}
variable "MISP_COMMIT" {
variable "CORE_COMMIT" {
default = ""
}
@ -92,10 +92,10 @@ target "misp-modules" {
target "misp-core" {
context = "core/."
dockerfile = "Dockerfile"
tags = flatten(["${NAMESPACE}/misp-core:latest", "${NAMESPACE}/misp-core:${COMMIT_HASH}", MISP_TAG != "" ? ["${NAMESPACE}/misp-core:${MISP_TAG}"] : []])
tags = flatten(["${NAMESPACE}/misp-core:latest", "${NAMESPACE}/misp-core:${COMMIT_HASH}", CORE_TAG != "" ? ["${NAMESPACE}/misp-core:${CORE_TAG}"] : []])
args = {
"MISP_TAG": "${MISP_TAG}",
"MISP_COMMIT": "${MISP_COMMIT}",
"CORE_TAG": "${CORE_TAG}",
"CORE_COMMIT": "${CORE_COMMIT}",
"PHP_VER": "${PHP_VER}",
"PYPI_REDIS_VERSION": "${PYPI_REDIS_VERSION}",
"PYPI_LIEF_VERSION": "${PYPI_LIEF_VERSION}",

View File

@ -33,8 +33,8 @@ services:
build:
context: core/.
args:
- MISP_TAG=${MISP_TAG}
- MISP_COMMIT=${MISP_COMMIT}
- CORE_TAG=${CORE_TAG}
- CORE_COMMIT=${CORE_COMMIT}
- PHP_VER=${PHP_VER}
- PYPI_REDIS_VERSION=${PYPI_REDIS_VERSION}
- PYPI_LIEF_VERSION=${PYPI_LIEF_VERSION}

View File

@ -2,7 +2,7 @@
# Build-time variables
##
MISP_TAG=v2.4.181
CORE_TAG=v2.4.181
MODULES_TAG=v2.4.179
PHP_VER=20190902
LIBFAUP_COMMIT=3a26d0a
@ -18,8 +18,8 @@ LIBFAUP_COMMIT=3a26d0a
# PYPI_CYBOX_VERSION="==2.1.*"
# PYPI_PYMISP_VERSION="==2.4.178"
# MISP_COMMIT takes precedence over MISP_TAG
# MISP_COMMIT=c56d537
# CORE_COMMIT takes precedence over CORE_TAG
# CORE_COMMIT=c56d537
# MODULES_COMMIT takes precedence over MODULES_TAG
# MODULES_COMMIT=de69ae3