2024-07-26 11:45:57 +00:00
|
|
|
when:
|
|
|
|
- event: push
|
|
|
|
branch: main
|
|
|
|
# - evaluate: 'CI_PIPELINE_EVENT != "PULL_REQUEST" && CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH'
|
|
|
|
|
|
|
|
clone:
|
|
|
|
git:
|
|
|
|
image: woodpeckerci/plugin-git
|
|
|
|
settings:
|
|
|
|
tags: true
|
2024-07-26 18:41:57 +00:00
|
|
|
partial: false
|
|
|
|
depth: 0
|
2024-07-26 11:45:57 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build
|
|
|
|
image: docker.io/hrfee/jfa-go-build-docker:latest
|
|
|
|
environment:
|
|
|
|
JFA_GO_SNAPSHOT: y
|
|
|
|
JFA_GO_BUILT_BY:
|
|
|
|
from_secret: BUILT_BY
|
|
|
|
commands:
|
|
|
|
- curl -sfL https://goreleaser.com/static/run > goreleaser
|
|
|
|
- chmod +x goreleaser
|
|
|
|
- ./scripts/version.sh ./goreleaser --snapshot --skip=publish --clean
|
2024-08-06 20:06:06 +00:00
|
|
|
- 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"'
|
2024-07-26 11:45:57 +00:00
|
|
|
- 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"
|
2024-07-26 17:22:47 +00:00
|
|
|
- bash -c 'sftp -P 2022 -i /tmp/id_repo -o StrictHostKeyChecking=no root@apt.hrfee.dev:/repo/incoming <<< $"put dist/*.deb"'
|
2024-07-26 18:22:31 +00:00
|
|
|
- bash -c 'ssh -i /tmp/id_repo root@apt.hrfee.dev -p 2022 "repo-process-deb trusty-unstable"'
|
2024-07-26 17:22:47 +00:00
|
|
|
- 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"'
|
2024-07-26 11:45:57 +00:00
|
|
|
- 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'
|