Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tooling
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
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
insert epic projlab name here
Tooling
Commits
f31f25d3
Verified
Commit
f31f25d3
authored
4 years ago
by
Tóth Miklós Tibor
Browse files
Options
Downloads
Patches
Plain Diff
CI magic
parent
a21ccac6
No related branches found
No related tags found
No related merge requests found
Pipeline
#7796
failed
4 years ago
Stage: build
Stage: docker
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+13
-7
13 additions, 7 deletions
.gitlab-ci.yml
with
13 additions
and
7 deletions
.gitlab-ci.yml
+
13
−
7
View file @
f31f25d3
...
@@ -2,6 +2,9 @@ image: golang:alpine
...
@@ -2,6 +2,9 @@ image: golang:alpine
variables
:
variables
:
GIT_SUBMODULE_STRATEGY
:
recursive
GIT_SUBMODULE_STRATEGY
:
recursive
GOPATH
:
$CI_PROJECT_DIR/.go
GOCACHE
:
$CI_PROJECT_DIR/.cache
stages
:
stages
:
-
build
-
build
...
@@ -14,21 +17,24 @@ go:
...
@@ -14,21 +17,24 @@ go:
-
apk add build-base make git
-
apk add build-base make git
-
cd plab
-
cd plab
-
make
-
make
cache
:
paths
:
-
.go
-
.cache
artifacts
:
artifacts
:
paths
:
paths
:
-
plab/out/plab
-
plab/out/plab
Build
:
Build
:
tags
:
-
podman-in-podman
stage
:
docker
stage
:
docker
image
:
image
:
quay.io/podman/stable
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
script
:
-
TAG=latest
-
TAG=latest
-
"
[[
!
\"
${CI_COMMIT_REF_NAME:-master}
\"
=
\"
master
\"
]]
&&
TAG=
\"
$CI_COMMIT_REF_NAME
\"
"
-
"
[[
!
\"
${CI_COMMIT_REF_NAME:-master}
\"
=
\"
master
\"
]]
&&
TAG=
\"
$CI_COMMIT_REF_NAME
\"
"
-
mkdir -p /kaniko/.docker
-
podman login --username $REGISTRY_USER --password $REGISTRY_PASSWORD docker.io
-
echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
podman build -t "projlab/projlab:$TAG" .
-
echo /kaniko/executor --force --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination "projlab/projlab:$TAG"
-
podman push "projlab/projlab:$TAG"
-
/kaniko/executor --force --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination "projlab/projlab:$TAG"
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