Commit 68244ba9 authored by Jens Langhammer's avatar Jens Langhammer

Fix linting errors, add tier0 docker build

parent 9850674b
Pipeline #3858 passed with stage
in 1 minute and 25 seconds
......@@ -3,7 +3,7 @@ stages:
- build-build-image
- test
- build
- docs
- package
image: docker.beryju.org/p2/build-base:latest
services:
- postgres:latest
......@@ -52,7 +52,8 @@ coverage:
- coverage html
stage: test
package-docker:
build-p2-server:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
......@@ -60,12 +61,24 @@ package-docker:
- echo "{\"auths\":{\"docker.beryju.org\":{\"auth\":\"$DOCKER_AUTH\"}}}" > /kaniko/.docker/config.json
script:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination docker.beryju.org/p2/server:latest --destination docker.beryju.org/p2/server:0.5.6
only:
- tags
- /^version/.*$/
build-p2-tier0:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
before_script:
- echo "{\"auths\":{\"docker.beryju.org\":{\"auth\":\"$DOCKER_AUTH\"}}}" > /kaniko/.docker/config.json
script:
- /kaniko/executor --context $CI_PROJECT_DIR/tier0 --dockerfile $CI_PROJECT_DIR/tier0/Dockerfile --destination docker.beryju.org/p2/tier0:latest --destination docker.beryju.org/p2/tier0:0.5.6
only:
- tags
- /^version/.*$/
package-helm:
stage: build
stage: package
script:
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash
- helm init --client-only
......@@ -79,7 +92,7 @@ package-helm:
- tags
- /^version/.*$/
package-installer:
stage: build
stage: package
script:
- echo Hello World
artifacts:
......
......@@ -4,7 +4,6 @@ from django.urls import path
from p2.ui.views import general
from p2.ui.views.api import key
from p2.ui.views.core import blob, component, storage, volume
from p2.ui.views.log import adaptor, record
from p2.ui.views.serve import rule
app_name = 'p2_ui'
......
......@@ -4,18 +4,13 @@ WORKDIR /go/src/git.beryju.org/BeryJu.org/p2/tier0
ENV GO111MODULE=on
COPY go.mod .
COPY go.sum .
COPY . .
RUN go mod download && \
go build -v -o /go/bin/tier0
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /go/bin/tier0 /tier0
CMD "/tier0"
......@@ -8,10 +8,11 @@ import (
"os"
"time"
"git.beryju.org/BeryJu.org/tier0/pkg/cache"
"git.beryju.org/BeryJu.org/tier0/pkg/constants"
"git.beryju.org/BeryJu.org/tier0/pkg/k8s"
"git.beryju.org/BeryJu.org/tier0/pkg/p2"
"git.beryju.org/BeryJu.org/p2/tier0/pkg/cache"
"git.beryju.org/BeryJu.org/p2/tier0/pkg/constants"
"git.beryju.org/BeryJu.org/p2/tier0/pkg/k8s"
"git.beryju.org/BeryJu.org/p2/tier0/pkg/p2"
"github.com/gorilla/handlers"
"github.com/qbig/groupcache"
log "github.com/sirupsen/logrus"
......
......@@ -8,9 +8,10 @@ import (
"github.com/gorilla/handlers"
"git.beryju.org/BeryJu.org/tier0/pkg/constants"
"git.beryju.org/BeryJu.org/tier0/pkg/k8s"
"git.beryju.org/BeryJu.org/tier0/pkg/p2"
"git.beryju.org/BeryJu.org/p2/tier0/pkg/constants"
"git.beryju.org/BeryJu.org/p2/tier0/pkg/k8s"
"git.beryju.org/BeryJu.org/p2/tier0/pkg/p2"
"github.com/qbig/groupcache"
log "github.com/sirupsen/logrus"
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment