Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
ipa-big committed Jan 2, 2024
1 parent 5262e7f commit 39052a4
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Docker Images

on:
workflow_dispatch:
push:
branches: [main]

jobs:
build-and-push-molecule:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build molecule image
working-directory: .
run: docker-compose build molecule
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
- name: Push docker image
working-directory: .
run: docker-compose push
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM jenkins/jenkins:jdk17

USER root

# Install Openstack Client
RUN apt update && \
apt install -y python3-dev python3-pip
RUN pip3 install --break-system-packages --upgrade pip
RUN pip3 install --break-system-packages python-openstackclient

# Install Packer
RUN apt update && apt upgrade -y && apt install -y wget gpg lsb-release

RUN wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/hashicorp.list && \
apt update && apt install -y packer
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
version: "3"
services:
molecule:
image: fabos4ai/jenkins:jdk17
build: .

0 comments on commit 39052a4

Please sign in to comment.