Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
oetzit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
commul
oetzit
Commits
f187701c
Commit
f187701c
authored
2 years ago
by
Paolo Brasolin
Browse files
Options
Downloads
Patches
Plain Diff
chore: test kaniko for be build
parent
1004b967
No related branches found
No related tags found
No related merge requests found
Pipeline
#25024
failed
2 years ago
Stage: setup
Stage: check
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+32
-21
32 additions, 21 deletions
.gitlab-ci.yml
with
32 additions
and
21 deletions
.gitlab-ci.yml
+
32
−
21
View file @
f187701c
...
@@ -150,31 +150,42 @@ stg-build-fe-node-job:
...
@@ -150,31 +150,42 @@ stg-build-fe-node-job:
# TODO: cache docker layers
# TODO: cache docker layers
build-be-job
:
build-be-job
:
image
:
docker:20.10.12
#
image: docker:20.10.12
stage
:
build
stage
:
build
tags
:
image
:
-
commul
# NOTE: we need commul (not shared) because of credentials in environment
name
:
gcr.io/kaniko-project/executor:debug
services
:
entrypoint
:
[
"
"
]
-
docker:dind
# tags:
# - commul # NOTE: we need commul (not shared) because of credentials in environment
# services:
# - docker:dind
variables
:
variables
:
IMAGE_NAME
:
$CI_REGISTRY_IMAGE/backend
IMAGE_NAME
:
$CI_REGISTRY_IMAGE/backend
before_script
:
# before_script:
-
docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN https://$CI_REGISTRY
# - docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN https://$CI_REGISTRY
# script:
# - >
# docker build
# --rm --no-cache
# --target production
# --tag=$IMAGE_NAME:${CI_COMMIT_SHA}
# --tag=$IMAGE_NAME:${CI_COMMIT_REF_NAME}
# --tag=$IMAGE_NAME:${CI_COMMIT_TAG:-latest}
# --build-arg APP_VERSION=${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}
# --build-arg ROLLBAR_ACCESS_TOKEN=$POST_SERVER_ITEM_ROLLBAR_ACCESS_TOKEN
# backend
# - docker image push --all-tags $IMAGE_NAME
script
:
script
:
-
>
-
mkdir -p /kaniko/.docker
docker build
-
echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
--rm --no-cache
-
>-
--target production
/kaniko/executor
--tag=$IMAGE_NAME:${CI_COMMIT_SHA}
--context "${CI_PROJECT_DIR}"
--tag=$IMAGE_NAME:${CI_COMMIT_REF_NAME}
--dockerfile "${CI_PROJECT_DIR}/backend/Dockerfile"
--tag=$IMAGE_NAME:${CI_COMMIT_TAG:-latest}
--destination "${CI_REGISTRY_IMAGE}/backend:${CI_COMMIT_TAG}"
--build-arg APP_VERSION=${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}
# only:
--build-arg ROLLBAR_ACCESS_TOKEN=$POST_SERVER_ITEM_ROLLBAR_ACCESS_TOKEN
# - tags
backend
# - development
-
docker image push --all-tags $IMAGE_NAME
only
:
-
tags
-
development
#==[ DEPLOY STAGE ]=============================================================
#==[ DEPLOY STAGE ]=============================================================
...
...
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