Skip to content

Commit c45f88d

Browse files
committed
Prepare 4.0.0.-alpha release
2 parents 4abef95 + 8e0b6bc commit c45f88d

16 files changed

+265
-115
lines changed

.github/workflows/docker.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,35 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Check out the repo
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v3
1313
-
1414
name: Sanitize Repo Name for Tagging
1515
run: echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]' | (read; echo REPO_LOWER=$REPLY) >> $GITHUB_ENV
1616
-
1717
name: Set up QEMU
18-
uses: docker/setup-qemu-action@v1
18+
uses: docker/setup-qemu-action@v2
1919
-
2020
name: Set up Docker Buildx
21-
uses: docker/setup-buildx-action@v1
21+
uses: docker/setup-buildx-action@v2
2222
-
2323
name: Login to Docker Hub
24-
uses: docker/login-action@v1
24+
uses: docker/login-action@v2
2525
with:
2626
username: ${{ secrets.DOCKERHUB_USERNAME }}
2727
password: ${{ secrets.DOCKERHUB_TOKEN }}
2828
-
2929
name: Login to GitHub Container Registry
30-
uses: docker/login-action@v1
30+
uses: docker/login-action@v2
3131
with:
3232
registry: ghcr.io
3333
username: ${{ secrets.GH_USERNAME }}
3434
password: ${{ secrets.GH_TOKEN }}
3535
- name: Build and Push
36-
uses: docker/build-push-action@v2
36+
uses: docker/build-push-action@v4
3737
with:
3838
push: true
3939
tags: |
4040
ghcr.io/${{ env.REPO_LOWER }}:${{ github.event.release.tag_name }}
41+
ghcr.io/${{ env.REPO_LOWER }}:latest
4142
${{ env.REPO_LOWER }}:${{ github.event.release.tag_name }}
43+
${{ env.REPO_LOWER }}:latest

.github/workflows/docker_branches.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: Publish Docker image
22
on:
33
push:
44
branches-ignore:
5-
- 'master'
5+
- 'main'
66

77
jobs:
88
push_to_registry:
99
name: Push Docker image to Docker Hub
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out the repo
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
1414
-
1515
name: Sanitize Repo Name for Tagging
1616
run: echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]' | (read; echo REPO_LOWER=$REPLY) >> $GITHUB_ENV
@@ -25,18 +25,18 @@ jobs:
2525
type=ref,event=pr
2626
-
2727
name: Set up QEMU
28-
uses: docker/setup-qemu-action@v1
28+
uses: docker/setup-qemu-action@v2
2929
-
3030
name: Set up Docker Buildx
31-
uses: docker/setup-buildx-action@v1
31+
uses: docker/setup-buildx-action@v2
3232
-
3333
name: Login to Docker Hub
34-
uses: docker/login-action@v1
34+
uses: docker/login-action@v2
3535
with:
3636
username: ${{ secrets.DOCKERHUB_USERNAME }}
3737
password: ${{ secrets.DOCKERHUB_TOKEN }}
3838
- name: Push to Docker Hub
39-
uses: docker/build-push-action@v2
39+
uses: docker/build-push-action@v4
4040
with:
4141
push: true
4242
tags: ${{ steps.meta.outputs.tags }}

.github/workflows/lint-check.yml

+16-25
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,40 @@ name: lint-check
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
branches:
9-
- master
9+
- main
1010

1111
jobs:
1212
import_syntax_check:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616
- name: Check import syntax
1717
run: |
1818
EXITCODE=0
1919
for file in $(find . -name '*.wdl'); do
2020
>&2 echo "Checking file $file..."
2121
import_lines=$(awk '/import/' "$file")
22-
bad_lines=$(echo "$import_lines" | awk '!/https:\/\/raw.githubusercontent.com\/stjude\/xenocp\/master/ && !/https:\/\/raw.githubusercontent.com\/stjudecloud\/workflows\/master/' | grep -v '# lint-check: ignore') || true
22+
23+
bad_lines=$(echo "$import_lines" | awk '/https:\/\/raw.githubusercontent.com\/stjude\/XenoCP/') || true
2324
if [ -n "$bad_lines" ]; then
24-
>&2 echo "Must import files from the master branch on Github."
25+
>&2 echo "Imports from this repo must use relative paths!"
2526
>&2 echo "The following lines are bad:"
2627
>&2 echo "$bad_lines"
2728
>&2 echo ""
2829
EXITCODE=1
2930
fi
30-
done
31-
exit $EXITCODE
32-
docker_pull_check:
33-
runs-on: ubuntu-latest
34-
steps:
35-
- uses: actions/checkout@v2
36-
- name: Ensure SemVer'd docker images are being pulled
37-
run: |
38-
EXITCODE=0
39-
files=$(find . -name '*.wdl')
40-
for file in $files; do
41-
while IFS= read -r line; do
42-
tag=$(echo "$line" | awk -F ':' '{print substr($3, 1, length($3)-1)}')
43-
if ! [[ $tag =~ ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$ ]]; then
44-
>&2 echo "All Docker containers must be using an official SemVer tagged image"
45-
>&2 echo "Offending line: $line"
46-
>&2 echo "In file: $file"
47-
EXITCODE=1
48-
fi
49-
done < <(awk '/docker: .*stjudecloud/ || /docker: .*stjude/' < "$file")
31+
32+
bad_lines=$(echo "$import_lines" | awk '/http/ && (/main/ || /master/)') || true
33+
if [ -n "$bad_lines" ]; then
34+
>&2 echo "Imports from external repos must use a tagged release!"
35+
>&2 echo "The following lines are bad:"
36+
>&2 echo "$bad_lines"
37+
>&2 echo ""
38+
EXITCODE=1
39+
fi
40+
5041
done
5142
exit $EXITCODE

.github/workflows/miniwdl-check.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ jobs:
66
miniwdl_check:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- name: Set up Python
11-
uses: actions/setup-python@v1
11+
uses: actions/setup-python@v4
1212
with:
13-
python-version: '3.6'
13+
python-version: '3.10'
1414
- name: Install miniwdl
1515
run: |
1616
python -m pip install --upgrade pip
@@ -20,10 +20,7 @@ jobs:
2020
EXITCODE=0
2121
echo "Checking WDL files using \`miniwdl check\`."
2222
files=$(find . -name '*.wdl')
23-
for file in $files; do
24-
sed -i 's,https://raw.githubusercontent.com/stjude/xenocp/'"$(echo ${GITHUB_REF#refs/heads/})"','"$(pwd)"',g' "$file"
25-
sed -i 's,https://raw.githubusercontent.com/stjude/xenocp/master,'"$(pwd)"',g' "$file"
26-
done
23+
2724
for file in $files; do
2825
echo " [***] $file [***]"
2926
miniwdl check "$file"

.github/workflows/release-check.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: release-check
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
pull_request:
8+
branches:
9+
- release
10+
11+
jobs:
12+
docker_pull_check:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Ensure SemVer'd docker images are being pulled
17+
run: |
18+
EXITCODE=0
19+
files=$(find . -name '*.wdl')
20+
for file in $files; do
21+
while IFS= read -r line; do
22+
tag=$(echo "$line" | awk -F ':' '{print substr($3, 1, length($3)-1)}')
23+
if ! [[ $tag =~ ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$ ]]; then
24+
>&2 echo "All Docker containers must be using an official SemVer tagged image"
25+
>&2 echo "Offending line: $line"
26+
>&2 echo "In file: $file"
27+
EXITCODE=1
28+
fi
29+
done < <(awk '/docker: .*stjudecloud/ || /docker: .*stjude/' < "$file")
30+
done
31+
exit $EXITCODE

Dockerfile

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM ubuntu:18.04 as builder
1+
FROM ubuntu:20.04 as builder
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
24

35
RUN apt-get update \
46
&& apt-get --yes install \
@@ -73,7 +75,7 @@ RUN cd /tmp/xenocp \
7375
&& gradle installDist \
7476
&& cp -r build/install/xenocp /opt
7577

76-
FROM ubuntu:18.04
78+
FROM ubuntu:20.04
7779

7880
RUN apt-get update \
7981
&& apt-get --yes install --no-install-recommends \
@@ -82,6 +84,7 @@ RUN apt-get update \
8284
openjdk-11-jre-headless \
8385
python3 \
8486
python3-distutils \
87+
python-is-python3 \
8588
file \
8689
&& rm -rf /var/lib/apt/lists/*
8790

@@ -98,4 +101,4 @@ COPY --from=builder /opt/xenocp/bin/* /usr/local/bin/
98101

99102
COPY cwl /opt/xenocp/cwl
100103

101-
ENTRYPOINT ["cwl-runner", "--parallel", "--outdir", "results", "/opt/xenocp/cwl/xenocp.cwl"]
104+
ENTRYPOINT ["cwl-runner", "--parallel", "--outdir", "results", "--no-container", "/opt/xenocp/cwl/xenocp.cwl"]

RELEASE.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Release
2+
3+
* [ ] Update version in `dx_app/dxapp.json`.
4+
* [ ] Update `wdl/tools/xenocp.wdl` with version.
5+
* [ ] Update `wdl/workflows/xenocp.wdl` with version.

bin/picard

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
java -jar /opt/picard/lib/picard*.jar "$@"

cwl/bwa_mem_onlymapped.cwl

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ hints:
1212
tweak_sam:
1313
specs: ["java.sh org.stjude.compbio.sam.TweakSam"]
1414

15+
requirements:
16+
ResourceRequirement:
17+
ramMin: 15000
18+
coresMin: 1
19+
1520
inputs:
1621
ref_db_prefix:
1722
type: string

cwl/cat.cwl

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env cwl-runner
2+
3+
cwlVersion: v1.0
4+
class: CommandLineTool
5+
doc: |
6+
Merge a set of files into file using the cat utility.
7+
8+
requirements:
9+
- class: InlineJavascriptRequirement
10+
11+
baseCommand: cat
12+
13+
inputs:
14+
output_file:
15+
type: string
16+
doc: |
17+
Name of final file.
18+
19+
input_files:
20+
type: File[]
21+
inputBinding:
22+
position: 4
23+
doc: |
24+
Array of files to merge.
25+
26+
stdout: $(inputs.output_file)
27+
28+
outputs:
29+
combined_file:
30+
type: File
31+
outputBinding:
32+
glob: $(inputs.output_file)

0 commit comments

Comments
 (0)