Skip to content

Commit

Permalink
Resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
kockan committed Feb 15, 2024
2 parents ca9d000 + 6d33c94 commit 12f2e9b
Show file tree
Hide file tree
Showing 2,799 changed files with 460,978 additions and 36,033 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
testdata/picard/reference/test_windows_line_endings.fasta eol=crlf

6 changes: 5 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## ***This issue tracker is for bug reports only. Before opening a new issue here, please make a post on our [support forum](https://gatk.broadinstitute.org/hc/en-us/community/topics) so that our support team can look at your issue and determine whether it needs to be escalated into a bug report.***

----

### Instructions

- Use a **concise** yet **descriptive** title;
Expand Down Expand Up @@ -49,4 +53,4 @@ _Tool name(s), parameters?_
### Description
_Describe what needs to be added or modified._

----
----
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Never delete this, it is our record that procedure was followed. If you find tha
#### Content
- [ ] Added or modified tests to cover changes and any new functionality
- [ ] Edited the README / documentation (if applicable)
- [ ] All tests passing on Travis
- [ ] All tests passing on github actions

#### Review
- [ ] Final thumbs-up from reviewer
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/cloud_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Cloud Tests
on:
push:
branches:
- 'master'
pull_request:
workflow_dispatch:

env:
PICARD_TEST_INPUTS: gs://hellbender/test/resources/
PICARD_TEST_STAGING: gs://hellbender-test-logs/staging/
PICARD_TEST_LOGS: /hellbender-test-logs/build_reports/
PICARD_TEST_PROJECT: broad-dsde-dev

jobs:
## This workaround is necessary since there is no equivalent to the old TRAVIS_SECURE_ENVIRONMENT variable that indicated
## if a run was privileged and had secrets. Since the GCP credentials are necessary for all tests in order to upload their,
## results that makes them a reasonable proxy for testing the credentials of this entire execution. https://github.com/actions/runner/issues/520
check-secrets:
name: check if the environment has privileges
outputs:
google-credentials: ${{ steps.google-credentials.outputs.defined }}
runs-on: ubuntu-latest
steps:
- id: google-credentials
env:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
if: "${{ env.GCP_CREDENTIALS != '' }}"
run: echo defined=true >> $GITHUB_OUTPUT

test:
runs-on: ubuntu-latest
needs: check-secrets
strategy:
matrix:
java: [ 17 ]
run_barclay_tests: [true, false]
experimental: [ false ]
fail-fast: false
continue-on-error: ${{ matrix.experimental }}
name: Java ${{ matrix.Java }}, Barclay=${{ matrix.run_barclay_tests}} cloud tests
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Set up java ${{ matrix.Java }}'
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.Java }}
distribution: 'temurin'
cache: gradle

- name: 'Compile with Gradle'
run: |
./gradlew compileJava
./gradlew installDist
#Google Cloud stuff
- id: 'gcloud-auth'
if: needs.check-secrets.outputs.google-credentials == 'true'
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
project_id: ${{ env.PICARD_TEST_PROJECT }}
create_credentials_file: true

- name: 'Set up Cloud SDK'
if: needs.check-secrets.outputs.google-credentials == 'true'
uses: google-github-actions/setup-gcloud@v2

- name: compile test code
if: needs.check-secrets.outputs.google-credentials == 'true'
run: ./gradlew compileTestJava

- name: Run tests
if: needs.check-secrets.outputs.google-credentials == 'true'
env:
TEST_TYPE: cloud
run: |
if [[ ${{matrix.run_barclay_tests}} == true ]]; then
echo "Running tests using the Barclay command line parser."
./gradlew barclayTest
else
echo "Running tests using the legacy Picard command line parser."
./gradlew jacocoTestReport
fi
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: cloud-test-results-${{ matrix.Java }}-barclay-${{ matrix.run_barclay_tests}}
path: build/reports/tests
59 changes: 59 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This is a github actions workflow which runs picard tests

name: Build and Test
on:
push:
branches: [master]
pull_request:
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17 ]
experimental: [false]
run_barclay_tests: [true, false]
fail-fast: false
continue-on-error: ${{ matrix.experimental }}
name: Java ${{ matrix.Java }}, Barclay=${{ matrix.run_barclay_tests}} tests
steps:
- uses: actions/checkout@v3
- name: Set up java ${{ matrix.Java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.Java }}
distribution: 'temurin'
cache: gradle
- name: "set up R"
run: |
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-get -qq update
sudo apt-get install -y --no-install-recommends r-base-dev r-recommended qpdf
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Compile with Gradle
run: ./gradlew compileJava
- name: Run tests
run: |
if [[ ${{matrix.run_barclay_tests}} == true ]]; then
echo "Running tests using the Barclay command line parser."
./gradlew barclayTest
else
echo "Running tests using the legacy Picard command line parser."
./gradlew jacocoTestReport
fi
- name: "Build the jar and run a commandline test for sanity checking"
run: |
./gradlew currentJar
java -jar build/libs/picard.jar MarkDuplicates -I testdata/picard/sam/aligned_queryname_sorted.bam -O out.bam --METRICS_FILE out.metrics
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results-${{ matrix.Java }}-barclay-${{ matrix.run_barclay_tests}}
path: build/reports/tests



12 changes: 12 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: dsp-appsec-trivy
on: [pull_request]

jobs:
appsec-trivy:
# Parse Dockerfile and build, scan image if a "blessed" base image is not used
name: DSP AppSec Trivy check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: broadinstitute/dsp-appsec-trivy-action@v1
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ report
jacoco.data
.gradle
build
*.swp
.vscode
# OSX file system stuff
.DS_STORE

# Jenv file to set directory java version
.java-version
19 changes: 0 additions & 19 deletions .pullapprove.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

50 changes: 26 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
FROM openjdk:8
MAINTAINER Broad Institute DSDE <[email protected]>
ARG BASE_DOCKER=eclipse-temurin:17-jdk
ARG release=false

ARG build_command=shadowJar
ARG jar_name=picard.jar
FROM ${BASE_DOCKER} as build
LABEL stage=buildStage

# Install ant, git for building
# Install git for building
RUN apt-get update && \
apt-get --no-install-recommends install -y --force-yes \
git \
r-base \
ant && \
apt-get clean autoclean && \
apt-get autoremove -y
apt-get --no-install-recommends install -y \
git

# Assumes Dockerfile lives in root of the git repo. Pull source files into container
COPY / /usr/picard/
WORKDIR /usr/picard

# Build the distribution jar, clean up everything else
RUN ./gradlew ${build_command} && \
mv build/libs/${jar_name} picard.jar && \
mv src/main/resources/picard/docker_helper.sh docker_helper.sh && \
./gradlew clean && \
rm -rf src && \
rm -rf gradle && \
rm -rf .git && \
rm gradlew && \
rm build.gradle
# download gradle then build
RUN ./gradlew -Drelease=${release} \
clean \
printVersion \
shadowJar

FROM ${BASE_DOCKER} as final
MAINTAINER Broad Institute DSDE <[email protected]>

# Install R
RUN apt-get update && \
apt-get --no-install-recommends install -y \
r-base &&\
apt-get clean autoclean && \
apt-get autoremove -y

RUN mkdir /usr/picard/

COPY --from=build /usr/picard/build/libs/picard.jar /usr/picard/

RUN mkdir /usr/working
WORKDIR /usr/working

ENTRYPOINT ["/usr/picard/docker_helper.sh"]
CMD [""]
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Broad Institute
Copyright (c) 2017-2021 Broad Institute

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 12f2e9b

Please sign in to comment.