ci: attempt to combine git-docker with git-binary
using a second Dockerfile, and the prevous Makefile changes to share the precompile step. git-binary.yaml temporarily set for ci-streamline branch and is in a "dry run" form.
This commit is contained in:
+52
-25
@@ -1,6 +1,6 @@
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: ci-streamline
|
||||||
# - evaluate: 'CI_PIPELINE_EVENT != "PULL_REQUEST" && CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH'
|
# - evaluate: 'CI_PIPELINE_EVENT != "PULL_REQUEST" && CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH'
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
@@ -40,30 +40,57 @@ steps:
|
|||||||
- curl -sfL https://goreleaser.com/static/run > goreleaser
|
- curl -sfL https://goreleaser.com/static/run > goreleaser
|
||||||
- chmod +x goreleaser
|
- chmod +x goreleaser
|
||||||
- ./scripts/version.sh ./goreleaser --snapshot --skip=publish --clean
|
- ./scripts/version.sh ./goreleaser --snapshot --skip=publish --clean
|
||||||
- name: redoc
|
# - name: redoc
|
||||||
|
# image: docker.io/hrfee/jfa-go-build-docker:latest
|
||||||
|
# environment:
|
||||||
|
# REDOC_SSH_ID:
|
||||||
|
# from_secret: REDOC_SSH_ID
|
||||||
|
# commands:
|
||||||
|
# - sh -c "echo \"$REDOC_SSH_ID\" > /tmp/id_redoc && chmod 600 /tmp/id_redoc"
|
||||||
|
# - bash -c 'sftp -P 3625 -i /tmp/id_redoc -o StrictHostKeyChecking=no redoc@api.jfa-go.com:/home/redoc <<< $"put docs/swagger.json jfa-go.json"'
|
||||||
|
# - name: deb-repo
|
||||||
|
# image: docker.io/hrfee/jfa-go-build-docker:latest
|
||||||
|
# environment:
|
||||||
|
# REPO_SSH_ID:
|
||||||
|
# from_secret: REPO_SSH_ID
|
||||||
|
# commands:
|
||||||
|
# - sh -c "echo \"$REPO_SSH_ID\" > /tmp/id_repo && chmod 600 /tmp/id_repo"
|
||||||
|
# - bash -c 'sftp -P 2022 -i /tmp/id_repo -o StrictHostKeyChecking=no root@apt.hrfee.dev:/repo/incoming <<< $"put dist/*.deb"'
|
||||||
|
# - bash -c 'ssh -i /tmp/id_repo root@apt.hrfee.dev -p 2022 "repo-process-deb trusty-unstable"'
|
||||||
|
# - bash -c 'ssh -i /tmp/id_repo root@apt.hrfee.dev -p 2022 "repo-process-deb trusty"'
|
||||||
|
# - bash -c 'ssh -i /tmp/id_repo root@apt.hrfee.dev -p 2022 "rm -f /repo/incoming/*.deb"'
|
||||||
|
# - name: buildrone
|
||||||
|
# image: docker.io/hrfee/jfa-go-build-docker:latest
|
||||||
|
# environment:
|
||||||
|
# BUILDRONE_KEY:
|
||||||
|
# from_secret: BUILDRONE_KEY
|
||||||
|
# commands:
|
||||||
|
# - wget https://builds.hrfee.pw/upload.py
|
||||||
|
# - bash -c 'python3 upload.py https://builds.hrfee.pw hrfee jfa-go --upload ./dist/*.zip ./dist/*.rpm ./dist/*.apk --tag internal-git=true'
|
||||||
|
- name: build-external
|
||||||
image: docker.io/hrfee/jfa-go-build-docker:latest
|
image: docker.io/hrfee/jfa-go-build-docker:latest
|
||||||
environment:
|
environment:
|
||||||
REDOC_SSH_ID:
|
JFA_GO_SNAPSHOT: y
|
||||||
from_secret: REDOC_SSH_ID
|
JFA_GO_BUILT_BY:
|
||||||
|
from_secret: BUILT_BY
|
||||||
commands:
|
commands:
|
||||||
- sh -c "echo \"$REDOC_SSH_ID\" > /tmp/id_redoc && chmod 600 /tmp/id_redoc"
|
- sed -i 's#id="password_resets-watch_directory" placeholder="/config/jellyfin"#id="password_resets-watch_directory" value="/jf" disabled#g' ./build/data/html/setup.html
|
||||||
- bash -c 'sftp -P 3625 -i /tmp/id_redoc -o StrictHostKeyChecking=no redoc@api.jfa-go.com:/home/redoc <<< $"put docs/swagger.json jfa-go.json"'
|
- env GOOS=linux ./scripts/version.sh ./goreleaser --snapshot --skip=publish --single-target --id notray-e2ee
|
||||||
- name: deb-repo
|
- name: container
|
||||||
image: docker.io/hrfee/jfa-go-build-docker:latest
|
image: docker.io/woodpeckerci/plugin-docker-buildx
|
||||||
environment:
|
settings:
|
||||||
REPO_SSH_ID:
|
dry_run: true
|
||||||
from_secret: REPO_SSH_ID
|
dockerfile: Dockerfile.ci
|
||||||
commands:
|
username:
|
||||||
- sh -c "echo \"$REPO_SSH_ID\" > /tmp/id_repo && chmod 600 /tmp/id_repo"
|
from_secret: DOCKER_USERNAME
|
||||||
- bash -c 'sftp -P 2022 -i /tmp/id_repo -o StrictHostKeyChecking=no root@apt.hrfee.dev:/repo/incoming <<< $"put dist/*.deb"'
|
password:
|
||||||
- bash -c 'ssh -i /tmp/id_repo root@apt.hrfee.dev -p 2022 "repo-process-deb trusty-unstable"'
|
from_secret: DOCKER_TOKEN
|
||||||
- bash -c 'ssh -i /tmp/id_repo root@apt.hrfee.dev -p 2022 "repo-process-deb trusty"'
|
repo: docker.io/hrfee/jfa-go
|
||||||
- bash -c 'ssh -i /tmp/id_repo root@apt.hrfee.dev -p 2022 "rm -f /repo/incoming/*.deb"'
|
tags: unstable
|
||||||
- name: buildrone
|
registry: docker.io
|
||||||
image: docker.io/hrfee/jfa-go-build-docker:latest
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
environment:
|
build_args:
|
||||||
BUILDRONE_KEY:
|
- BUILT_BY:
|
||||||
from_secret: BUILDRONE_KEY
|
from_secret: BUILT_BY
|
||||||
commands:
|
|
||||||
- wget https://builds.hrfee.pw/upload.py
|
|
||||||
- bash -c 'python3 upload.py https://builds.hrfee.pw hrfee jfa-go --upload ./dist/*.zip ./dist/*.rpm ./dist/*.apk --tag internal-git=true'
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
FROM golang:bookworm AS final
|
||||||
|
ARG TARGETARCH
|
||||||
|
|
||||||
|
COPY ./dist/notray-e2ee_linux_${TARGETARCH}* /opt/jfa-go
|
||||||
|
COPY ./build/data /opt/jfa-go/data
|
||||||
|
|
||||||
|
RUN apt-get update -y && apt-get install libolm-dev -y
|
||||||
|
|
||||||
|
EXPOSE 8056
|
||||||
|
EXPOSE 8057
|
||||||
|
|
||||||
|
CMD [ "/opt/jfa-go/jfa-go", "-data", "/data" ]
|
||||||
Reference in New Issue
Block a user