Skip to content
Snippets Groups Projects
Commit 5e0a0521 authored by Konstantinos Samaras-Tsakiris's avatar Konstantinos Samaras-Tsakiris
Browse files

Merge branch 'update-dockerfile' into 'master'

Update Dockerfile and gitlab-ci

Closes webservices/webframeworks-planning#937

See merge request !20
parents b977b84e 830c5730
No related branches found
No related tags found
1 merge request!20Update Dockerfile and gitlab-ci
Pipeline #3928586 passed
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
when: never
- if: '$CI_COMMIT_BRANCH'
include:
- project: 'paas-tools/infrastructure-ci'
file: 'docker-images-ci-templates/DockerImages.gitlab-ci.yml'
stages: stages:
- build - build
build: variables:
stage: build CI_REGISTRY_IMAGE: ${CI_REGISTRY_IMAGE}/velero-restore
image:
# We recommend using the CERN version of the Kaniko image: gitlab-registry.cern.ch/ci-tools/docker-image-builder
name: gitlab-registry.cern.ch/ci-tools/docker-image-builder
entrypoint: [""]
script:
- |
case "$CI_COMMIT_BRANCH" in
master) export DATE=$(date -u +%Y.%m.%dT%H-%M-%SZ); export TAG="RELEASE"-${DATE}; echo "TAG=$TAG" >> build.env ;;
*) export TAG=$CI_COMMIT_SHORT_SHA ;;
esac
- wget --no-check-certificate https://github.com/mikefarah/yq/releases/download/v4.2.0/yq_linux_amd64 -O /yq && chmod +x /yq
# This is not the common Authentication config, unknown reason why common config fails
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64)\"}}}" > /kaniko/.docker/config.json
# Image builder
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination ${CI_REGISTRY_IMAGE}/velero-restore:${CI_COMMIT_BRANCH}-${TAG}
- echo "Image pushed successfully to ${CI_REGISTRY_IMAGE}/velero-restore:${CI_COMMIT_BRANCH}-${TAG}"
artifacts:
reports:
dotenv: build.env
FROM gitlab-registry.cern.ch/paas-tools/openshift-client FROM registry.cern.ch/paas-tools/okd4-install:latest
LABEL maintainer="Drupal Admins <drupal-admins@cern.ch>" LABEL maintainer="Drupal Admins <drupal-admins@cern.ch>"
# https://copr.fedorainfracloud.org/coprs/copart/restic/ repo only supporting a fixed version of restic. Hence bumping up restic version from 0.12.0 to 0.12.1
# TODO: Download the binary for restic install, instead of using copart/restic repo
ARG restic_version=0.12.1
RUN yum update -y && \
yum install epel-release -y && \
# install restic
yum install yum-plugin-copr -y && \
yum copr enable copart/restic -y && \
yum install restic-${restic_version} -y && \
# we need this to interact with manila OpenStack to get CephFS information
yum install centos-release-openstack-xena -y && \
# Openstack installation broken, see: https://gitlab.cern.ch/drupal/paas/drupal-operations/-/jobs/21224622
# yum install -y /usr/bin/openstack --disableplugin=protectbase && \
yum clean all
COPY ./tekton-task-templates /tekton-task-templates COPY ./tekton-task-templates /tekton-task-templates
COPY ./velero-restic-restore/restore_pvs.sh /scripts/restore_pvs.sh COPY ./velero-restic-restore/restore_pvs.sh /scripts/restore_pvs.sh
CMD ["/usr/local/bin/oc"] CMD ["/bin/bash"]
...@@ -16,7 +16,7 @@ spec: ...@@ -16,7 +16,7 @@ spec:
description: The namespace of the drupal site description: The namespace of the drupal site
steps: steps:
- name: database-restore - name: database-restore
image: gitlab-registry.cern.ch/drupal/paas/drupal-operations/openshift-cli:velero-restore image: {{ .Values.image }}
imagePullPolicy: Always imagePullPolicy: Always
command: command:
- /bin/sh - /bin/sh
......
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