Skip to content

Commit

Permalink
Fix/packaging (#20)
Browse files Browse the repository at this point in the history
* oh the changes we are a testing

* packaging updates

* tune up some permissions

* revert devcontainer from local test

---------

Co-authored-by: stewartshea <>
  • Loading branch information
stewartshea authored Nov 6, 2024
1 parent af08fd6 commit a535ebf
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
20 changes: 13 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
ARG BASE_IMAGE=us-docker.pkg.dev/runwhen-nonprod-shared/public-images/robot-runtime-base-image:latest
FROM ${BASE_IMAGE}

ENV ROBOT_LOG_DIR /robot_logs
ENV RUNWHEN_HOME=/home/runwhen
ENV ROBOT_LOG_DIR=/robot_logs


USER root
# Set up specific RunWhen Home Dir and Permissions
WORKDIR $RUNWHEN_HOME

# Ensure `runwhen` user has a fixed UID and GID (1000)
RUN usermod -u 1000 runwhen && \
groupmod -g 1000 runwhen

# Install additional packages
RUN apt-get update && \
apt-get install -y --no-install-recommends sudo && \
Expand All @@ -24,14 +28,15 @@ RUN wget https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform
#Install go-task
RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin

# Set Log Output Dir
RUN mkdir -p $ROBOT_LOG_DIR
RUN chown -R runwhen:0 $ROBOT_LOG_DIR
# Create the Log Output Directory as root, then change ownership to `runwhen`
RUN mkdir -p $ROBOT_LOG_DIR && \
chown runwhen:0 $ROBOT_LOG_DIR && \
chmod 775 $ROBOT_LOG_DIR

# Set up dev scaffolding
COPY --chown=runwhen:0 dev_facade dev_facade
# COPY --chown=runwhen:0 dev_facade dev_facade
COPY --chown=runwhen:0 auth auth
COPY --chown=runwhen:0 .pylintrc.google LICENSE ro .
COPY --chown=runwhen:0 .pylintrc.google LICENSE ro requirements.txt .


# Add runwhen user to sudoers with no password prompt
Expand All @@ -43,8 +48,9 @@ USER runwhen
# Set the PATH to include binaries the `runwhen` user will need
ENV PATH "$PATH:/usr/local/bin:/home/runwhen/.local/bin:$RUNWHEN_HOME"


#Requirements for runrobot.py and the core and User RW libs:
RUN pip install --user --no-cache-dir -r https://raw.githubusercontent.com/runwhen-contrib/codecollection-template/main/requirements.txt
RUN pip install --user --no-cache-dir -r requirements.txt
RUN chmod -R g+w ${RUNWHEN_HOME} && \
chmod -R 0775 $RUNWHEN_HOME

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.2
0.0.3
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ robotframework>=4.1.2
jmespath>=1.0.1
python-dateutil>=2.9.0
requests>=2.31.0
thefuzz==0.20.0
pyyaml==6.0.1
jinja2==3.1.4
thefuzz>=0.20.0
pyyaml>=6.0.1
jinja2>=3.1.4
rw-devtools>=0.0.2
13 changes: 5 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
from setuptools import setup, find_packages

with open("requirements.txt") as f:
required = f.read().splitlines()
from setuptools import setup

setup(
name="rw-devtools",
version=open("VERSION").read().strip(),
packages=find_packages(where="dev_facade"),
package_dir={"": "dev_facade"},
packages=["RW"], # Explicitly list the `RW` package
package_dir={"RW": "dev_facade/RW"}, # Map `RW` to its directory
license="Apache License 2.0",
description="A set of RunWhen Developer keywords and python libraries for local development",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
author="RunWhen",
author_email="info@runwhen.com",
url="https://github.com/runwhen-contrib/rw-cli-codecollection",
install_requires=required,
url="https://github.com/runwhen-contrib/codecollection-devtools",
install_requires=open("requirements.txt").read().splitlines(),
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3",
Expand Down

0 comments on commit a535ebf

Please sign in to comment.