Compare commits

..

14 Commits

Author SHA1 Message Date
unkinben ad79c5e0eb Merge pull request 'feat: deploy terraform/terragrunt for alma9' (#7) from neoloc/terragrunt9 into master
Deploy / build (push) Successful in 9m21s
Reviewed-on: https://git.query.consul/unkin/docker-almalinux-buildrunner/pulls/7
2024-12-28 16:12:28 +11:00
unkinben b33491571b feat: deploy terraform/terragrunt for alma9
Build / build (pull_request) Successful in 2m26s
2024-12-28 14:57:29 +11:00
unkinben 5f4a01a781 Merge pull request 'feat: terraform builder' (#6) from neoloc/terraform into master
Deploy / build (push) Successful in 1m27s
Reviewed-on: https://git.query.consul/unkin/docker-almalinux-buildrunner/pulls/6
2024-12-28 14:41:59 +11:00
unkinben 3bfd67987c feat: terraform builder
Build / build (pull_request) Successful in 2m21s
- enable managing terraform jobs
2024-12-28 14:30:37 +11:00
unkinben d92a0ccceb Merge pull request 'feat: enable multirelease' (#5) from neoloc/multirelease into master
Deploy / build (push) Successful in 3m36s
Reviewed-on: https://git.query.consul/unkin/docker-almalinux-buildrunner/pulls/5
2024-12-20 20:31:55 +11:00
unkinben 0303429dbf feat: enable multirelease
Build / build (pull_request) Successful in 2m37s
- manage almalinux 8 and 9 deployments
2024-12-20 20:24:32 +11:00
unkinben 146b4d2808 Merge pull request 'feat: change to nfpm from rpms' (#4) from neoloc/nfpm_package into master
Deploy / build (push) Successful in 8s
Reviewed-on: https://git.query.consul/unkin/docker-almalinux-buildrunner/pulls/4
2024-12-02 22:22:19 +11:00
unkinben 3a0e93e18f feat: change to nfpm from rpms
Build / build (pull_request) Successful in 2m32s
- nfpm has been packaged and stored in unkin repo
2024-12-02 22:06:13 +11:00
unkinben 839b39f78e Merge pull request 'feat: change to runnerdnd' (#3) from neoloc/runnerdnd into master
Deploy / build (push) Successful in 1m22s
Reviewed-on: https://git.query.consul/unkin/docker-almalinux-buildrunner/pulls/3
2024-12-01 13:17:03 +11:00
unkinben 7917c198a7 feat: change to runnerdnd
Build / build (pull_request) Successful in 2m27s
- remove some steps and improve the workflow
2024-12-01 13:12:36 +11:00
unkinben 2d883f6c31 Merge pull request 'feat: add nfpm/go to buildrunner' (#2) from neoloc/nfpm into master
Deploy / build (push) Successful in 5m17s
Reviewed-on: https://git.query.consul/unkin/docker-almalinux-buildrunner/pulls/2
2024-11-30 23:49:15 +11:00
unkinben 760b67b9e8 feat: update buildrunner
Build / build (pull_request) Successful in 1m7s
- add nfpm package
- prepare for golang builds
- cleanup layers in docker
2024-11-30 23:46:03 +11:00
unkinben e0fee84e65 Merge pull request 'feat: initial commit' (#1) from neoloc/firstbuild into master
Deploy / build (push) Successful in 3m36s
Reviewed-on: https://git.query.consul/unkin/docker-almalinux-buildrunner/pulls/1
2024-09-08 01:36:41 +10:00
unkinben b744adde0c feat: initial commit
Build / build (pull_request) Successful in 2m37s
- add Makefile
- add gitea workflows
- add Dockerfile
- pass through trusted ca certificates
2024-09-08 01:29:07 +10:00
5 changed files with 58 additions and 43 deletions
+1 -8
View File
@@ -7,17 +7,10 @@ jobs:
build:
runs-on: almalinux-8
container:
image: git.query.consul/unkin/almalinux8:latest
image: git.query.consul/unkin/almalinux8-runnerdnd:latest
options: --privileged
steps:
- name: Set up environment
run: |
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf module enable -y nodejs:20
dnf install -y docker-ce-cli
dnf install -y make bash git nodejs
- name: Checkout code
uses: actions/checkout@v3
+1 -8
View File
@@ -9,17 +9,10 @@ jobs:
build:
runs-on: almalinux-8
container:
image: git.query.consul/unkin/almalinux8:latest
image: git.query.consul/unkin/almalinux8-runnerdnd:latest
options: --privileged
steps:
- name: Set up environment
run: |
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf module enable -y nodejs:20
dnf install -y docker-ce-cli
dnf install -y make bash git nodejs
- name: Checkout code
uses: actions/checkout@v3
+35 -20
View File
@@ -1,33 +1,48 @@
# Get the current Git commit hash
# Variables
GIT_COMMIT := $(shell git rev-parse --short HEAD)
# Get the current date in YYYYMMDD format
DATE_TAG := $(shell date +%Y%m%d)
# Set the Docker image name and repository information
IMAGE_NAME := alma8-buildagent
REGISTRY := git.query.consul
OWNER := unkin
# Build the Docker image (without tags)
build:
docker build --network=host -t $(REGISTRY)/$(OWNER)/$(IMAGE_NAME) .
# List of releases (directories under ./release)
RELEASES := $(shell find release -mindepth 1 -maxdepth 1 -type d -exec basename {} \;)
# Tag the Docker image with the Git commit hash, the date, and 'latest'
tag:
docker tag $(REGISTRY)/$(OWNER)/$(IMAGE_NAME) $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):$(GIT_COMMIT)
docker tag $(REGISTRY)/$(OWNER)/$(IMAGE_NAME) $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):$(DATE_TAG)
docker tag $(REGISTRY)/$(OWNER)/$(IMAGE_NAME) $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):latest
# Build all releases
build: $(addprefix build-,$(RELEASES))
# Push the Docker image to a repository with all tags
push: tag
docker push $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):$(GIT_COMMIT)
docker push $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):$(DATE_TAG)
docker push $(REGISTRY)/$(OWNER)/$(IMAGE_NAME):latest
# Tag all releases
tag: $(addprefix tag-,$(RELEASES))
# Clean up dangling Docker images
# Push all releases
push: $(addprefix push-,$(RELEASES))
# Clean dangling images
clean:
docker image prune -f
# List all available releases
list:
@echo "Available releases:"
@echo $(RELEASES) | tr ' ' '\n'
# Build a specific release
build-%:
$(info Building almalinux$*-buildagent Docker image)
docker build --network=host -t $(REGISTRY)/$(OWNER)/almalinux$*-buildagent -f release/$*/Dockerfile release/$*
# Tag a specific release
tag-%:
$(info Tagging almalinux$*-buildagent Docker image)
docker tag $(REGISTRY)/$(OWNER)/almalinux$*-buildagent $(REGISTRY)/$(OWNER)/almalinux$*-buildagent:$(GIT_COMMIT)
docker tag $(REGISTRY)/$(OWNER)/almalinux$*-buildagent $(REGISTRY)/$(OWNER)/almalinux$*-buildagent:$(DATE_TAG)
docker tag $(REGISTRY)/$(OWNER)/almalinux$*-buildagent $(REGISTRY)/$(OWNER)/almalinux$*-buildagent:latest
# Push a specific release
push-%: tag-%
$(info Pushing almalinux$*-buildagent Docker image)
docker push $(REGISTRY)/$(OWNER)/almalinux$*-buildagent:$(GIT_COMMIT)
docker push $(REGISTRY)/$(OWNER)/almalinux$*-buildagent:$(DATE_TAG)
docker push $(REGISTRY)/$(OWNER)/almalinux$*-buildagent:latest
# Default target
default: build
+5 -7
View File
@@ -1,17 +1,15 @@
# Start with the AlmaLinux 8.10 base image
FROM git.query.consul/unkin/almalinux8:latest
# Clean and update the repository cache
RUN dnf clean all && \
dnf makecache
# Install nodejs:20 for actions
RUN dnf module enable -y nodejs:20 && \
dnf install -y nodejs
# Install build-essential
RUN dnf groupinstall -y 'Development Tools' && \
dnf install -y make cmake gcc gcc-c++ rpm rpmdevtools wget
# Install build tools and dependencies for building RPMs
RUN dnf clean all && \
dnf makecache && \
dnf groupinstall -y 'Development Tools' && \
dnf install -y make cmake gcc gcc-c++ rpm rpmdevtools wget tar gzip go nfpm terragrunt terraform
# Cleanup
RUN dnf clean all && \
+16
View File
@@ -0,0 +1,16 @@
# Start with the AlmaLinux 9 base image
FROM git.query.consul/unkin/almalinux9:latest
# Install nodejs:20 for actions
RUN dnf module enable -y nodejs:20 && \
dnf install -y nodejs
# Install build tools and dependencies for building RPMs
RUN dnf clean all && \
dnf makecache && \
dnf groupinstall -y 'Development Tools' && \
dnf install -y make cmake gcc gcc-c++ rpm rpmdevtools wget tar gzip go nfpm terragrunt terraform
# Cleanup
RUN dnf clean all && \
rm -rf /var/cache/dnf