Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating cicd #169

Merged
merged 16 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: elastic/apm-pipeline-library/.github/actions/github-token@current
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
- uses: elastic/apm-pipeline-library/.github/actions/setup-git@current
with:
username: ${{ env.GIT_USER }}
email: ${{ env.GIT_EMAIL }}
token: ${{ env.GITHUB_TOKEN }}
LikeTheSalad marked this conversation as resolved.
Show resolved Hide resolved
- id: buildkite
name: Run Release
uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#Thu Apr 27 12:29:37 CEST 2023
dependencies.hash=D41D8CD98F00B204E9800998ECF8427E
dependencies.hash=D41D8CD98F00B204E9800998ECF8427E
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#Thu Apr 27 12:29:37 CEST 2023
dependencies.hash=D41D8CD98F00B204E9800998ECF8427E
dependencies.hash=D41D8CD98F00B204E9800998ECF8427E
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#Thu Apr 27 12:29:37 CEST 2023
dependencies.hash=D41D8CD98F00B204E9800998ECF8427E
dependencies.hash=D41D8CD98F00B204E9800998ECF8427E
3 changes: 1 addition & 2 deletions android-common/metadata/notice.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#Thu Apr 27 12:29:37 CEST 2023
dependencies.hash=C4E938CB5D2FBDF87B030546B2E27163
dependencies.hash=C4E938CB5D2FBDF87B030546B2E27163
3 changes: 1 addition & 2 deletions android-instrumentation/metadata/notice.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#Thu Apr 27 12:29:37 CEST 2023
dependencies.hash=A3B09917BB285EF396AF771F4773CA88
dependencies.hash=A3B09917BB285EF396AF771F4773CA88
3 changes: 1 addition & 2 deletions android-plugin/metadata/notice.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#Thu Apr 27 12:29:37 CEST 2023
dependencies.hash=0DD08B094996DCF2A76E9BDCF6AAD579
dependencies.hash=0DD08B094996DCF2A76E9BDCF6AAD579
3 changes: 1 addition & 2 deletions android-sdk-ktx/metadata/notice.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#Thu Apr 27 12:29:37 CEST 2023
dependencies.hash=359431A1C90E82A5470B06EDEEBC764A
dependencies.hash=359431A1C90E82A5470B06EDEEBC764A
3 changes: 1 addition & 2 deletions android-sdk/metadata/notice.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#Thu Apr 27 12:29:37 CEST 2023
dependencies.hash=2B4DA6DF07C8631523A0FDB5D9DDB7A4
dependencies.hash=2B4DA6DF07C8631523A0FDB5D9DDB7A4
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Properties;

public class NoticeMetadataHandler {
Expand Down Expand Up @@ -47,8 +46,8 @@ public void setDependenciesHash(String dependenciesHash) {
}

public void save(File output) {
try (OutputStream out = new FileOutputStream(output)) {
properties.store(out, null);
try (FileWriter writer = new FileWriter(output, false)) {
writer.write(PROPERTY_DEPENDENCIES_HASH + "=" + getDependenciesHash());
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ public void execute() {
updateChangelog(currentVersion);

publishChanges();
log("Finished the post deploy task successfully");
}

private void publishChanges() {
log("Committing changes");
runCommand("git commit -a -m \"Preparing for the next release\"");
log("Pushing changes");
runCommand("git push");
}

Expand All @@ -66,6 +69,7 @@ private void updateNextVersion(File gradlePropertiesFile, Properties properties,
}

private void updateChangelog(String newVersion) {
log("Updating changelog with version: " + newVersion);
Path changelogPath = getChangelogPath();
String contents = getContents(changelogPath);
contents = uncommentNextRelease(contents);
Expand Down