Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cert-manager-webhook-rwth
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
Thomas Schneider
cert-manager-webhook-rwth
Commits
a24523bd
Commit
a24523bd
authored
3 years ago
by
Thomas Schneider
Browse files
Options
Downloads
Patches
Plain Diff
WIP: add container build stuff
parent
17288401
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#4149
passed
3 years ago
Stage: test
Stage: deploy
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.containerignore
+28
-0
28 additions, 0 deletions
.containerignore
.dockerignore
+1
-0
1 addition, 0 deletions
.dockerignore
.gitlab-ci.yml
+15
-0
15 additions, 0 deletions
.gitlab-ci.yml
Containerfile
+21
-0
21 additions, 0 deletions
Containerfile
with
65 additions
and
0 deletions
.containerignore
0 → 100644
+
28
−
0
View file @
a24523bd
cert-manager-webhook-rwth
*.config
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Dependency directories (remove the comment below to include it)
# vendor/
# Go workspace file
go.work
.git
.gitlab-ci.yml
.gitignore
This diff is collapsed.
Click to expand it.
.dockerignore
0 → 120000
+
1
−
0
View file @
a24523bd
.containerignore
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
15
−
0
View file @
a24523bd
...
@@ -28,3 +28,18 @@ lint:
...
@@ -28,3 +28,18 @@ lint:
reports
:
reports
:
junit
:
golangci-output.xml
junit
:
golangci-output.xml
expire_in
:
7 days
expire_in
:
7 days
build-image
:
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
stage
:
deploy
before_script
:
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor version
script
:
-
>-
/kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile Containerfile
--destination $CI_REGISTRY_IMAGE:exp-$CI_COMMIT_SHA
This diff is collapsed.
Click to expand it.
Containerfile
0 → 100644
+
21
−
0
View file @
a24523bd
FROM
docker.io/library/golang:1-alpine
AS
build
ARG
GOARCH="amd64"
ARG
GOARM=""
WORKDIR
/workspace
ENV
GOPATH="/workspace/.go"
COPY
. .
RUN
go mod download
RUN
CGO_ENABLED
=
0
GOARCH
=
$GOARCH
GOARM
=
$GOARM
go build
-v
-o
webhook
-ldflags
'-w -s -extldflags "-static"'
.
FROM
scratch
COPY
--from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY
--from=build /workspace/webhook /webhook
ENTRYPOINT
["/webhook"]
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