Just create the sha256 inline so we know there are there.
Add a 'version' target in Makefile.release that prints the version so we
can double check that easily in the release script.
Signed-off-by: Miek Gieben <miek@miek.nl>
* Bump version to 1.2.2
Release 1.2.2
Signed-off-by: Miek Gieben <miek@miek.nl>
* Fix filename to what we upload
With ls dir/* the pathname returned are diff. then we with ls dir, fix
how curl is called.
Signed-off-by: Miek Gieben <miek@miek.nl>
For the 1.2.1 release we didn't upload the sha256 files. I've added
an echo, but some testing suggests that the files are created, so the
problem lays somewhere else.
Add a new upload section that sets the content type correctly and POST
the files as text/plain.
Signed-off-by: Miek Gieben <miek@miek.nl>
Generate the sha256 sum of each asset. These should all be automatically
be uploaded in the github-push target.
Signed-off-by: Miek Gieben <miek@miek.nl>
Releasing 1.2.0 uncovered some rough edges that need to be documented.
Also fix github-push target and docker login.
Signed-off-by: Miek Gieben <miek@miek.nl>
* release: automate the release
This PR aims to various pieces into place so we can automate the coredns
release. It needs the script from coredns/release to be installed. Dreck
is to be setup as described in coredns/release/README.md
The release-coredns script can be tested and allows for other branches
than master to be test.
This PR also features some cleanup in the Makefile.release so we don't
call the godep target for each linux release - this speeds it up for
some bit.
Manually running ./release-coredns -t auto-release builds the artifects
for this release, but (of course) doesn't upload anything yet.
Add /release to the OWNERS and allow command to be executed (this still
needs to be tested).
Signed-off-by: Miek Gieben <miek@miek.nl>
* that makefile target doesnt exist anymore
Signed-off-by: Miek Gieben <miek@miek.nl>
* test release for now
Signed-off-by: Miek Gieben <miek@miek.nl>
* Slightly better output
Signed-off-by: Miek Gieben <miek@miek.nl>
* remove again
Signed-off-by: Miek Gieben <miek@miek.nl>
* Replace gh-release with curl
This fix tries to address the issue raised in 1895 where
gh-release is deprecated.
As GitHub provides API that could be accessed easily,
and gh-release itself is just a wrapper to the API,
this fix replaces gh-release with the direct interaction
with GitHub API, so that it could be maintained by coredns
team.
This fix fixes 1895.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Added `-o /dev/null`
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Default to empty DOCKER var so you wont accidently push to the
production dockerhub. But allow to be overriden to you can push
to your registry. This allows you to re-use the CoreDNS makefiles for
your internal CI/CD.
Hacked Makefile with echos:
make DOCKER=bla -f Makefile.release docker-push
Pushing: 1.0.1
for arch in amd64 arm arm64 ppc64le s390x; do \
echo docker push bla/coredns:coredns-$arch ;\
done
docker push bla/coredns:coredns-amd64
docker push bla/coredns:coredns-arm
docker push bla/coredns:coredns-arm64
docker push bla/coredns:coredns-ppc64le
docker push bla/coredns:coredns-s390x
echo manifest-tool push from-args --platforms linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x --template bla/coredns:coredns-ARCH --target bla/coredns:1.0.1
manifest-tool push from-args --platforms linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x --template bla/coredns:coredns-ARCH --target bla/coredns:1.0.1
echo manifest-tool push from-args --platforms linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x --template bla/coredns:coredns-ARCH --target bla/coredns:latest
manifest-tool push from-args --platforms linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x --template bla/coredns:coredns-ARCH --target bla/coredns:latest
* Use one `PLATFORM` variable to setup the build process
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update Makefile.release
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update docker-build steps in Makefile.release
for different architectures
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update to use `case ... esac` in shell script
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Remove `RUN` cmd in Dockerfile in case of non amd64 CPU
ssl will only be supported on amd64 CPUs for now.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
While we at it, why not add a target for Windows as well.
This also introduces a VERBOSE option that defaults to -v, but it empty
when releases so that you can actually see what you're building.
Move an @echo out of shell snippet into the Makefile, as that errored
with @echo: command not found.
Sample run and resulting artifacts:
~~~
% make -f Makefile.release build
% find build -type f -exec file {} \;
build/windows/amd64/coredns: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
build/darwin/amd64/coredns: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS>
build/linux/ppc64le/coredns: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
build/linux/amd64/coredns: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
build/linux/arm/coredns: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
build/linux/s390x/coredns: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, stripped
build/linux/arm64/coredns: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
% make -f Makefile.release tar
% find release -type f | sort
release/coredns_0.9.9_darwin_amd64.tgz
release/coredns_0.9.9_linux_amd64.tgz
release/coredns_0.9.9_linux_arm64.tgz
release/coredns_0.9.9_linux_arm.tgz
release/coredns_0.9.9_linux_ppc64le.tgz
release/coredns_0.9.9_linux_s390x.tgz
release/coredns_0.9.9_windows_amd64.tgz
~~~
In Makefile.release `shell uname -m` was used to find the current architecture.
On amd64 systems this might be reported as `x86_64` depending on the Linux.
However, in order to have manifest docker images we need to stick with
golang's architecture tag of `amd64`.
This fix changes instead so that the correct architecture conforming to
golang (`amd64`) could be build.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Don't use the 'check and godep' target when building for a release, this
is now repeated 6 times for no reason as this is already checked on
travis.
Some other cleanups in the documentation as well.
* Consolidation of Makefile and Makefile.release
Several changes:
1. All go specific target like `go generate`, etc. has
been moved to Makefile. Now Makefile.release does not
repeat go build, etc. related rules.
2. In Makefile.release, the binary build is done through
`docker run` and with a fixed specific go version (currently 1.8.3).
This will help making sure build process could be reproduced
on any dev platform, with no dependency to the golang version
installed on the platform.
3. Platform related flags (e.g., "GOOS=darwin") are passed through
Makefile (not Makefile.release).
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update to only use `make` without running inside `docker run`
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Now the output would be:
```
./coredns -version
CoreDNS-010
linux/amd64, go1.8, 241e3db
```
In case the local file has been modified, then the output would be (with --dirty):
```
./coredns -version
CoreDNS-010
linux/amd64, go1.8, 241e3db-dirty
```
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Make the default target do nothing and put the actual release under a
'release' target. Prevent accidentally committing unwanted commits to
the repo.
Tested with `make -f Makefile.release -n`.
Add a MAINTAINERS file. It's not generated and not as elaborate (i.e. no
focus areas) as the one prometheus uses. But it's a start.
Generated with `git shortlog -s -n`, everyone with more than 5 commits.
Docs are put in `Makefile.release`.
Fixes#566