Compare commits

...

10 Commits

Author SHA1 Message Date
7827745c11 test workflow for building out gitea based ci'
All checks were successful
Simple Docker Hello World Test / hello-world (push) Successful in 5s
2024-08-26 16:32:44 -07:00
0a1f221b40 Selnium with python3 2024-03-29 15:42:09 -07:00
b0b2a3e950 BUilding selenium 2024-03-24 19:02:42 -07:00
980f487f4b Adding login for docker hub 2024-03-24 19:01:31 -07:00
df4c0a12fa Reducing docker size for hugo builds 2023-10-08 20:23:45 -07:00
99bac4e6e1 Smaller website image 2023-10-02 20:38:11 -07:00
7de41c8bfd Sampling the pipeline for the build script 2023-01-16 19:12:04 -08:00
6ad30d3826 Missing bash prefix" 2023-01-16 18:41:51 -08:00
a7d09be523 New pipeline which may/may not work 2023-01-16 18:39:57 -08:00
f86c841167 - Removing fluff pipeline 2022-05-17 15:31:31 -07:00
7 changed files with 96 additions and 13 deletions

View File

@ -0,0 +1,13 @@
name: Simple Docker Hello World Test
run-name: Tester workflow
on:
- push
jobs:
hello-world:
runs-on: gitea-main
container:
image: alpine
steps:
- run: echo "Target branch ${{ gitea.ref }}"

View File

@ -1,11 +1,19 @@
stages: include:
- build - local: 'ci/builder.yml'
dummy: build-ansible-image:
stage: build extends: .builder
image: alpine:latest
script: script:
- echo $env_var - sh build-image.sh ansible
- echo $env_file
- cat $env_file build-website-image:
extends: .builder
script:
- sh build-image.sh website
build-selelium-image:
extends: .builder
script:
- sh build-image.sh selenium

35
build-image.sh Normal file
View File

@ -0,0 +1,35 @@
#!/bin/bash
set -e
# This script is a generic builder script which only builds
# images if the latest commit modifies the given folder in some way
target="$1"
tag="$2"
# Ensure we have a target
if [ -z "$target" ]; then
echo "$target is not defined ( empty )"
exit 1
fi
# Make sure the target is real
if [ ! -d "$target" ]; then
echo "$target is not a directory"
exit 1
fi
# Set the tag if not already set
if [ -z "$tag" ]; then
tag=latest
echo "Tag for \"$target\" defaulting to \"latest\""
fi
# Finally set the project root
PROJECT_ROOT=`pwd`
cd "$target"
echo docker build . -t "$tag"
echo "${DOCKERHUB_PASSWORD} | docker login --username "${DOCKERHUB_USERNAME}" --password-stdin
cd "$PROJECT_ROOT"

17
ci/builder.yml Normal file
View File

@ -0,0 +1,17 @@
# This template is for the main builder jobs to inherit generic properties from
stages:
- publish
.builder:
image: docker:stable
stage: publish
services:
- docker:dind
only:
refs:
- master
# Ensure we login to docker hub before hand everytime
before_script:
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin

View File

@ -3,12 +3,19 @@
This repository serves as a place of consolidation for most of the major public This repository serves as a place of consolidation for most of the major public
docker images that I maintain. docker images that I maintain.
# Building
Workflow for is defined as such in 3 stages:
* Validation stage: where we lint and check any
# Update Cycle # Update Cycle
I mostly update these for my own sake however special versioning cycles can be I mostly update these for my own sake however special versioning cycles can be
arranged for those that that request it. arranged for those that that request it.
Email: `dev@shockrah.xyz` Email: `mail@shockrah.xyz`
# Contributing # Contributing

6
selenium/Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM selenium/standalone-firefox
RUN sudo apt update && \
sudo apt install -y python3-pip python3-venv && \
sudo apt-get clean && sudo rm -rf /var/cache/apt/archives /var/lib/apt/lists

View File

@ -1,9 +1,6 @@
FROM debian:sid-slim FROM debian:sid-slim
MAINTAINER Alejandro Santillana alejandros714@protonmail.com
# For building and deploying to the VPS's and neocities
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y pandoc hugo curl --no-install-recommends && \ apt-get install -y --no-install-recommends hugo && \
rm -rf var/lib/{apt,dpkg,cache,log}/ rm -rf var/lib/{apt,dpkg,cache,log}/