forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Snapshots instead of nightlies (elastic#1400)
* Snapshot/nigtlies no longer contain the date in the file names * We will publish now only one SNAPSHOT, the latest one * Inside all packages, there is a `.build_hash.txt` file containing the git hash so we can track the moment when the snapshot was created. In addition, this PR simplifies a bit the packaging process: * No longer use xgo, rather just call the docker commands directly. This is not a lot more complex and it's easier to modify the command (e.g add another env variable) when needed. * The logic to copy nightlies to latest is no longer needed * the deb_version and rpm_version are replaced with a sed that replaces - with ~ in the platform scripts * No longer use `docker cp` to copy the artifacts over, we already have a shared volume and that's faster.
- Loading branch information
1 parent
f4df86c
commit 515dd68
Showing
17 changed files
with
137 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
# this is executed in the docker fpm image | ||
set -e | ||
cd /build | ||
|
||
mkdir /{{.beat_name}}-{{.version}}-{{.bin_arch}} | ||
cp -r homedirs/{{.beat_name}}/* /{{.beat_name}}-{{.version}}-{{.bin_arch}}/ | ||
cp {{.beat_name}}-linux-{{.arch}} /{{.beat_name}}-{{.version}}-{{.bin_arch}}/{{.beat_name}} | ||
cp {{.beat_name}}-binary.yml /{{.beat_name}}-{{.version}}-{{.bin_arch}}/{{.beat_name}}.yml | ||
cp {{.beat_name}}.template.json /{{.beat_name}}-{{.version}}-{{.bin_arch}}/ | ||
# add SNAPSHOT if it was requested | ||
VERSION={{.version}} | ||
if [ "$SNAPSHOT" = "yes" ]; then | ||
VERSION="${VERSION}-SNAPSHOT" | ||
fi | ||
|
||
mkdir /{{.beat_name}}-${VERSION}-{{.bin_arch}} | ||
cp -a homedirs/{{.beat_name}}/. /{{.beat_name}}-${VERSION}-{{.bin_arch}}/ | ||
cp {{.beat_name}}-linux-{{.arch}} /{{.beat_name}}-${VERSION}-{{.bin_arch}}/{{.beat_name}} | ||
cp {{.beat_name}}-binary.yml /{{.beat_name}}-${VERSION}-{{.bin_arch}}/{{.beat_name}}.yml | ||
cp {{.beat_name}}.template.json /{{.beat_name}}-${VERSION}-{{.bin_arch}}/ | ||
|
||
mkdir -p upload/{{.beat_name}} | ||
tar czvf upload/{{.beat_name}}/{{.beat_name}}-{{.version}}-{{.bin_arch}}.tar.gz /{{.beat_name}}-{{.version}}-{{.bin_arch}} | ||
echo "Created upload/{{.beat_name}}/{{.beat_name}}-{{.version}}-{{.bin_arch}}.tar.gz" | ||
tar czvf upload/{{.beat_name}}/{{.beat_name}}-${VERSION}-{{.bin_arch}}.tar.gz /{{.beat_name}}-${VERSION}-{{.bin_arch}} | ||
echo "Created upload/{{.beat_name}}/{{.beat_name}}-${VERSION}-{{.bin_arch}}.tar.gz" | ||
|
||
cd upload/{{.beat_name}} | ||
sha1sum {{.beat_name}}-{{.version}}-{{.bin_arch}}.tar.gz > {{.beat_name}}-{{.version}}-{{.bin_arch}}.tar.gz.sha1.txt | ||
echo "Created upload/{{.beat_name}}/{{.beat_name}}-{{.version}}-{{.bin_arch}}.tar.gz.sha1.txt" | ||
sha1sum {{.beat_name}}-${VERSION}-{{.bin_arch}}.tar.gz > {{.beat_name}}-${VERSION}-{{.bin_arch}}.tar.gz.sha1.txt | ||
echo "Created upload/{{.beat_name}}/{{.beat_name}}-${VERSION}-{{.bin_arch}}.tar.gz.sha1.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
# this is executed in the docker fpm image | ||
set -e | ||
cd /build | ||
|
||
mkdir /{{.beat_name}}-{{.version}}-darwin | ||
cp -r homedirs/{{.beat_name}}/* /{{.beat_name}}-{{.version}}-darwin/ | ||
cp {{.beat_name}}-darwin-amd64 /{{.beat_name}}-{{.version}}-darwin/{{.beat_name}} | ||
cp {{.beat_name}}-darwin.yml /{{.beat_name}}-{{.version}}-darwin/{{.beat_name}}.yml | ||
cp {{.beat_name}}.template.json /{{.beat_name}}-{{.version}}-darwin/ | ||
# add SNAPSHOT if it was requested | ||
VERSION={{.version}} | ||
if [ "$SNAPSHOT" = "yes" ]; then | ||
VERSION="${VERSION}-SNAPSHOT" | ||
fi | ||
|
||
mkdir /{{.beat_name}}-${VERSION}-darwin | ||
cp -a homedirs/{{.beat_name}}/. /{{.beat_name}}-${VERSION}-darwin/ | ||
cp {{.beat_name}}-darwin-amd64 /{{.beat_name}}-${VERSION}-darwin/{{.beat_name}} | ||
cp {{.beat_name}}-darwin.yml /{{.beat_name}}-${VERSION}-darwin/{{.beat_name}}.yml | ||
cp {{.beat_name}}.template.json /{{.beat_name}}-${VERSION}-darwin/ | ||
|
||
mkdir -p upload/{{.beat_name}} | ||
tar czvf upload/{{.beat_name}}/{{.beat_name}}-{{.version}}-darwin.tgz /{{.beat_name}}-{{.version}}-darwin | ||
echo "Created upload/{{.beat_name}}/{{.beat_name}}-{{.version}}-darwin.tgz" | ||
tar czvf upload/{{.beat_name}}/{{.beat_name}}-${VERSION}-darwin.tgz /{{.beat_name}}-${VERSION}-darwin | ||
echo "Created upload/{{.beat_name}}/{{.beat_name}}-${VERSION}-darwin.tgz" | ||
|
||
cd upload/{{.beat_name}} | ||
sha1sum {{.beat_name}}-{{.version}}-darwin.tgz > {{.beat_name}}-{{.version}}-darwin.tgz.sha1.txt | ||
echo "Created upload/{{.beat_name}}/{{.beat_name}}-{{.version}}-darwin.tgz.sha1.txt" | ||
sha1sum {{.beat_name}}-${VERSION}-darwin.tgz > {{.beat_name}}-${VERSION}-darwin.tgz.sha1.txt | ||
echo "Created upload/{{.beat_name}}/{{.beat_name}}-${VERSION}-darwin.tgz.sha1.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
# this is executed in the docker fpm image | ||
set -e | ||
cd /build | ||
|
||
mkdir /{{.beat_name}}-{{.version}}-windows | ||
cp -r homedirs/{{.beat_name}}/* /{{.beat_name}}-{{.version}}-windows/ | ||
cp {{.beat_name}}-windows-{{.arch}}.exe /{{.beat_name}}-{{.version}}-windows/{{.beat_name}}.exe | ||
# add SNAPSHOT if it was requested | ||
VERSION={{.version}} | ||
if [ "$SNAPSHOT" = "yes" ]; then | ||
VERSION="${VERSION}-SNAPSHOT" | ||
fi | ||
|
||
mkdir /{{.beat_name}}-${VERSION}-windows | ||
cp -a homedirs/{{.beat_name}}/. /{{.beat_name}}-${VERSION}-windows/ | ||
cp {{.beat_name}}-windows-{{.arch}}.exe /{{.beat_name}}-${VERSION}-windows/{{.beat_name}}.exe | ||
unix2dos {{.beat_name}}-win.yml | ||
cp {{.beat_name}}-win.yml /{{.beat_name}}-{{.version}}-windows/{{.beat_name}}.yml | ||
cp {{.beat_name}}.template.json /{{.beat_name}}-{{.version}}-windows/ | ||
cp install-service-{{.beat_name}}.ps1 /{{.beat_name}}-{{.version}}-windows/ | ||
cp uninstall-service-{{.beat_name}}.ps1 /{{.beat_name}}-{{.version}}-windows/ | ||
cp {{.beat_name}}-win.yml /{{.beat_name}}-${VERSION}-windows/{{.beat_name}}.yml | ||
cp {{.beat_name}}.template.json /{{.beat_name}}-${VERSION}-windows/ | ||
cp install-service-{{.beat_name}}.ps1 /{{.beat_name}}-${VERSION}-windows/ | ||
cp uninstall-service-{{.beat_name}}.ps1 /{{.beat_name}}-${VERSION}-windows/ | ||
|
||
mkdir -p upload/{{.beat_name}} | ||
zip -r upload/{{.beat_name}}/{{.beat_name}}-{{.version}}-windows-{{.win_arch}}.zip /{{.beat_name}}-{{.version}}-windows | ||
echo "Created upload/{{.beat_name}}/{{.beat_name}}-{{.version}}-windows.zip" | ||
zip -r upload/{{.beat_name}}/{{.beat_name}}-${VERSION}-windows-{{.win_arch}}.zip /{{.beat_name}}-${VERSION}-windows | ||
echo "Created upload/{{.beat_name}}/{{.beat_name}}-${VERSION}-windows.zip" | ||
|
||
cd upload/{{.beat_name}} | ||
sha1sum {{.beat_name}}-{{.version}}-windows-{{.win_arch}}.zip > {{.beat_name}}-{{.version}}-windows-{{.win_arch}}.zip.sha1.txt | ||
echo "Created upload/{{.beat_name}}/{{.beat_name}}-{{.version}}-windows-{{.win_arch}}.zip.sha1.txt" | ||
sha1sum {{.beat_name}}-${VERSION}-windows-{{.win_arch}}.zip > {{.beat_name}}-${VERSION}-windows-{{.win_arch}}.zip.sha1.txt | ||
echo "Created upload/{{.beat_name}}/{{.beat_name}}-${VERSION}-windows-{{.win_arch}}.zip.sha1.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
version: "5.0.0-nightly${BUILDID}" | ||
rpm_version: "5.0.0~nightly${BUILDID}" | ||
deb_version: "5.0.0~nightly${BUILDID}" | ||
version: "5.0.0" |
Oops, something went wrong.