Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 57e9df78 authored by Dorian Turba's avatar Dorian Turba
Browse files

initial commit

parents
No related branches found
Tags 0.1.0
No related merge requests found
Pipeline #41560 waiting for manual action
[tool.bumpversion]
commit = true
current_version = "0.1.0"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
replace = "{new_version}"
search = "{current_version}"
serialize = [
"{major}.{minor}.{patch}",
]
tag = false
[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
replace = """## [Unreleased]
## [{new_version}] - {now:%Y-%m-%d}
"""
search = """## [Unreleased]
"""
include:
- remote: 'https://gitlab.com/swepy/cicd-templates/docker-build/-/raw/0.2.0/templates/docker-build.yml'
- component: $CI_SERVER_HOST/swepy/cicd-templates/release-by-changelog/release-by-changelog@1.0.0
#release_by_changelog:
# rules:
# - if: $CI_PIPELINE_SOURCE != "pipeline" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
docker_build:
variables:
TAG: $CI_COMMIT_SHA
REPOSITORY: gitssh
PACKAGE_NAME: gitssh
IMAGE_NAME: $DOCKER_USER/$REPOSITORY
TARGET_IMAGE: $CI_REGISTRY_IMAGE:$TAG
PROJECT_PATH: .
before_script:
- KANIKO_OPTIONS="--build-arg VERSION=3.20.2"
- echo "Kaniko options=$KANIKO_OPTIONS"
docker_push:
image: docker:latest
services:
- docker:dind
variables:
DOCKER_REPO: gitssh
TARGET_IMAGE: dorianturba/$DOCKER_REPO
SRC_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
VERSION: 3.20.2
stage: deploy
before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin lab.frogg.it:5050
script:
# Pull the image
- docker pull $SRC_IMAGE
# Get the Ruff version by running the container
- VERSION=${VERSION}
# - MINOR=${VERSION%.*}
# - MAJOR=${VERSION%%.*}
- echo $VERSION
# Tag the image
- docker tag $SRC_IMAGE $TARGET_IMAGE:$VERSION
# - docker tag $SRC_IMAGE $TARGET_IMAGE:$MINOR
# - docker tag $SRC_IMAGE $TARGET_IMAGE:$MAJOR
# - docker tag $SRC_IMAGE $TARGET_IMAGE:latest
# Login to Docker Hub using DOCKER_AUTH_CONFIG
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker push $TARGET_IMAGE:$VERSION
# - docker push $TARGET_IMAGE:$MINOR
# - docker push $TARGET_IMAGE:$MAJOR
# - docker push $TARGET_IMAGE:latest
rules:
- if: $CI_PIPELINE_SOURCE == "push"
when: manual
# Changelog
All notable changes to this job will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.1.0] - 2024-08-13
* Initial version
# This dockerfile can generate a docker image with git.
ARG APP_ROOT=/app
ARG APP_USER=app
ARG APP_UID=1000
ARG APP_GID=1000
# Default environment with a non priviledged user.
FROM alpine:3.20.2 as base
ARG APP_ROOT
ARG APP_USER
ARG APP_UID
ARG APP_GID
RUN mkdir -p $APP_ROOT/.local/bin && \
adduser $APP_USER -h $APP_ROOT -u $APP_UID -g $APP_GID -DH && \
chown -R $APP_UID:$APP_GID $APP_ROOT # force the user to be the owner of the app directory
FROM base
ARG APP_ROOT
ARG APP_USER
ARG APP_UID
ARG APP_GID
ENV PATH=$APP_ROOT/venv/bin:$PATH
RUN command -v ssh-agent >/dev/null || ( apk update && apk add --no-cache openssh-client git )
# Never build with root because we don't need priviledged access to
# build, preventing external source code from running as root.
USER $APP_UID
WORKDIR $APP_ROOT
LABEL maintainers="Dorian Turba <contact.docker.cblm4@simplelogin.com>"
LABEL description="Lightweight image with git and ssh."
LABEL version="3.20.2"
LABEL license="MIT"
LABEL org.opencontainers.image.source="https://lab.frogg.it/swepy/containers/ruff"
LABEL org.opencontainers.image.source.gitlab_com="https://gitlab.com/swepy/containers/ruff"
LABEL org.opencontainers.image.issues="https://lab.frogg.it/swepy/containers/ruff/-/issues"
LABEL org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
LABEL org.opencontainers.image.title="GitSSH"
LABEL org.opencontainers.image.revision="3.20.2"
Copyright 2024 dorian turba
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the “Software”), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
# GitSSH Docker Image
[//]: # ([![Pipeline]&#40;https://lab.frogg.it/swepy/containers/ruff/badges/main/pipeline.svg&#41;]&#40;https://lab.frogg.it/swepy/containers/ruff/-/pipelines?ref=main&#41;)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://lab.frogg.it/swepy/cicd-templates/ruff-docker-image/-/blob/main/LICENSE)
[![src froggit](https://img.shields.io/badge/src-Frogg.it-green)](https://lab.frogg.it/swepy/containers/gitssh)
[![mirror gitlab](https://img.shields.io/badge/mirror-GitLab.com-orange)](https://gitlab.com/swepy/containers/gitssh)
This Docker image provides a ready-to-use environment with Git and SSH installed.
## CICD
We rely on GitLab CI components to build and release this image:
[![Release by Changelog](https://img.shields.io/badge/CICD-Release%20By%20Changelog-white?logo=gitlab)](https://gitlab.com/explore/catalog/swepy/cicd-templates/release-by-changelog)
[![Docker Build](https://img.shields.io/badge/CICD-Docker%20Build-white?logo=docker)](https://gitlab.com/explore/catalog/swepy/cicd-templates/docker-build)
[![Kaniko](https://img.shields.io/badge/backend-Kaniko-orange?logo=google)](https://github.com/GoogleContainerTools/kaniko)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment