Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HumanComputerInteraction
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robiel Elias Redie
HumanComputerInteraction
Commits
58be591e
Commit
58be591e
authored
2 years ago
by
Robiel Elias Redie
Browse files
Options
Downloads
Patches
Plain Diff
gitlab ci yaml updated
parent
9738317f
No related branches found
No related tags found
No related merge requests found
Pipeline
#131290
failed
2 years ago
Stage: commit:dev_build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+59
-8
59 additions, 8 deletions
.gitlab-ci.yml
with
59 additions
and
8 deletions
.gitlab-ci.yml
+
59
−
8
View file @
58be591e
.build_container_image
:
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
'
'
]
variables
:
DOCKERFILE_LOCATION
:
'
unset'
CONTAINER_NAME
:
'
unset'
TAG_NAME
:
'
unset'
script
:
-
mkdir -p /kaniko/.docker
-
echo "DOCKERFILE_LOCATION" $DOCKERFILE_LOCATION
-
echo "CONTAINER_NAME" $CONTAINER_NAME
-
echo "TAG_NAME" $TAG_NAME
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
|
if [[ "$CREATE_LATEST_TAG" == "true" ]];
then
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $DOCKERFILE_LOCATION --destination $CI_REGISTRY_IMAGE/$CONTAINER_NAME:$TAG_NAME --destination $CI_REGISTRY_IMAGE/$CONTAINER_NAME:latest
else
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $DOCKERFILE_LOCATION --destination $CI_REGISTRY_IMAGE/$CONTAINER_NAME:$TAG_NAME;
fi
stages
:
-
build
-
test
stages
:
-
print:readme
-
commit:dev_build
-
commit:test
-
commit:code_analysis
-
commit:verify_analysis
-
commit:release_build
-
staging:deploy
-
production:deploy
build_application
:
stage
:
build
script
:
echo " This will be the gitlab file for building the pipeline that includes 3 stages. And these will be build, test and deploy"
\ No newline at end of file
##################################################
# Tasks of "commit"- Stage
##################################################
variables
:
DEVELOPMENT_CONTAINER_NAME
:
'
development-container'
DEVELOPMENT_CONTAINER_TAG
:
"
${CI_COMMIT_BRANCH}_${CI_COMMIT_SHORT_SHA}"
#eindeutiger Tag durch "SHA" Hash
RELEASE_CONTAINER_NAME
:
'
release-container'
RELEASE_CONTAINER_TAG
:
"
${CI_COMMIT_BRANCH}_${CI_COMMIT_SHORT_SHA}"
#eindeutiger Tag durch "SHA" Hash
# build development container image
create_development_container_image
:
stage
:
commit:dev_build
extends
:
-
.build_container_image
variables
:
DOCKERFILE_LOCATION
:
$CI_PROJECT_DIR/app/Dockerfile
CONTAINER_NAME
:
$DEVELOPMENT_CONTAINER_NAME
TAG_NAME
:
$DEVELOPMENT_CONTAINER_TAG
CREATE_LATEST_TAG
:
'
true'
only
:
-
branches
-
merge_requests
-
main
except
:
-
schedules
\ No newline at end of file
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