2021-07-23 09:00:07 +00:00
|
|
|
version: v1.0
|
|
|
|
name: Traefik
|
|
|
|
agent:
|
|
|
|
machine:
|
|
|
|
type: e1-standard-4
|
2023-04-28 13:36:05 +00:00
|
|
|
os_image: ubuntu2004
|
2021-07-23 09:00:07 +00:00
|
|
|
|
|
|
|
fail_fast:
|
|
|
|
stop:
|
|
|
|
when: "branch != 'master'"
|
|
|
|
|
|
|
|
auto_cancel:
|
|
|
|
queued:
|
|
|
|
when: "branch != 'master'"
|
|
|
|
running:
|
|
|
|
when: "branch != 'master'"
|
|
|
|
|
|
|
|
global_job_config:
|
|
|
|
prologue:
|
|
|
|
commands:
|
|
|
|
- curl -sSfL https://raw.githubusercontent.com/ldez/semgo/master/godownloader.sh | sudo sh -s -- -b "/usr/local/bin"
|
2023-02-23 14:06:05 +00:00
|
|
|
- sudo semgo go1.20
|
2021-07-23 09:00:07 +00:00
|
|
|
- export "GOPATH=$(go env GOPATH)"
|
|
|
|
- export "SEMAPHORE_GIT_DIR=${GOPATH}/src/github.com/traefik/${SEMAPHORE_PROJECT_NAME}"
|
|
|
|
- export "PATH=${GOPATH}/bin:${PATH}"
|
|
|
|
- mkdir -vp "${SEMAPHORE_GIT_DIR}" "${GOPATH}/bin"
|
|
|
|
- export GOPROXY=https://proxy.golang.org,direct
|
2023-04-03 08:06:06 +00:00
|
|
|
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v1.52.2
|
2021-12-22 13:12:04 +00:00
|
|
|
- curl -sSfL https://gist.githubusercontent.com/traefiker/6d7ac019c11d011e4f131bb2cca8900e/raw/goreleaser.sh | bash -s -- -b "${GOPATH}/bin"
|
2021-07-23 09:00:07 +00:00
|
|
|
- checkout
|
|
|
|
- cache restore traefik-$(checksum go.sum)
|
|
|
|
|
|
|
|
blocks:
|
2021-11-25 10:10:06 +00:00
|
|
|
- name: Test Integration
|
2021-07-23 09:00:07 +00:00
|
|
|
dependencies: []
|
|
|
|
run:
|
|
|
|
when: "branch =~ '.*' OR pull_request =~'.*'"
|
|
|
|
task:
|
|
|
|
jobs:
|
2021-11-25 10:10:06 +00:00
|
|
|
- name: Test Integration
|
2021-07-23 09:00:07 +00:00
|
|
|
commands:
|
|
|
|
- make pull-images
|
2022-02-18 14:44:08 +00:00
|
|
|
- touch webui/static/index.html # Avoid generating webui
|
2022-03-03 14:42:08 +00:00
|
|
|
- IN_DOCKER="" make binary
|
2021-11-25 10:10:06 +00:00
|
|
|
- make test-integration
|
2021-07-23 09:00:07 +00:00
|
|
|
- df -h
|
|
|
|
epilogue:
|
|
|
|
always:
|
|
|
|
commands:
|
|
|
|
- cache store traefik-$(checksum go.sum) $HOME/go/pkg/mod
|
|
|
|
|
|
|
|
- name: Release
|
|
|
|
dependencies: []
|
|
|
|
run:
|
|
|
|
when: "tag =~ '.*'"
|
|
|
|
task:
|
2021-08-05 08:08:06 +00:00
|
|
|
agent:
|
|
|
|
machine:
|
|
|
|
type: e1-standard-8
|
2023-04-28 13:36:05 +00:00
|
|
|
os_image: ubuntu2004
|
2021-07-23 09:00:07 +00:00
|
|
|
secrets:
|
|
|
|
- name: traefik
|
|
|
|
env_vars:
|
|
|
|
- name: GH_VERSION
|
2023-08-04 10:26:05 +00:00
|
|
|
value: 2.32.1
|
2021-07-23 09:00:07 +00:00
|
|
|
- name: CODENAME
|
2023-03-22 10:06:05 +00:00
|
|
|
value: "saintmarcelin"
|
2022-03-03 14:42:08 +00:00
|
|
|
- name: IN_DOCKER
|
2021-07-23 09:00:07 +00:00
|
|
|
value: ""
|
|
|
|
prologue:
|
|
|
|
commands:
|
|
|
|
- export VERSION=${SEMAPHORE_GIT_TAG_NAME}
|
|
|
|
- curl -sSL -o /tmp/gh_${GH_VERSION}_linux_amd64.tar.gz https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_amd64.tar.gz
|
|
|
|
- tar -zxvf /tmp/gh_${GH_VERSION}_linux_amd64.tar.gz -C /tmp
|
|
|
|
- sudo mv /tmp/gh_${GH_VERSION}_linux_amd64/bin/gh /usr/local/bin/gh
|
2023-06-19 15:34:05 +00:00
|
|
|
- sudo rm -rf ~/.phpbrew ~/.kerl ~/.sbt ~/.nvm ~/.npm ~/.kiex /usr/lib/jvm /opt/az /opt/firefox /usr/lib/google-cloud-sdk ~/.rbenv ~/.pip_download_cache # Remove unnecessary data.
|
2022-03-28 15:36:07 +00:00
|
|
|
- sudo service docker stop && sudo umount /var/lib/docker && sudo service docker start # Unmounts the docker disk and the whole system disk is usable.
|
2021-07-23 09:00:07 +00:00
|
|
|
jobs:
|
|
|
|
- name: Release
|
|
|
|
commands:
|
|
|
|
- make release-packages
|
2023-08-04 10:26:05 +00:00
|
|
|
- gh release create ${SEMAPHORE_GIT_TAG_NAME} ./dist/**/traefik*.{zip,tar.gz} ./dist/traefik*.{tar.gz,txt} --repo traefik/traefik --title ${SEMAPHORE_GIT_TAG_NAME} --notes ${SEMAPHORE_GIT_TAG_NAME}
|
2021-07-23 09:00:07 +00:00
|
|
|
- ./script/deploy.sh
|