Commit 64b332e0 authored by Simon Cornet's avatar Simon Cornet
Browse files

feat: various improvements

parent bc09645d
Loading
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+1 −0
Original line number Diff line number Diff line
.ansible
+9 −21
Original line number Diff line number Diff line
---

variables:
  STORAGE_DRIVER: "overlay"

# gitLab ci stages
stages:
  - "build"

image-build:
  stage: "build"
  image: "quay.io/buildah/stable:latest"
  script:

    # login
    - "echo $CR_PASSWORD | buildah login -u $CR_USERNAME --password-stdin $CR_HOSTNAME"

    # build image
    - "buildah bud -t ssh-client -f Dockerfile.linux.amd64 ."
  # stages
  - "linting"
  - "build"

    # tag image
    - "buildah tag ssh-client cr.simoncor.net/siempie/ssh-client:latest"
    - "buildah tag ssh-client cr.simoncor.net/siempie/ssh-client:v25.06.03"

    # push image
    - "buildah push cr.simoncor.net/siempie/ssh-client:latest"
# include jobs
include:

    # logout
    - "buildah logout $CR_HOSTNAME"
  # deployment
  - local: ".gitlab/build.yaml"
  - local: ".gitlab/linting.yaml"

.gitlab/build.yaml

0 → 100644
+28 −0
Original line number Diff line number Diff line
---

variables:
  STORAGE_DRIVER: "overlay"

stages:
  - "build"

image-build:
  stage: "build"
  image: "quay.io/buildah/stable:latest"
  script:

    # login
    - "echo $CR_PASSWORD | buildah login -u $CR_USERNAME --password-stdin $CR_HOSTNAME"

    # build image
    - "buildah bud -t ssh-client -f Dockerfile.linux.amd64 ."

    # tag image
    - "buildah tag ssh-client cr.simoncor.net/siempie/ssh-client:latest"
    - "buildah tag ssh-client cr.simoncor.net/siempie/ssh-client:v25.06.03"

    # push image
    - "buildah push cr.simoncor.net/siempie/ssh-client:latest"

    # logout
    - "buildah logout $CR_HOSTNAME"

.gitlab/linting.yaml

0 → 100644
+12 −0
Original line number Diff line number Diff line
---

# linting
linting:
  stage: "linting"
  image:
    name: "cr.simoncor.net/siempie/ansible-deployment:latest"
    entrypoint: ["/bin/sh", "-c"]

  # start linting
  script:
    - "yamllint ."
+12 −0
Original line number Diff line number Diff line
{
  // files to lint
  "globs": [
    "readme.md"
  ],
  // linting rules
  "config": {
    "MD013": {
      "line_length": 120
    }
  }
}
Loading