Skip to content

Commit f55171a

Browse files
committed
update cicd
1 parent a4f2bc3 commit f55171a

3 files changed

Lines changed: 56 additions & 3 deletions

File tree

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ stages:
44
- update-version
55
#- check_registries
66
include:
7-
- component: $CI_SERVER_FQDN/5g/cicd-components/building-main-fast@main
7+
- component: $CI_SERVER_FQDN/5g/cicd-components/building-main-fast-v2@main
88
inputs:
99
stage: build
1010
stage_helm: update-version

Dockerfile.fast

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
6+
FROM golang:1.24.5-bookworm AS builder
7+
8+
RUN apt-get update && \
9+
apt-get -y install --no-install-recommends \
10+
vim && \
11+
apt-get clean
12+
13+
WORKDIR $GOPATH/src/simapp
14+
15+
ARG PATH_BINARY
16+
17+
COPY "${PATH_BINARY}" .
18+
19+
FROM alpine:3.22 AS simapp
20+
21+
LABEL maintainer="Aether SD-Core <dev@lists.aetherproject.org>" \
22+
description="Aether open source 5G Core Network" \
23+
version="Stage 3"
24+
25+
ARG DEBUG_TOOLS
26+
27+
RUN apk update && apk add --no-cache -U bash
28+
29+
# Install debug tools ~ 50MB (if DEBUG_TOOLS is set to true)
30+
RUN if [ "$DEBUG_TOOLS" = "true" ]; then \
31+
apk update && apk add --no-cache -U vim strace net-tools curl netcat-openbsd bind-tools; \
32+
fi
33+
34+
# Copy executable
35+
COPY --from=builder /go/src/simapp/* /usr/local/bin/.

Taskfile.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ vars:
1111
sh: cat ./VERSION 2>/dev/null || echo "latest"
1212

1313
# Docker related
14-
DOCKER_REGISTRY: ""
15-
DOCKER_REPOSITORY: ""
14+
DOCKER_REGISTRY: "192.168.12.15:8083/"
15+
DOCKER_REPOSITORY: "omecproject/"
1616
DOCKER_TAG: "{{.DOCKER_VERSION}}"
1717
DOCKER_IMAGENAME: "{{.DOCKER_REGISTRY}}{{.DOCKER_REPOSITORY}}{{.PROJECT_NAME}}:{{.DOCKER_TAG}}"
1818
DOCKER_BUILDKIT: 1
@@ -88,6 +88,24 @@ tasks:
8888
.
8989
- rm -rf vendor
9090

91+
# Docker build
92+
docker-build-fast:
93+
desc: "Build Docker image for pcf more fasted"
94+
cmds:
95+
- go mod vendor
96+
- |
97+
DOCKER_BUILDKIT={{.DOCKER_BUILDKIT}} docker build {{.DOCKER_BUILD_ARGS}} \
98+
--target {{.DOCKER_TARGETS}} \
99+
--tag {{.DOCKER_REGISTRY}}{{.DOCKER_REPOSITORY}}5gc-{{.DOCKER_TARGETS}}:{{.DOCKER_TAG}} \
100+
--build-arg org_label_schema_version="{{.DOCKER_VERSION}}" \
101+
--build-arg org_label_schema_vcs_url="{{.DOCKER_LABEL_VCS_URL}}" \
102+
--build-arg org_label_schema_vcs_ref="{{.DOCKER_LABEL_VCS_REF}}" \
103+
--build-arg org_label_schema_build_date="{{.DOCKER_LABEL_BUILD_DATE}}" \
104+
--build-arg org_opencord_vcs_commit_date="{{.DOCKER_LABEL_COMMIT_DATE}}" \
105+
--build-arg PATH_BINARY="{{.GO_BIN_PATH}}/{{.GO_NF}}" \
106+
--file="Dockerfile.fast" .
107+
- rm -rf vendor
108+
91109
# Docker push
92110
docker-push:
93111
desc: "Push Docker image to registry"

0 commit comments

Comments
 (0)