diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1c91769b..8bddc001 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,6 +12,12 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 - name: Unshallow run: git fetch --prune --unshallow @@ -33,7 +39,7 @@ jobs: name: Run GoReleaser for Release uses: goreleaser/goreleaser-action@v1 with: - version: v0.137.0 + version: v0.180.3 args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser-snapshot.yml b/.goreleaser-snapshot.yml index abb1861b..68f6b002 100644 --- a/.goreleaser-snapshot.yml +++ b/.goreleaser-snapshot.yml @@ -126,7 +126,3 @@ docker_manifests: image_templates: - 'meltwater/drone-cache:{{ .Tag }}-linux-amd64' - 'meltwater/drone-cache:{{ .Tag }}-linux-arm64' -- name_template: 'meltwater/drone-cache:latest' - image_templates: - - 'meltwater/drone-cache:{{ .Tag }}-linux-amd64' - - 'meltwater/drone-cache:{{ .Tag }}-linux-arm64' diff --git a/.goreleaser.yml b/.goreleaser.yml index 319b31c9..0487d71d 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -84,16 +84,10 @@ changelog: - Merge branch dockers: - - goos: linux - goarch: amd64 - goarm: '' - binaries: - - drone-cache image_templates: - - "meltwater/drone-cache:latest" - - "meltwater/drone-cache:{{ .Tag }}" - - "meltwater/drone-cache:v{{ .Major }}.{{ .Minor }}" - - "meltwater/drone-cache:v{{ .Major }}" + - "meltwater/drone-cache:{{ .Tag }}-linux-amd64" + - "meltwater/drone-cache:v{{ .Major }}.{{ .Minor }}-linux-amd64" + - "meltwater/drone-cache:v{{ .Major }}-linux-amd64" # TODO: Add missing GOOS and ARCH # .Os GOOS (usually allow replacements) @@ -101,10 +95,9 @@ dockers: # .Arm GOARM (usually allow replacements) # .Mips GOMIPS (usually allow replacements) # TODO: Add github docker repo - # - "docker.pkg.github.com/meltwater/drone-cache/drone-cache:latest" - # - "docker.pkg.github.com/meltwater/drone-cache/drone-cache:{{ .Tag }}" - # - "docker.pkg.github.com/meltwater/drone-cache/drone-cache:v{{ .Major }}.{{ .Minor }}" - # - "docker.pkg.github.com/meltwater/drone-cache/drone-cache:v{{ .Major }}" + # - "docker.pkg.github.com/meltwater/drone-cache/drone-cache:{{ .Tag }}-linux-amd64" + # - "docker.pkg.github.com/meltwater/drone-cache/drone-cache:v{{ .Major }}.{{ .Minor }}-linux-amd64" + # - "docker.pkg.github.com/meltwater/drone-cache/drone-cache:v{{ .Major }}-linux-amd64" # Skips the docker push. Could be useful if you also do draft releases. # If set to auto, the release will not be pushed to the docker repository @@ -112,7 +105,9 @@ dockers: # Defaults to false. It's auto as an additional safety measure. skip_push: auto dockerfile: Dockerfile + use: buildx build_flag_templates: + - "--platform=linux/amd64" - "--label=org.label-schema.schema-version=1.0" - "--label=version={{.Version}}" - "--label=org.label-schema.name={{.ProjectName}}" @@ -124,3 +119,57 @@ dockers: - "--label=org.opencontainers.image.version={{.Version}}" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.revision={{.FullCommit}}" + - + image_templates: + - "meltwater/drone-cache:{{ .Tag }}-linux-arm64" + - "meltwater/drone-cache:v{{ .Major }}.{{ .Minor }}-linux-arm64" + - "meltwater/drone-cache:v{{ .Major }}-linux-arm64" + + # TODO: Add missing GOOS and ARCH + # .Os GOOS (usually allow replacements) + # .Arch GOARCH (usually allow replacements) + # .Arm GOARM (usually allow replacements) + # .Mips GOMIPS (usually allow replacements) + # TODO: Add github docker repo + # - "docker.pkg.github.com/meltwater/drone-cache/drone-cache:{{ .Tag }}-linux-arm64" + # - "docker.pkg.github.com/meltwater/drone-cache/drone-cache:v{{ .Major }}.{{ .Minor }}-linux-arm64" + # - "docker.pkg.github.com/meltwater/drone-cache/drone-cache:v{{ .Major }}-linux-arm64" + + # Skips the docker push. Could be useful if you also do draft releases. + # If set to auto, the release will not be pushed to the docker repository + # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1 + # Defaults to false. It's auto as an additional safety measure. + skip_push: auto + dockerfile: Dockerfile + use: buildx + build_flag_templates: + - "--platform=linux/arm64" + - "--label=org.label-schema.schema-version=1.0" + - "--label=version={{.Version}}" + - "--label=org.label-schema.name={{.ProjectName}}" + - "--label=org.label-schema.version={{.Version}}" + - "--label=org.label-schema.build-date={{.Date}}" + - "--label=org.label-schema.vcs-ref={{.FullCommit}}" + - "--label=org.label-schema.docker.dockerfile=Dockerfile" + - "--label=org.opencontainers.image.name={{.ProjectName}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" + +docker_manifests: +- name_template: 'meltwater/drone-cache:{{ .Tag }}' + image_templates: + - 'meltwater/drone-cache:{{ .Tag }}-linux-amd64' + - 'meltwater/drone-cache:{{ .Tag }}-linux-arm64' +- name_template: 'meltwater/drone-cache:latest' + image_templates: + - 'meltwater/drone-cache:{{ .Tag }}-linux-amd64' + - 'meltwater/drone-cache:{{ .Tag }}-linux-arm64' +- name_template: 'meltwater/drone-cache:v{{ .Major }}.{{ .Minor }}' + image_templates: + - 'meltwater/drone-cache:v{{ .Major }}.{{ .Minor }}-linux-amd64' + - 'meltwater/drone-cache:v{{ .Major }}.{{ .Minor }}-linux-arm64' +- name_template: 'meltwater/drone-cache:v{{ .Major }}' + image_templates: + - 'meltwater/drone-cache:v{{ .Major }}-linux-amd64' + - 'meltwater/drone-cache:v{{ .Major }}-linux-arm64' diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f6ca821..f529d30f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,16 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -- [#99](https://github.com/meltwater/drone-cache/issues/99) Document building images and pushing locally for PR testing -- [#133](https://github.com/meltwater/drone-cache/pull/133) backend/s3: Fixed Anonymous Credentials Error on public buckets. - - Fixes [#132](https://github.com/meltwater/drone-cache/issues/132) -- [#138](https://github.com/meltwater/drone-cache/pull/138) backend/gcs: Fix GCS to pass credentials correctly when `GCS_ENDPOINT` is not set. -- [#135](https://github.com/meltwater/drone-cache/issues/135) backend/gcs: Fixed parsing of GCS JSON key. -- [#142](https://github.com/meltwater/drone-cache/issues/142) backend/s3: Add option to assume AWS IAM role -- [#151](https://github.com/meltwater/drone-cache/issues/151) backend/s3: Fix assume role parameter passing -- [#164](https://github.com/meltwater/drone-cache/issues/164) tests: lock azurite image to 3.10.0 ### Added +- Nothing. + +### Changed + +- Nothing. + +### Removed + +- Nothing. + +### Deprecated + +- Nothing. + +## [1.2.0] - 2021-09-29 + +### Added + +- [#146](https://github.com/meltwater/drone-cache/issues/146) Provide an arm image + - Multiple PRs +- [#99](https://github.com/meltwater/drone-cache/issues/99) Document building images and pushing locally for PR testing +- [#142](https://github.com/meltwater/drone-cache/issues/142) backend/s3: Add option to assume AWS IAM role - [#102](https://github.com/meltwater/drone-cache/pull/102) Implement option to disable cache rebuild if it already exists in storage. - [#86](https://github.com/meltwater/drone-cache/pull/86) Add backend operation timeout option that cancels request if they take longer than given duration. `BACKEND_OPERATION_TIMEOUT`, `backend.operation-timeot`. Default value is `3 minutes`. - [#86](https://github.com/meltwater/drone-cache/pull/86) Customize the cache key in the path. Adds a new `remote_root` option to customize it. Defaults to `repo.name`. @@ -29,11 +43,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- [#86](https://github.com/meltwater/drone-cache/pull/86) Support multipart uploads. - - Fixes [#55](https://github.com/meltwater/drone-cache/issues/55). - - Fixes [#88](https://github.com/meltwater/drone-cache/issues/88). -- [#86](https://github.com/meltwater/drone-cache/pull/86) Fixed rebuild errors when a nested path given in mount. - - Fixes [#87](https://github.com/meltwater/drone-cache/issues/87). +- [#138](https://github.com/meltwater/drone-cache/pull/138) backend/gcs: Fix GCS to pass credentials correctly when `GCS_ENDPOINT` is not set. +- [#135](https://github.com/meltwater/drone-cache/issues/135) backend/gcs: Fixed parsing of GCS JSON key. +- [#151](https://github.com/meltwater/drone-cache/issues/151) backend/s3: Fix assume role parameter passing +- [#164](https://github.com/meltwater/drone-cache/issues/164) tests: lock azurite image to 3.10.0 +- [#133](https://github.com/meltwater/drone-cache/pull/133) backend/s3: Fixed Anonymous Credentials Error on public buckets. + - Fixes [#132](https://github.com/meltwater/drone-cache/issues/132) ### Removed @@ -61,6 +76,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Nothing. +## [1.1.0] - 2020-06-11 + +### Changed + +- Docker login on CI +- Fix branch matchers +- Fix github actions +- Fix snapshot tag matcher +- [#121](https://github.com/meltwater/drone-cache/pull/121) Fix tests +- Generated missing embedded piece +- [#112](https://github.com/meltwater/drone-cache/pull/112) Improve documentation and development tooling +- [#125](https://github.com/meltwater/drone-cache/pull/125) Merge release v1.1 +- [#124](https://github.com/meltwater/drone-cache/pull/124) Push images for snapshots +- Remove branch trigger +- Remove draft from releases prevents publishing +- Remove snapshot flag from goreleaser +- [#117](https://github.com/meltwater/drone-cache/pull/117) Removing leading newline in code block +- Revert snapshot simplifications +- Simplify snapshot releaser config +- [#111](https://github.com/meltwater/drone-cache/pull/111) Update docs for CLI args with new override flag +- [#126](https://github.com/meltwater/drone-cache/pull/126) Use bingo for tool dependencies +- [#127](https://github.com/meltwater/drone-cache/pull/127) Use latest release candidate in CI +- User docker token + +### Removed + +- Nothing. + +### Deprecated + +- Nothing. + +## [1.0.4] - 2019-06-14 + +### Added + +- [#42](https://github.com/meltwater/drone-cache/pull/42) Add symlinks to archive + ## [1.0.3] - 2019-06-11 ### Added