Skip to content

Commit 0dd733b

Browse files
Use mounted secrets (#51)
1 parent 0775786 commit 0dd733b

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

docs/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All **user-facing**, notable changes will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.15.0] - 2024-09-17
8+
### Changed
9+
- Use mounted secrets when building the image. This hides the secret
10+
environment variables, so they can't be accessed after the build.
11+
712
## [2.14.5] - 2024-06-05
813
### Changed
914
- Job type format updated to new Racetrack interface for defining job types.

docs/compatibility.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ This document describes compatibility of the versions of this plugin with the Ra
1717
| 2.13.2 | `>= 2.26.0` |
1818
| 2.14.0 | `>= 2.26.0` |
1919
| 2.14.5 | `>= 2.30.0` |
20+
| 2.15.0 | `> 2.32.1` |

src/job-template.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ RUN mkdir -p /usr/share/man/man1 && apt-get update -y &&\
4444
{% if manifest_jobtype_extra.requirements_path %}
4545
COPY "{{ manifest_jobtype_extra.requirements_path }}" /src/job/
4646
# Install job's requirements in isolated environment
47-
RUN . /src/job-venv/bin/activate &&\
47+
RUN --mount=type=secret,id=build_secrets,target=/run/secrets/build_secrets.env \
48+
. /src/job-venv/bin/activate &&\
4849
cd /src/job/ &&\
49-
pip install -r "{{ manifest_jobtype_extra.requirements_path }}" &&\
50+
env $(cat /run/secrets/build_secrets.env | xargs) pip install -r "{{ manifest_jobtype_extra.requirements_path }}" &&\
5051
rm -rf /root/.cache/pip
5152
{%- if manifest_jobtype_extra.get('check_requirements', true) in [true, 'true'] %}
5253
# check for dependency conflicts

src/plugin-manifest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: python3-job-type
2-
version: 2.14.6
2+
version: 2.15.0
33
url: 'https://github.com/TheRacetrack/plugin-python-job-type'
44
category: 'job-type'

0 commit comments

Comments
 (0)