-
Notifications
You must be signed in to change notification settings - Fork 1
Convert pipeline container to a multi-part build #220
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
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
5abfc58
Make containers for the pipeline tools separate to the main pipeline
afg1 771d962
Use buildx to enable multi-platform builds
afg1 e46d229
Switch to multi-part build for rnacentral import pipeline
afg1 ea86885
Move rust utils build into their own container
afg1 168650a
Github workflows to build rust containers and make the main pipeline …
afg1 151eafb
Improved dockerignore file
afg1 d6dc3de
Fix broken copy line
afg1 979b207
Copy only the necessary local context
afg1 ca0a3ef
Use buildx for cross platform build in docker makefile
afg1 95549d9
No need to use python image as builder for tools with no python deps
afg1 8b8d902
Cleaner handling of rust build products
afg1 365b236
Don't pipe makefile tests to /dev/null so we can see what happened
afg1 cc5a1bb
Un-ignore some important bits of context for building in docker
afg1 e922d9b
Update .github/workflows/main.yaml
afg1 f033882
Use a smaller final image for the rust utils
afg1 8f71ae1
Merge branch 'docker-multi-part-build' of github.com:RNAcentral/rnace…
afg1 d4dc295
Include missing bzip2 executable for samtools build
afg1 1a4503b
Update samtools and fix dependencies
afg1 9f76f28
Update samtools version in makefile for tagging
afg1 de85af9
Use versioned and tagged CPAT
afg1 1ee028d
Update CPAT to latest version and use new python image
afg1 e81253c
Improve tagging of CPAT container with correct version
afg1 050b7cb
Modify pipeline to reflect new cpat commandline interface
afg1 0aeed93
Add explicit version use in main dockerfile
afg1 36f7606
Add version tracking files for pipeline tool containers
afg1 3c6eb42
Use version files in local Makefile
afg1 ac9f2a9
Update workflows for new version tagging
afg1 c63dac8
Don't need to copy Makefile for rust utils build
afg1 175c6b5
Final container shouldn't need the package managers, so remove them
afg1 4a9b8fb
Use samtools version in wget urls and pass as build option in makefile
afg1 cd00a78
Add version arg for samtools github build
afg1 2ceacae
Use force rebuild variable properly
afg1 7b5a66b
Increase polling times for iter-workflow synchronisation
afg1 f591a8e
Remove apt installed tabix
afg1 c86e903
Don't copy htslib headers
afg1 0fbb5b3
Verify bgzip works in samtools container
afg1 a0aabe2
Add `/bin` for pipeline binary path containing rust tools and other s…
afg1 9a1fee7
Update manual build with multi-stage synchronisation
afg1 c555c6c
Merge branch 'dev' into docker-multi-part-build
afg1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,9 +1,39 @@ | ||
| * | ||
| !requirements.txt | ||
| !Cargo.toml | ||
| !Cargo.lock | ||
| !utils | ||
| !openssl | ||
| !uv.lock | ||
| !pyproject.toml | ||
| !Makefile | ||
| # Exclude build and development files | ||
| .git/ | ||
| .github/ | ||
| *.nf | ||
| workflows/ | ||
| tests/ | ||
| containers/ | ||
| Dockerfile.old | ||
| .dockerignore | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| pytest.ini | ||
| .python-version | ||
| RELEASE.rst | ||
| LICENSE | ||
| README.md | ||
| *.md | ||
|
|
||
| # Python artifacts | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
| .pytest_cache/ | ||
| .coverage | ||
| htmlcov/ | ||
| *.egg-info/ | ||
| dist/ | ||
| build/ | ||
|
|
||
| # IDE | ||
| .vscode/ | ||
| .idea/ | ||
| *.swp | ||
| *.swo | ||
| *~ | ||
|
|
||
| # OS | ||
| .DS_Store | ||
| Thumbs.db |
This file contains hidden or 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 hidden or 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 hidden or 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,94 @@ | ||
| # GitHub Actions workflow for building and pushing Rust utilities container | ||
| # Rebuilds when Rust code changes (utils/**, Cargo.toml, Cargo.lock) | ||
|
|
||
| name: Build Rust Utilities Container | ||
|
|
||
| on: | ||
| push: | ||
| branches: ['master', 'dev'] | ||
| paths: | ||
| - 'utils/**' | ||
| - 'Cargo.toml' | ||
| - 'Cargo.lock' | ||
| - 'containers/rust-utils/**' | ||
| - '.github/workflows/rust-container.yaml' | ||
| workflow_dispatch: | ||
| inputs: | ||
| force_rebuild: | ||
| description: 'Force rebuild Rust utilities container' | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
|
|
||
| jobs: | ||
| build-rust-utils: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| FORCE_REBUILD: ${{ github.event.inputs.force_rebuild || 'false' }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - name: Calculate Rust version | ||
| id: rust-version | ||
| run: | | ||
| VERSION_FILE="containers/rust-utils/VERSION" | ||
| VERSION_CONTENT=$(cat $VERSION_FILE) | ||
|
|
||
| if [ "$VERSION_CONTENT" = "auto" ]; then | ||
| GIT_SHA=$(git rev-parse --short=8 HEAD) | ||
|
|
||
| # Check for uncommitted changes | ||
| if ! git diff-index --quiet HEAD --; then | ||
| GIT_SHA="${GIT_SHA}-dirty" | ||
| echo "⚠️ Warning: Building with uncommitted changes" | ||
| fi | ||
|
|
||
| VERSION=$GIT_SHA | ||
| else | ||
| VERSION=$VERSION_CONTENT | ||
| fi | ||
|
|
||
| echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
| echo "🔖 Building rust-utils:$VERSION" | ||
|
|
||
| - name: Docker login | ||
| env: | ||
| DOCKER_USER: ${{ secrets.DOCKER_USER }} | ||
| DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
| run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | ||
|
|
||
| - name: Build Rust utilities container | ||
afg1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| run: | | ||
| VERSION=${{ steps.rust-version.outputs.version }} | ||
| if [ "$FORCE_REBUILD" = "true" ]; then | ||
| docker build --no-cache \ | ||
| --build-arg RUST_VERSION=${VERSION} \ | ||
| -t rnacentral/rust-utils:${VERSION} \ | ||
| -f containers/rust-utils/Dockerfile . | ||
| else | ||
| docker build \ | ||
| --build-arg RUST_VERSION=${VERSION} \ | ||
| -t rnacentral/rust-utils:${VERSION} \ | ||
| -f containers/rust-utils/Dockerfile . | ||
| fi | ||
|
|
||
| - name: Tag as latest | ||
| run: | | ||
| VERSION=${{ steps.rust-version.outputs.version }} | ||
| docker tag rnacentral/rust-utils:${VERSION} rnacentral/rust-utils:latest | ||
|
|
||
| - name: Push versioned tag | ||
| run: | | ||
| VERSION=${{ steps.rust-version.outputs.version }} | ||
| docker push rnacentral/rust-utils:${VERSION} | ||
|
|
||
| - name: Push latest tag | ||
| run: docker push rnacentral/rust-utils:latest | ||
|
|
||
| - name: Slack notification | ||
| if: always() | ||
| uses: rtCamp/action-slack-notify@v2 | ||
| env: | ||
| SLACK_MESSAGE: 'Rust utilities ${{ steps.rust-version.outputs.version }} container built and pushed: ${{ job.status }}' | ||
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
| MSG_MINIMAL: true | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.