Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
buba-fetcher
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dbnomics-fetchers
buba-fetcher
Commits
3cc8e793
Commit
3cc8e793
authored
3 years ago
by
DBnomics bot
Browse files
Options
Downloads
Patches
Plain Diff
Replace .gitlab-ci.yml with content of pipeline configuration
parent
9d1cc7a2
No related branches found
No related tags found
No related merge requests found
Pipeline
#309120
passed with warnings with stages
in 1 hour, 4 minutes, and 37 seconds
Changes
1
Pipelines
123
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+2
-82
2 additions, 82 deletions
.gitlab-ci.yml
with
2 additions
and
82 deletions
.gitlab-ci.yml
+
2
−
82
View file @
3cc8e793
# Copy this file in a fetcher repository and name it `.gitlab-ci.yml`, and replace SET_VALUE_HERE below.
image
:
dbnomics/dbnomics-gitlab-ci:latest
variables
:
# Can be "download" or "convert"
JOB
:
convert
PROVIDER_SLUG
:
buba
job
:
stage
:
build
except
:
-
pushes
tags
:
-
docker
before_script
:
# Display info about environment.
-
date
-
locale
-
echo "Running job ${JOB} for provider ${PROVIDER_SLUG}"
# Install fetcher dependencies.
-
'
[
-f
requirements.txt
]
&&
pip3
install
--requirement
requirements.txt'
# Run ssh-agent (inside the build environment).
-
eval $(ssh-agent -s)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store.
-
ssh-add <(echo "$SSH_PRIVATE_KEY")
# Add the SSH keys of remote Git servers, to disable host key checking questions.
-
mkdir -p ~/.ssh
-
ssh-keyscan -t rsa git.nomics.world >> ~/.ssh/known_hosts
-
git config --global push.default simple
-
git config --global user.email "${PROVIDER_SLUG}-fetcher@db.nomics.world"
-
git config --global user.name "${PROVIDER_SLUG} fetcher"
script
:
-
set -x
-
|
if [ "${JOB}" == "download" ]; then
time git clone --quiet --depth=1 git@git.nomics.world:dbnomics-source-data/${PROVIDER_SLUG}-source-data.git
cd ${PROVIDER_SLUG}-source-data
time find -not -path "./.git/*" -not -name ".git" -delete
cd ..
time python3 download.py --log info ${PROVIDER_SLUG}-source-data
cd ${PROVIDER_SLUG}-source-data
time git add -A
time git commit -m "New download" --quiet || true
time git push
fi
-
|
if [ "${JOB}" == "convert" ]; then
time git clone --quiet --depth=1 https://git.nomics.world/dbnomics-source-data/${PROVIDER_SLUG}-source-data.git
time git clone --quiet --depth=1 git@git.nomics.world:dbnomics-json-data/${PROVIDER_SLUG}-json-data.git
cd ${PROVIDER_SLUG}-json-data
time find -not -path "./.git/*" -not -name ".git" -delete
cd ..
time python3 convert.py --log info ${PROVIDER_SLUG}-source-data ${PROVIDER_SLUG}-json-data
cd ${PROVIDER_SLUG}-json-data
time git add -A
time git commit -m "New conversion" --quiet || true
time git push
fi
build
:
stage
:
build
only
:
-
changes
-
master
except
:
-
schedules
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
-
>
if [ -f $CI_PROJECT_DIR/Dockerfile ]; then
mkdir -p /kaniko/.docker
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
# /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --destination $CI_REGISTRY_IMAGE:latest
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:latest
fi
include
:
-
remote
:
https://git.nomics.world/dbnomics/dbnomics-fetcher-pipeline/-/raw/pipeline-ng/pipelines/fetcher.yml
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment