Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
14 changes: 6 additions & 8 deletions .github/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
if [ "$GOOS" == "linux" ]
then
set -e
go build -o cdis-data-client
go build -o calypr-cli ./cmd/calypr-cli
ls -al
if [ "$GITHUB_PULL_REQUEST" == "false" ]; then
mv gen3-client files && mv cdis-data-client gen3-client
zip dataclient_linux.zip gen3-client && mv dataclient_linux.zip ~/shared/.
zip calypr-cli_linux.zip calypr-cli && mv calypr-cli_linux.zip ~/shared/.
aws s3 sync ~/shared s3://cdis-dc-builds/$GITHUB_BRANCH
fi
set +e
elif [ "$GOOS" == "darwin" ]
then
set -e
go build -o cdis-data-client
go build -o calypr-cli ./cmd/calypr-cli
ls -al
if [ "$GITHUB_PULL_REQUEST" == "false" ]; then
mv gen3-client files && mv cdis-data-client gen3-client
zip dataclient_osx.zip gen3-client && mv dataclient_osx.zip ~/shared/.
zip calypr-cli_osx.zip calypr-cli && mv calypr-cli_osx.zip ~/shared/.
aws s3 sync ~/shared s3://cdis-dc-builds/$GITHUB_BRANCH
fi
set +e
elif [ "$GOOS" == "windows" ]
then
set -e
go build -o gen3-client.exe
go build -o calypr-cli.exe ./cmd/calypr-cli
ls -al
if [ "$GITHUB_PULL_REQUEST" == "false" ]; then
zip dataclient_win64.zip gen3-client.exe && mv dataclient_win64.zip ~/shared/.
zip calypr-cli_win64.zip calypr-cli.exe && mv calypr-cli_win64.zip ~/shared/.
aws s3 sync ~/shared s3://cdis-dc-builds/$GITHUB_BRANCH
fi
set +e
Expand Down
72 changes: 0 additions & 72 deletions .github/workflows/build_and_test_pull.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/build_and_test_push.yaml

This file was deleted.

12 changes: 5 additions & 7 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ name: "Test Coverage Check"

on:
pull_request:
branches:
- master
push:
branches:
- master
workflow_dispatch:

jobs:
coverage:
Expand All @@ -20,7 +17,8 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24.2'
go-version-file: go.mod
cache: true

- name: Run Tests with Coverage
run: |
Expand Down Expand Up @@ -52,7 +50,7 @@ jobs:
awk '/^ok[[:space:]]/ {
pkg=$2;
cov=$5;
gsub(/github.com\/calypr\/data-client\//, "", pkg);
gsub(/github.com\/calypr\/calypr-cli\//, "", pkg);
print "| " pkg " | " cov " |"
}' >> coverage-report.md

Expand Down Expand Up @@ -81,7 +79,7 @@ jobs:
awk '/^ok[[:space:]]/ {
pkg=$2;
cov=$5;
gsub(/github.com\/calypr\/data-client\//, "", pkg);
gsub(/github.com\/calypr\/calypr-cli\//, "", pkg);
print pkg, cov
}'
)
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/golang-ci-workflow.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/image_build_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Build Image and Push
uses: uc-cdis/.github/.github/workflows/image_build_push.yaml@master
with:
OVERRIDE_REPO_NAME: "gen3-client"
OVERRIDE_REPO_NAME: "calypr-cli"
secrets:
ECR_AWS_ACCESS_KEY_ID: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
ECR_AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
name: Integration tests
uses: uc-cdis/.github/.github/workflows/integration_tests.yaml@master
with:
QUAY_REPO: gen3-client
QUAY_REPO: calypr-cli
# Tag used in tests that depend on this repo (https://github.com/uc-cdis/gen3-code-vigil/blob/master/gen3-integration-tests/pyproject.toml)
SERVICE_TO_TEST: gen3_client
SERVICE_TO_TEST: calypr_cli
secrets:
CI_AWS_ACCESS_KEY_ID: ${{ secrets.CI_AWS_ACCESS_KEY_ID }}
CI_AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_AWS_SECRET_ACCESS_KEY }}
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64

WORKDIR $GOPATH/src/github.com/calypr/data-client/
WORKDIR $GOPATH/src/github.com/calypr/calypr-cli/

COPY go.mod .
COPY go.sum .
Expand All @@ -15,15 +15,15 @@ COPY . .

RUN COMMIT=$(git rev-parse HEAD); \
VERSION=$(git describe --always --tags); \
printf '%s\n' 'package g3cmd'\
printf '%s\n' 'package cmd'\
''\
'const ('\
' gitcommit="'"${COMMIT}"'"'\
' gitversion="'"${VERSION}"'"'\
')' > data-client/g3cmd/gitversion.go \
&& go build -o /data-client
')' > cmd/gitversion.go \
&& go build -o /calypr-cli .

FROM scratch
COPY --from=build-deps /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build-deps /data-client /data-client
CMD ["/data-client"]
COPY --from=build-deps /calypr-cli /calypr-cli
CMD ["/calypr-cli"]
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# --- Variables ---
# The name of the resulting binary (e.g., 'data-client' if your module is called data-client)
# The name of the resulting binary. Defaults to the repo directory name.
# Update this if your main package is not in the root directory.
TARGET_NAME := $(shell basename $(shell pwd))

# The default path to build the main package. Use '.' if your main package is in the root.
# Change this if your main package is in a subdirectory (e.g., ./cmd/myapp)
# The default build path. This repo keeps a root main package for `go build .`.
MAIN_PACKAGE := .

# The directory where the final binary will be placed
Expand Down Expand Up @@ -62,7 +61,7 @@ coverage-check: test-coverage
awk '/^ok[[:space:]]/ { \
pkg=$$2; \
cov=$$5; \
gsub(/github.com\\/calypr\\/data-client\\//, "", pkg); \
gsub(/github.com\\/calypr\\/calypr-cli\\//, "", pkg); \
print pkg, cov; \
}' | \
while read -r pkg cov; do \
Expand Down
Loading
Loading