|
| 1 | +# This goreleaser config file requires GoReleaser Pro as it uses the prebuilt |
| 2 | +# builder type. |
| 3 | + |
| 4 | +archives: |
| 5 | + -id:coder-linux |
| 6 | +builds:[release-prebuilt-linux] |
| 7 | +format:tar.gz |
| 8 | + |
| 9 | +builds: |
| 10 | + -id:release-prebuilt-linux |
| 11 | +builder:prebuilt |
| 12 | +goos:[linux] |
| 13 | +goarch:[amd64, arm, arm64] |
| 14 | +goarm:["7"] |
| 15 | +prebuilt: |
| 16 | +path:artifacts/coder-linux_{{.Os}}_{{.Arch}}{{ with .Arm }}_{{ . }}{{ end }}/coder |
| 17 | + |
| 18 | +# This section is also contained in .goreleaser.yaml. |
| 19 | +nfpms: |
| 20 | + -id:packages |
| 21 | +vendor:Coder |
| 22 | +homepage:https://coder.com |
| 23 | +maintainer:Coder <support@coder.com> |
| 24 | +description:| |
| 25 | + Provision development environments with infrastructure with code |
| 26 | +formats: |
| 27 | + -apk |
| 28 | + -deb |
| 29 | + -rpm |
| 30 | +suggests: |
| 31 | + -postgresql |
| 32 | +builds: |
| 33 | + -release-prebuilt-linux |
| 34 | +bindir:/usr/bin |
| 35 | +contents: |
| 36 | + -src:coder.env |
| 37 | +dst:/etc/coder.d/coder.env |
| 38 | +type:"config|noreplace" |
| 39 | + -src:coder.service |
| 40 | +dst:/usr/lib/systemd/system/coder.service |
| 41 | + |
| 42 | +# Image templates are empty on snapshots to avoid lengthy builds for |
| 43 | +# development. |
| 44 | +dockers: |
| 45 | + -image_templates:["{{ if not .IsSnapshot }}ghcr.io/coder/coder:{{ .Tag }}-amd64{{ end }}"] |
| 46 | +id:release-prebuilt-linux |
| 47 | +dockerfile:Dockerfile |
| 48 | +use:buildx |
| 49 | +build_flag_templates: |
| 50 | + ---platform=linux/amd64 |
| 51 | + ---label=org.opencontainers.image.title=Coder |
| 52 | + ---label=org.opencontainers.image.description=A tool for provisioning self-hosted development environments with Terraform. |
| 53 | + ---label=org.opencontainers.image.url=https://github.com/coder/coder |
| 54 | + ---label=org.opencontainers.image.source=https://github.com/coder/coder |
| 55 | + ---label=org.opencontainers.image.version={{ .Version }} |
| 56 | + ---label=org.opencontainers.image.revision={{ .FullCommit }} |
| 57 | + ---label=org.opencontainers.image.licenses=AGPL-3.0 |
| 58 | + -image_templates:["{{ if not .IsSnapshot }}ghcr.io/coder/coder:{{ .Tag }}-arm64{{ end }}"] |
| 59 | +goarch:arm64 |
| 60 | +dockerfile:Dockerfile |
| 61 | +use:buildx |
| 62 | +build_flag_templates: |
| 63 | + ---platform=linux/arm64/v8 |
| 64 | + ---label=org.opencontainers.image.title=coder |
| 65 | + ---label=org.opencontainers.image.description=A tool for provisioning self-hosted development environments with Terraform. |
| 66 | + ---label=org.opencontainers.image.url=https://github.com/coder/coder |
| 67 | + ---label=org.opencontainers.image.source=https://github.com/coder/coder |
| 68 | + ---label=org.opencontainers.image.version={{ .Tag }} |
| 69 | + ---label=org.opencontainers.image.revision={{ .FullCommit }} |
| 70 | + ---label=org.opencontainers.image.licenses=AGPL-3.0 |
| 71 | + -image_templates:["{{ if not .IsSnapshot }}ghcr.io/coder/coder:{{ .Tag }}-armv7{{ end }}"] |
| 72 | +goarch:arm |
| 73 | +goarm:"7" |
| 74 | +dockerfile:Dockerfile |
| 75 | +use:buildx |
| 76 | +build_flag_templates: |
| 77 | + ---platform=linux/arm/v7 |
| 78 | + ---label=org.opencontainers.image.title=Coder |
| 79 | + ---label=org.opencontainers.image.description=A tool for provisioning self-hosted development environments with Terraform. |
| 80 | + ---label=org.opencontainers.image.url=https://github.com/coder/coder |
| 81 | + ---label=org.opencontainers.image.source=https://github.com/coder/coder |
| 82 | + ---label=org.opencontainers.image.version={{ .Tag }} |
| 83 | + ---label=org.opencontainers.image.revision={{ .FullCommit }} |
| 84 | + ---label=org.opencontainers.image.licenses=AGPL-3.0 |
| 85 | + |
| 86 | +docker_manifests: |
| 87 | + -name_template:ghcr.io/coder/coder:{{ .Tag }} |
| 88 | +image_templates: |
| 89 | + -ghcr.io/coder/coder:{{ .Tag }}-amd64 |
| 90 | + -ghcr.io/coder/coder:{{ .Tag }}-arm64 |
| 91 | + -ghcr.io/coder/coder:{{ .Tag }}-armv7 |
| 92 | + |
| 93 | +release: |
| 94 | +ids:[release-prebuilt-linux, packages] |
| 95 | +footer:| |
| 96 | + ## Container Image |
| 97 | + - `docker pull ghcr.io/coder/coder:{{ .Tag }}` |
| 98 | +# All non-Linux files should just be used as is. We have to import the Linux |
| 99 | +# builds so that the docker images get built and package creation works. |
| 100 | +extra_files: |
| 101 | + -glob:./artifacts/coder_*_darwin_*.zip |
| 102 | + -glob:./artifacts/coder_*_windows_*.zip |
| 103 | + |
| 104 | +snapshot: |
| 105 | +name_template:"{{ .Version }}-devel+{{ .ShortCommit }}" |