Compare commits
No commits in common. "antifascista" and "master" have entirely different histories.
antifascis
...
master
|
@ -1,43 +1,29 @@
|
|||
steps:
|
||||
pipeline:
|
||||
publish:
|
||||
image: "gitea.nulo.in/sutty/gem-compiler:${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}"
|
||||
image: registry.nulo.in/sutty/containers-gem-compiler:${ALPINE_VERSION}
|
||||
pull: true
|
||||
commands:
|
||||
- "mkdir -p ~/.config/tea"
|
||||
- "echo -e \"$${TEA}\" > ~/.config/tea/config.yml"
|
||||
- "apk add --no-cache openssh-client"
|
||||
- "mkdir ~/.ssh/"
|
||||
- "echo \"[gitea.nulo.in]:993 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHgHIbf5/jkeyLMndnWlEO12DPj41YPqkmz+aIreVOsP\" >> ~/.ssh/known_hosts"
|
||||
- "eval $(ssh-agent -s)"
|
||||
- "echo \"$${SSH_KEY}\" | ssh-add -"
|
||||
- "git clone . ${ALPINE_VERSION}"
|
||||
- "cd ${ALPINE_VERSION}"
|
||||
- "git config pull.rebase false"
|
||||
- "git config user.name Woodpecker"
|
||||
- "git config user.email ci@nulo.in"
|
||||
- "git remote add nulo ssh://_gitea@gitea.nulo.in:993/Sutty/gems.git"
|
||||
- "git checkout -B ${CI_COMMIT_BRANCH}"
|
||||
- "bulk-compiler || true"
|
||||
- "git add built/ failed/ && git commit -m \"[skip ci] built gems\" || true"
|
||||
- "git pull nulo ${CI_COMMIT_BRANCH}"
|
||||
- "git push nulo ${CI_COMMIT_BRANCH}"
|
||||
- "! git show HEAD | grep -q failed/"
|
||||
- bulk-compiler
|
||||
- git add built/
|
||||
- git config user.name Woodpecker
|
||||
- git config user.email ci@nulo.in
|
||||
- git remote add nulo ssh://_gitea@nulo.in:420/Sutty/gems.git
|
||||
- git commit -m "[skip ci] built gems"
|
||||
- apk add --no-cache openssh-client
|
||||
- mkdir ~/.ssh/
|
||||
- echo '[nulo.in]:420 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHgHIbf5/jkeyLMndnWlEO12DPj41YPqkmz+aIreVOsP' >> ~/.ssh/known_hosts
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$${SSH_KEY}" | tr -d '\r' | ssh-add -
|
||||
- git push nulo ${WOODPECKER_BRANCH}
|
||||
secrets:
|
||||
- "HTTP_BASIC_USER"
|
||||
- "HTTP_BASIC_PASSWORD"
|
||||
- "SSH_KEY"
|
||||
- "TEA"
|
||||
- HTTP_BASIC_USER
|
||||
- HTTP_BASIC_PASSWORD
|
||||
- SSH_KEY
|
||||
when:
|
||||
branch: "antifascista"
|
||||
event: "push"
|
||||
branch: antifascista
|
||||
event: push
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- ALPINE_VERSION: "3.17.4"
|
||||
RUBY_VERSION: "3.1"
|
||||
RUBY_PATCH: "4"
|
||||
- ALPINE_VERSION: "3.18.2"
|
||||
RUBY_VERSION: "3.2"
|
||||
RUBY_PATCH: "2"
|
||||
- ALPINE_VERSION: "3.14.10"
|
||||
RUBY_VERSION: "2.7"
|
||||
RUBY_PATCH: "8"
|
||||
ALPINE_VERSION:
|
||||
- 3.13.6
|
||||
# - 3.14.2
|
||||
|
|
35
Makefile
35
Makefile
|
@ -1,17 +1,40 @@
|
|||
SHELL := bash
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
.env:
|
||||
cp .env.example $@
|
||||
include .env
|
||||
|
||||
ccache_dir ?= $(HOME)/.ccache
|
||||
gem_dir := .
|
||||
gem_cache_dir := $(gem_dir)/cache
|
||||
gem_binary_dir := $(gem_dir)/gems/$(ALPINE_VERSION)
|
||||
|
||||
help: always ## Ayuda
|
||||
@grep "^[^\t]\+:.*##" Makefile | sed -re "s/(.*):.*##(.*)/\1;\2/" | column -s ";" -t | sed -re "s/^([^ ]+) /\x1B[38;5;197m\1\x1B[0m/"
|
||||
|
||||
%: ## Agrega la gema a la cola de compilación (make puma v=5.3.0)
|
||||
%: ## Compila la gema (make puma v=5.3.0)
|
||||
@test -n "$v" || echo "Falta la versión en el argumento v=" ; :
|
||||
@test -n "$v" || exit 1
|
||||
install -dm 755 build/$@
|
||||
touch build/$@/$(v)
|
||||
git add build/$@/$(v) && git commit build/$@/$(v) -m "$@: $v" ; :
|
||||
$(MAKE) $(gem_binary_dir)/$@-$(v)-x86_64-linux-musl.gem
|
||||
|
||||
missing:
|
||||
@comm -23 <(find build/ -type f | grep -v /.keep | cut -d / -f 2- | sort) <(find built/ -type f | grep -v /.keep | cut -d / -f 3- | sort)
|
||||
# Compila la gema si no existe
|
||||
$(gem_binary_dir)/%-x86_64-linux-musl.gem:
|
||||
@echo "Compilando $*"
|
||||
@test -n "$(HTTP_BASIC_USER)" || echo "Agrega las credenciales en el archivo .env" ; :
|
||||
@test -n "$(HTTP_BASIC_USER)" || exit 1
|
||||
@test -n "$(HTTP_BASIC_PASSWORD)" || echo "Agrega las credenciales en el archivo .env" ; :
|
||||
@test -n "$(HTTP_BASIC_PASSWORD)" || exit 1
|
||||
@echo "$(PATH)" | grep -q ccache || "Instala ccache para acelerar la compilación"
|
||||
@docker run \
|
||||
-v $(shell realpath "$(gem_dir)"):/srv/gems \
|
||||
-v $(shell realpath "$(ccache_dir)"):/home/builder/.ccache \
|
||||
-e HTTP_BASIC_USER="$(HTTP_BASIC_USER)" \
|
||||
-e HTTP_BASIC_PASSWORD="$(HTTP_BASIC_PASSWORD)" \
|
||||
-e GEM=$(shell echo $(notdir $*) | sed -re "s/-[^-]+$$//") \
|
||||
-e VERSION=$(shell echo $(notdir $*) | sed -re "s/.*-([^-]+)$$/\1/") \
|
||||
-e JOBS=$(shell grep processor /proc/cpuinfo | wc -l) \
|
||||
--rm -it \
|
||||
sutty/gem-compiler:latest || echo "No se pudo compilar $*"
|
||||
|
||||
.PHONY: always
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue