Add configuration which workflow-pr binary to use #1
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ gitea-logs
|
||||
rabbitmq-data
|
||||
workflow-pr-repos
|
||||
__pycache__/
|
||||
/workflow-pr/workflow-pr
|
||||
|
||||
12
Makefile
Normal file
12
Makefile
Normal file
@@ -0,0 +1,12 @@
|
||||
up:
|
||||
podman-compose up
|
||||
|
||||
down:
|
||||
podman-compose down
|
||||
|
||||
rmi:
|
||||
podman rmi -f $$(podman images --filter=reference='giwtf_*' -q)
|
||||
|
||||
up-local-bots:
|
||||
GIWTF_WORKFLOW_PR_IMAGE_SUFFIX=.local podman-compose up --force-recreate --build
|
||||
|
||||
@@ -73,7 +73,7 @@ services:
|
||||
workflow-pr:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: workflow-pr/Dockerfile
|
||||
dockerfile: workflow-pr/Dockerfile${GIWTF_WORKFLOW_PR_IMAGE_SUFFIX}
|
||||
container_name: workflow-pr
|
||||
networks:
|
||||
- gitea-network
|
||||
|
||||
Binary file not shown.
@@ -1,17 +0,0 @@
|
||||
# Use the same base image as the Gitea container
|
||||
FROM registry.suse.com/bci/bci-base:15.7
|
||||
|
||||
# Add the custom CA to the trust store
|
||||
COPY rabbitmq-config/certs/cert.pem /usr/share/pki/trust/anchors/gitea-rabbitmq-ca.crt
|
||||
RUN update-ca-certificates
|
||||
|
||||
# Install git and ssh
|
||||
RUN zypper -n in git-core openssh-clients
|
||||
|
||||
# Copy the pre-built binary into the container
|
||||
COPY workflow-pr/workflow-pr /usr/local/bin/workflow-pr
|
||||
COPY workflow-pr/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod +4755 /usr/local/bin/entrypoint.sh
|
||||
|
||||
# Set the entrypoint for the container
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
1
workflow-pr/Dockerfile
Symbolic link
1
workflow-pr/Dockerfile
Symbolic link
@@ -0,0 +1 @@
|
||||
Dockerfile.package
|
||||
17
workflow-pr/Dockerfile.local
Normal file
17
workflow-pr/Dockerfile.local
Normal file
@@ -0,0 +1,17 @@
|
||||
# Use the same base image as the Gitea container
|
||||
FROM registry.suse.com/bci/bci-base:15.7
|
||||
|
||||
# Add the custom CA to the trust store
|
||||
COPY rabbitmq-config/certs/cert.pem /usr/share/pki/trust/anchors/gitea-rabbitmq-ca.crt
|
||||
RUN update-ca-certificates
|
||||
|
||||
# Install git and ssh
|
||||
RUN zypper -n in git-core openssh-clients
|
||||
|
||||
# Copy the pre-built binary into the container
|
||||
COPY workflow-pr/workflow-pr /usr/local/bin/workflow-pr
|
||||
COPY workflow-pr/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod +4755 /usr/local/bin/entrypoint.sh
|
||||
|
||||
# Set the entrypoint for the container
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
22
workflow-pr/Dockerfile.package
Normal file
22
workflow-pr/Dockerfile.package
Normal file
@@ -0,0 +1,22 @@
|
||||
# Use the same base image as the Gitea container
|
||||
FROM registry.suse.com/bci/bci-base:15.7
|
||||
|
||||
# Add the custom CA to the trust store
|
||||
COPY rabbitmq-config/certs/cert.pem /usr/share/pki/trust/anchors/gitea-rabbitmq-ca.crt
|
||||
RUN update-ca-certificates
|
||||
|
||||
RUN zypper ar -f http://download.opensuse.org/repositories/devel:/Factory:/git-workflow/15.7/devel:Factory:git-workflow.repo
|
||||
RUN zypper --gpg-auto-import-keys ref
|
||||
|
||||
|
||||
|
||||
# Install git and ssh
|
||||
RUN zypper -n in git-core openssh-clients autogits-workflow-pr
|
||||
|
||||
# Copy the pre-built binary into the container
|
||||
# COPY workflow-pr/workflow-pr /usr/local/bin/workflow-pr
|
||||
COPY workflow-pr/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod +4755 /usr/local/bin/entrypoint.sh
|
||||
|
||||
# Set the entrypoint for the container
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
@@ -55,4 +55,11 @@ for i in {1..10}; do
|
||||
done
|
||||
chmod 644 /root/.ssh/known_hosts
|
||||
|
||||
exec /usr/local/bin/workflow-pr "$@"
|
||||
exe=$(which workflow-pr)
|
||||
exe=${exe:-/usr/local/bin/workflow-pr}
|
||||
|
||||
package=$(rpm -qa | grep autogits-workflow-pr) || :
|
||||
|
||||
echo !!!!!!!!!!!!!!!! using binary $exe; installed package: $package
|
||||
|
||||
exec "$exe" "$@"
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user