Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Messaging
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mashplace
backend
Messaging
Commits
d61be283
Commit
d61be283
authored
1 year ago
by
rromanov
Browse files
Options
Downloads
Patches
Plain Diff
Changed pipeline schema
parent
62f556ec
Branches
Branches containing commit
Tags
b0.40.1
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+2
-3
2 additions, 3 deletions
.gitlab-ci.yml
Dockerfile
+38
-11
38 additions, 11 deletions
Dockerfile
Dockerfile.local
+13
-0
13 additions, 0 deletions
Dockerfile.local
with
53 additions
and
14 deletions
.gitlab-ci.yml
+
2
−
3
View file @
d61be283
include
:
-
project
:
infrastructure-team/operations/
mashroom
file
:
/CICD
/pipelines/backend-go-cicd.yaml
-
project
:
infrastructure-team/operations/
cicd
file
:
/pipelines/backend-go-cicd.yaml
This diff is collapsed.
Click to expand it.
Dockerfile
+
38
−
11
View file @
d61be283
FROM
registry.gitlab.mashplace.com/mashplace/devops/infrastructure/gobuild:1.15.6
as
builder
WORKDIR
/go/src/gitlab.mashplace.com/mashplace
################################################################################
### BUILD ###
################################################################################
# syntax=docker/dockerfile:1
ARG
REGISTRY=https://registry.gitlab.mashplace.com
ARG
VERSION=1.17
FROM
$REGISTRY/infrastructure-team/operations/imagebaykery/gobuild:$VERSION
AS
builder
WORKDIR
/go/src/mashroom
COPY
. .
RUN
export
GO111MODULE
=
on
CGO_ENABLED
=
0
GOOS
=
linux
GOARCH
=
amd64
GOPRIVATE
=
gitlab.mashplace.com
&&
\
cd
backend/messaging
&&
\
go mod download
&&
\
go generate
-v
tools.go
&&
\
go generate
-v
&&
\
go
install
-tags
netgo
-ldflags
'-w -extldflags "-static"'
-v
./cmd/...
FROM
scratch
ARG
GOPRIVATE=gitlab.mashplace.com/*
RUN
go mod tidy
-v
ARG
CGO_ENABLED=0
ARG
GOOS=linux
ARG
GOARCH=amd64
RUN
go build
-tags
netgo
\
-ldflags
'-w -extldflags "-static"'
-mod
readonly
\
-o
/go/bin/mashroom/messaging
-v
./cmd/...
################################################################################
### PRODUCTION ###
################################################################################
FROM
alpine:latest
as
production
COPY
--from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY
--from=builder /go/bin/mashroom-messaging /
ENTRYPOINT
["/mashroom-messaging"]
COPY
--from=builder /go/bin/mashroom /
ENTRYPOINT
["/messaging"]
This diff is collapsed.
Click to expand it.
Dockerfile.local
0 → 100644
+
13
−
0
View file @
d61be283
FROM registry.gitlab.mashplace.com/infrastructure-team/operations/imagebaykery/gobuild:1.19-5 as builder
WORKDIR /go/src/gitlab.mashplace.com/mashplace
COPY . .
RUN export GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GOPRIVATE=gitlab.mashplace.com && \
cd backend/messaging && \
go mod download && \
go generate -v tools.go && \
go generate -v && \
go install -tags netgo -ldflags '-w -extldflags "-static"' -v ./cmd/...
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /go/bin/mashroom-messaging /
ENTRYPOINT ["/mashroom-messaging"]
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