Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Pupák
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KSZK
Open Source
Pupák
Commits
cb26c8d8
Verified
Commit
cb26c8d8
authored
Jul 24, 2020
by
Robotka István Adrián
Browse files
Options
Downloads
Patches
Plain Diff
multiple docker image build
parent
4838229b
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#4783
passed with warnings
Aug 10, 2020
Stage: Get dependencies
Stage: Static Analysis
Changes
2
Pipelines
5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
.gitlab-ci.yml
+33
-5
33 additions, 5 deletions
.gitlab-ci.yml
with
34 additions
and
5 deletions
.gitignore
+
1
−
0
View file @
cb26c8d8
/.idea/
/.idea/
/venv/
/venv/
data
data
__pycache__
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
33
−
5
View file @
cb26c8d8
image
:
registry.kszk.bme.hu/baseimg/python-tools
image
:
python:3.8.5-buster
stages
:
stages
:
-
Get dependencies
-
Get dependencies
...
@@ -6,32 +6,60 @@ stages:
...
@@ -6,32 +6,60 @@ stages:
-
Docker build
-
Docker build
variables
:
variables
:
# git tag or branch name
CONTAINER_IMAGE
:
"
registry.kszk.bme.hu/monitoring/pupak:$CI_COMMIT_REF_NAME"
CONTAINER_IMAGE
:
"
registry.kszk.bme.hu/monitoring/pupak:$CI_COMMIT_REF_NAME"
pip
:
pip
:
stage
:
Get dependencies
stage
:
Get dependencies
script
:
script
:
-
python --version
-
pip install -r requirements.txt
-
pip install -r requirements.txt
flake8
:
flake8
:
stage
:
Static Analysis
stage
:
Static Analysis
script
:
script
:
-
pip install flake8
-
flake8 --max-line-length=120 *.py
-
flake8 --max-line-length=120 *.py
pylint
:
pylint
:
stage
:
Static Analysis
stage
:
Static Analysis
allow_failure
:
true
allow_failure
:
true
script
:
script
:
-
pip install pylint
-
pylint -d C0301 *.py
-
pylint -d C0301 *.py
docker build
:
docker kszk
:
extends
:
.image-template
variables
:
REGISTRY
:
registry.kszk.bme.hu
REGISTRY_USER
:
"
$KSZK_NEXUS_USERNAME"
REGISTRY_PASSWORD
:
"
$KSZK_NEXUS_PASSWORD"
IMAGE
:
registry.kszk.bme.hu/monitoring/pupak:$CI_COMMIT_REF_NAME
docker hub
:
extends
:
.image-template
variables
:
REGISTRY
:
"
https://index.docker.io/v1/"
REGISTRY_USER
:
"
$HUB_USER"
REGISTRY_PASSWORD
:
"
$HUB_PASS"
IMAGE
:
robotka/pupak:$CI_COMMIT_REF_NAME
###################### Docker image build template #######################
# hidden job, not gonna run, just for the inheritance
.image-template
:
stage
:
Docker build
stage
:
Docker build
image
:
image
:
name
:
gcr.io/kaniko-project/executor:debug
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
entrypoint
:
[
"
"
]
script
:
script
:
-
echo "{\"auths\":{\"registry.kszk.bme.hu\":{\"username\":\"$KSZK_NEXUS_USERNAME\",\"password\":\"$KSZK_NEXUS_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
echo "{\"auths\":{\"$REGISTRY\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASSWORD\"}}}"
-
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination "$CONTAINER_IMAGE"
> /kaniko/.docker/config.json
-
echo "Push $IMAGE to $REGISTRY"
-
/kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination "$IMAGE"
only
:
only
:
-
master
-
master
-
tags
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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