Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
raspbian-base
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
Container Registry
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Docker Build Images
raspbian-base
Commits
5970bd8e
Commit
5970bd8e
authored
6 years ago
by
Markus Frosch
Browse files
Options
Downloads
Patches
Plain Diff
Improve Makefile variables for GitLab and set defaults
parent
5e768fa2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+0
-4
0 additions, 4 deletions
.gitlab-ci.yml
Makefile
+12
-7
12 additions, 7 deletions
Makefile
make-image.sh
+10
-6
10 additions, 6 deletions
make-image.sh
with
22 additions
and
17 deletions
.gitlab-ci.yml
+
0
−
4
View file @
5970bd8e
...
@@ -5,10 +5,6 @@ image: docker:latest
...
@@ -5,10 +5,6 @@ image: docker:latest
services
:
services
:
-
docker:dind
-
docker:dind
variables
:
DOCKER_REGISTRY
:
${CI_REGISTRY}
DOCKER_IMAGE_PREFIX
:
${CI_PROJECT_PATH}/
before_script
:
before_script
:
-
docker info
-
docker info
-
docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
-
docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
...
...
This diff is collapsed.
Click to expand it.
Makefile
+
12
−
7
View file @
5970bd8e
IMAGE_PREFIX
:=
${
DOCKER_IMAGE_PREFIX
}
ifndef
CI_REGISTRY
ifeq
($(IMAGE_PREFIX),)
CI_REGISTRY
:=
registry.icinga.com
IMAGE_PREFIX
:=
icinga/raspbian-base/
endif
endif
REGISTRY
:=
${
DOCKER_REGISTRY
}
ifeq
($(CI_PROJECT_PATH),)
ifneq
($(REGISTRY),)
CI_PROJECT_PATH
:=
build-docker/raspbian-base
IMAGE_PREFIX
:=
$(
REGISTRY
)
/
$(
IMAGE_PREFIX
)
endif
endif
ifeq
($(CI_COMMIT_REF_NAME),)
CI_COMMIT_REF_NAME
:=
$(
shell git rev-parse
--abbrev-ref
HEAD
)
endif
IMAGE
:=
$(
CI_PROJECT_PATH
)
/
${
CI_COMMIT_REF_NAME
}
IMAGE
:=
$(
IMAGE_PREFIX
)${
CI_COMMIT_REF_NAME
}
ifneq
($(CI_REGISTRY),)
IMAGE
:=
$(
CI_REGISTRY
)
/
$(
IMAGE
)
endif
.PHONY
:
all tarball clean
.PHONY
:
all tarball clean
...
...
This diff is collapsed.
Click to expand it.
make-image.sh
+
10
−
6
View file @
5970bd8e
...
@@ -3,13 +3,17 @@
...
@@ -3,13 +3,17 @@
DIST
=
stretch
DIST
=
stretch
GPGKEY
=
A0DA38D0D76E8B5D638872819165938D90FDDD2E
GPGKEY
=
A0DA38D0D76E8B5D638872819165938D90FDDD2E
if
[
-n
"
$DOCKER_IMAGE_PREFIX
"
]
;
then
if
[
-z
${
CI_REGISTRY
+x
}
]
;
then
IMAGE
=
"
${
DOCKER_IMAGE_PREFIX
}
debootstrap"
CI_REGISTRY
=
registry.icinga.com
else
IMAGE
=
icinga/raspbian-base/debootstrap
fi
fi
if
[
-n
"
$DOCKER_REGISTRY
"
]
;
then
if
[
-z
"
$CI_PROJECT_PATH
"
]
;
then
IMAGE
=
"
${
DOCKER_REGISTRY
}
/
${
IMAGE
}
"
CI_PROJECT_PATH
=
build-docker/raspbian-base
fi
IMAGE
=
"
${
CI_PROJECT_PATH
}
/debootstrap"
if
[
-n
"
${
CI_REGISTRY
}
"
]
;
then
IMAGE
=
"
${
CI_REGISTRY
}
/
${
IMAGE
}
"
fi
fi
opts
=
opts
=
...
...
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