forked from sourcenetwork/defradb
-
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.
ci: Add workflow to ensure deps build properly (sourcenetwork#1078)
- Resolves sourcenetwork#1077 - Resolves sourcenetwork#1075 - Resolves-Partially sourcenetwork#1076 - Updated to new PATv2 (in the secrets) and updated with the new PAT name `ONLY_DEFRADB_REPO_CI_PAT`. - Add a new CI workflow to test our dependency-building steps are not broken (not required for PR to merge). - Add the deploy script that was written for cloning defradb on the cloud infra. - Added missing headers in workflow files.
- Loading branch information
1 parent
a4be954
commit 24ba329
Showing
9 changed files
with
151 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright 2023 Democratized Data Foundation | ||
# | ||
# Use of this software is governed by the Business Source License | ||
# included in the file licenses/BSL.txt. | ||
# | ||
# As of the Change Date specified in that file, in accordance with | ||
# the Business Source License, use of this software will be governed | ||
# by the Apache License, Version 2.0, included in the file | ||
# licenses/APL.txt. | ||
|
||
name: Build Dependencies Workflow | ||
|
||
on: | ||
pull_request: | ||
|
||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
build-dependencies: | ||
name: Build dependencies job | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout code into the directory | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Go environment explicitly | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.18" | ||
check-latest: true | ||
|
||
- name: Build all dependencies | ||
run: make deps |
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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2023 Democratized Data Foundation | ||
# | ||
# Use of this software is governed by the Business Source License | ||
# included in the file licenses/BSL.txt. | ||
# | ||
# As of the Change Date specified in that file, in accordance with | ||
# the Business Source License, use of this software will be governed | ||
# by the Apache License, Version 2.0, included in the file | ||
# licenses/APL.txt. | ||
|
||
# Pre-requirements: | ||
# - GoLang | ||
# - Git | ||
|
||
# Usage: ./deploy_defradb.sh <PAT> <RELEASE_TAG_OR_COMMIT> | ||
# Example: ./deploy_defradb.sh "v0.4.0" "github_pat_xyz" | ||
|
||
COMMIT_TO_DEPLOY="$1"; | ||
READ_ONLY_DEFRADB_PAT="$2"; | ||
DEFRADB_GIT_REPO="github.com/sourcenetwork/defradb.git"; | ||
|
||
\git clone "https://git:${READ_ONLY_DEFRADB_PAT}@${DEFRADB_GIT_REPO}"; | ||
|
||
\cd ./defradb || { printf "\ncd into defradb failed.\n" && exit 2; }; | ||
|
||
\git checkout "${COMMIT_TO_DEPLOY}" || { printf "\nchecking out commit failed.\n" && exit 3; }; | ||
|
||
\make deps:modules || { printf "\nbuilding defradb dependencies failed.\n" && exit 4; }; | ||
|
||
\make install || { printf "\nfailure while installing defradb.\n" && exit 5; }; | ||
|
||
\defradb version || { printf "\ndefradb installed but not working properly.\n" && exit 6; }; | ||
|
||
printf "\ndefradb successfully installed.\n"; |