UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Ironbank Containers
G
GitLab
Gitlab
gitlab-task-runner
Commits
669b71e8
Commit
669b71e8
authored
Apr 26, 2021
by
Al Fontaine
Browse files
Merge branch 'development' into 'master'
Development See merge request
!73
parents
fa25ddce
969d30c4
Pipeline
#255061
failed with stages
in 22 minutes and 48 seconds
Changes
5
Pipelines
24
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
14 deletions
+33
-14
Dockerfile
Dockerfile
+2
-2
build-scripts/build.sh
build-scripts/build.sh
+1
-1
hardening_manifest.yaml
hardening_manifest.yaml
+7
-7
openshift.metadata
openshift.metadata
+7
-0
scripts/bin/backup-utility
scripts/bin/backup-utility
+16
-4
No files found.
Dockerfile
View file @
669b71e8
ARG
GITLAB_VERSION=v13.1
0.3
-ubi8
ARG
GITLAB_VERSION=v13.1
1.0
-ubi8
ARG
BASE_REGISTRY=nexus-docker-secure.levelup-nexus.svc.cluster.local:18082
ARG
BASE_IMAGE=gitlab/gitlab/gitlab-rails
ARG
BASE_TAG=13.1
0.3
ARG
BASE_TAG=13.1
1.0
ARG
RAILS_IMAGE=${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
...
...
build-scripts/build.sh
View file @
669b71e8
...
...
@@ -4,7 +4,7 @@
set
-euxo
pipefail
TAG
=
${
1
:-
13
.1
0.3
}
TAG
=
${
1
:-
13
.1
1.0
}
REPOSITORY
=
${
2
:-}
DOCKER_OPTS
=
${
DOCKER_OPTS
:-
""
}
...
...
hardening_manifest.yaml
View file @
669b71e8
...
...
@@ -5,12 +5,12 @@ name: "gitlab/gitlab/gitlab-task-runner"
# The most specific version should be the first tag and will be shown
# on ironbank.dsop.io
tags
:
-
"
13.1
0.3
"
-
"
13.1
1.0
"
-
"
latest"
# Build args passed to Dockerfile ARGs
args
:
BASE_IMAGE
:
"
gitlab/gitlab/gitlab-rails"
BASE_TAG
:
"
13.1
0.3
"
BASE_TAG
:
"
13.1
1.0
"
# Docker image labels
labels
:
org.opencontainers.image.title
:
"
Gitlab
Task
Runner"
...
...
@@ -22,7 +22,7 @@ labels:
org.opencontainers.image.url
:
"
https://about.gitlab.com/"
## Name of the distributing entity, organization or individual
org.opencontainers.image.vendor
:
"
Gitlab"
org.opencontainers.image.version
:
"
13.1
0.3
"
org.opencontainers.image.version
:
"
13.1
1.0
"
## Keywords to help with search (ex. "cicd,gitops,golang")
mil.dso.ironbank.image.keywords
:
"
gitlab,
git,
gitops"
## This value can be "opensource" or "commercial"
...
...
@@ -43,13 +43,13 @@ maintainers:
username
:
"
alfontaine"
email
:
"
alan.fontaine@centauricorp.com"
resources
:
-
url
:
"
https://gitlab-ubi.s3.amazonaws.com/ubi8-build-dependencies-v13.1
0.3
-ubi8/gitlab-task-runner-ee.tar.gz"
-
url
:
"
https://gitlab-ubi.s3.amazonaws.com/ubi8-build-dependencies-v13.1
1.0
-ubi8/gitlab-task-runner-ee.tar.gz"
filename
:
"
gitlab-task-runner-ee.tar.gz"
validation
:
type
:
"
sha256"
value
:
"
8dda22421e7617f76a2d3e1e3315aecde837dac7b8d987203c2eb0ceeae4077b
"
-
url
:
"
https://gitlab-ubi.s3.amazonaws.com/ubi8-build-dependencies-v13.1
0.3
-ubi8/gitlab-python.tar.gz"
value
:
"
1675626bfd787e36e51f9410806ae663d062f3edc2311982553d7d81120a9d60
"
-
url
:
"
https://gitlab-ubi.s3.amazonaws.com/ubi8-build-dependencies-v13.1
1.0
-ubi8/gitlab-python.tar.gz"
filename
:
"
gitlab-python.tar.gz"
validation
:
type
:
"
sha256"
value
:
"
cc08b0efbcd78877f7ed57607fdc46674871bdb94c3ec98329356fb5aafea5ba
"
value
:
"
0ff636e520a5853c14e87e20872ea86f6714bb991730a2fec8255e2f8caa3441
"
openshift.metadata
0 → 100644
View file @
669b71e8
io.openshift.tags=gitlab-task-runner
io.openshift.wants=gitlab-webservice
io.k8s.description=Container with tools to diagnose GitLab application
issues.
io.openshift.non-scalable=false
io.openshift-min-memory=350Mi
io.openshift.min-cpu=50m
scripts/bin/backup-utility
View file @
669b71e8
...
...
@@ -4,6 +4,7 @@ set -e
ACTION
=
"backup"
export
BACKUP_BUCKET_NAME
=
${
BACKUP_BUCKET_NAME
-gitlab-backups
}
export
BACKUP_BACKEND
=
${
BACKUP_BACKEND
-s3
}
S3_CMD_BACKUP_OPTION
=
""
rails_dir
=
/srv/gitlab
backups_path
=
$rails_dir
/tmp/backups
...
...
@@ -16,7 +17,7 @@ function usage()
{
cat
<<
HEREDOC
Usage: backup-utility [--restore] [-f URL] [-t TIMESTAMP] [--skip COMPONENT] [--backend BACKEND]
Usage: backup-utility [--restore] [-f URL] [-t TIMESTAMP] [--skip COMPONENT] [--backend BACKEND]
[--s3config CONFIG]
Options:
-h, --help Show this help message and exit.
...
...
@@ -31,6 +32,8 @@ function usage()
db, repositories, and any of the object storages (e.g. 'lfs').
--backend BACKEND Object storage backend to use for backups.
Can be either 's3' or 'gcs'.
--s3config CONFIG S3 backend configuration to use for backups storage.
Special config file for s3cmd (see: https://s3tools.org/usage)
--storage-class CLASSNAME Pass this storage class to the gcs or s3cmd for more cost-efficient
storage of backups.
HEREDOC
...
...
@@ -53,7 +56,7 @@ function fetch_remote_backup(){
else
# It's a timestamp
file_name
=
"
$1_gitlab_backup
.tar"
if
[
"
${
BACKUP_BACKEND
}
"
=
"s3"
]
;
then
s3cmd get
"s3://
$BACKUP_BUCKET_NAME
/
$file_name
"
$output_path
>
/dev/null
s3cmd
${
S3_CMD_BACKUP_OPTION
}
get
"s3://
$BACKUP_BUCKET_NAME
/
$file_name
"
$output_path
>
/dev/null
elif
[
"
${
BACKUP_BACKEND
}
"
=
"gcs"
]
;
then
gsutil
cp
"gs://
$BACKUP_BUCKET_NAME
/
$file_name
"
$output_path
>
/dev/null
else
...
...
@@ -151,9 +154,9 @@ function backup(){
pack_backup
$backup_name
if
[
"
${
BACKUP_BACKEND
}
"
=
"s3"
]
;
then
if
[
-z
"
${
STORAGE_CLASS
}
"
]
;
then
s3cmd put
${
backup_tars_path
}
/
${
backup_name
}
.tar s3://
$BACKUP_BUCKET_NAME
>
/dev/null
s3cmd
${
S3_CMD_BACKUP_OPTION
}
put
${
backup_tars_path
}
/
${
backup_name
}
.tar s3://
$BACKUP_BUCKET_NAME
>
/dev/null
else
s3cmd put
--storage-class
"
${
STORAGE_CLASS
}
"
${
backup_tars_path
}
/
${
backup_name
}
.tar s3://
$BACKUP_BUCKET_NAME
>
/dev/null
s3cmd
${
S3_CMD_BACKUP_OPTION
}
put
--storage-class
"
${
STORAGE_CLASS
}
"
${
backup_tars_path
}
/
${
backup_name
}
.tar s3://
$BACKUP_BUCKET_NAME
>
/dev/null
fi
echo
"[DONE] Backup can be found at s3://
$BACKUP_BUCKET_NAME
/
${
backup_name
}
.tar"
elif
[
"
${
BACKUP_BACKEND
}
"
=
"gcs"
]
;
then
...
...
@@ -247,6 +250,15 @@ do
shift
shift
;;
--s3config
)
if
[
!
-f
$2
]
;
then
echo
"s3cmd file specified does not exist"
;
exit
1
;
fi
export
S3_CMD_BACKUP_OPTION
=
"--config=
$2
"
shift
shift
;;
--restore
)
ACTION
=
"restore"
shift
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment