Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DNS over HTTPS
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
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab 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
Container Library
DNS over HTTPS
Commits
65b219c7
Verified
Commit
65b219c7
authored
Mar 28, 2019
by
Sheogorath
Browse files
Options
Downloads
Patches
Plain Diff
Add CI chain and image deployment
parent
b0ffe51b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+33
-0
33 additions, 0 deletions
.gitlab-ci.yml
Dockerfile
+3
-1
3 additions, 1 deletion
Dockerfile
tools/tagging.sh
+27
-0
27 additions, 0 deletions
tools/tagging.sh
with
63 additions
and
1 deletion
.gitlab-ci.yml
0 → 100644
+
33
−
0
View file @
65b219c7
image
:
quay.io/sheogorath/ubuntu-ci:18.04
services
:
-
docker:dind
before_script
:
-
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
build-master
:
stage
:
build
variables
:
DOCKER_HOST
:
"
tcp://docker:2375"
DOH_VERSION
:
"
2.0.1"
script
:
-
docker build --pull --build-arg VERSION="$DOH_VERSION" -t "doh:testing" .
-
./tools/tagging.sh "$CI_REGISTRY_IMAGE" "${DOH_VERSION:-latest}" ""
-
docker images --format "{{.Repository}}:{{.Tag}}" "$CI_REGISTRY_IMAGE" | xargs -L 1 docker push
only
:
-
master
tags
:
-
docker
build
:
stage
:
build
variables
:
DOCKER_HOST
:
"
tcp://docker:2375"
script
:
-
docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
-
docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except
:
-
master
tags
:
-
docker
This diff is collapsed.
Click to expand it.
Dockerfile
+
3
−
1
View file @
65b219c7
FROM
golang
FROM
golang
ARG
VERSION=master
RUN
true
\
RUN
true
\
&&
git clone https://github.com/m13253/dns-over-https.git
\
&&
git clone https://github.com/m13253/dns-over-https.git
--depth
1
-b
"
$VERSION
"
\
&&
cd
dns-over-https
\
&&
cd
dns-over-https
\
&&
make
\
&&
make
\
&&
true
&&
true
...
...
This diff is collapsed.
Click to expand it.
tools/tagging.sh
0 → 100755
+
27
−
0
View file @
65b219c7
#!/bin/sh
if
[
"
$1
"
=
"--help"
]
;
then
echo
"
Usage of
$0
:
$0
<PREFIX> <VERSION> <SUFFIX>
Example:
$0
doh 2.0.24 alpine
"
fi
PREFIX
=
${
1
:-
doh
}
VERSION
=
${
2
}
[
"
${
3
}
"
!=
""
]
&&
[
"
${
3
}
"
!=
"debian"
]
&&
SUFFIX
=
"-
${
3
}
"
if
[
"
$VERSION
"
!=
""
]
;
then
docker tag doh:testing
"
$PREFIX
:
$(
echo
"
${
VERSION
}
"
|
sed
-e
's/^v//'
|
cut
-d
.
-f1
)
${
SUFFIX
}
"
docker tag doh:testing
"
$PREFIX
:
$(
echo
"
${
VERSION
}
"
|
sed
-e
's/^v//'
|
cut
-d
.
-f1-2
)
${
SUFFIX
}
"
docker tag doh:testing
"
$PREFIX
:
$(
echo
"
${
VERSION
}
"
|
sed
-e
's/^v//'
|
cut
-d
.
-f1-3
)
${
SUFFIX
}
"
docker tag doh:testing
"
$PREFIX
:
$(
echo
"
${
VERSION
}
"
|
sed
-e
's/^v//'
|
cut
-d
.
-f1-4
)
${
SUFFIX
}
"
[
"
$SUFFIX
"
=
""
]
&&
docker tag doh:testing
"
$PREFIX
:latest"
else
echo
"No version provided. Skipping tagging..."
fi
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