Skip to content

Commit 1205ce2

Browse files
committed
setup gocd pipeline
1 parent 82d3472 commit 1205ce2

File tree

4 files changed

+96
-11
lines changed

4 files changed

+96
-11
lines changed

Dockerfile

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
ARG PRIVATE_REGISTRY=ci.ru.aegean.gr:5000
2+
FROM ${PRIVATE_REGISTRY}/base20:ruby
3+
4+
RUN apt-get -y update && apt-get -y install mariadb-server mariadb-client libmysqlclient-dev postgresql postgresql-contrib
5+
#RUN apt-get -y purge google-chrome-stable \
6+
# && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
7+
# && dpkg -i google-chrome*.deb \
8+
# && sed -i -e 's@exec -a "$0" "$HERE/chrome" "$\@"@exec -a "$0" "$HERE/chrome" "$\@" --no-sandbox --user-data-dir $HOME/chrome-dir@g' /opt/google/chrome/google-chrome
9+
10+
#chrome driver
11+
#https://stackoverflow.com/questions/50692358/how-to-work-with-a-specific-version-of-chromedriver-while-chrome-browser-gets-up
12+
ARG RUBY_VERSION_TO_INSTALL1=2.7.8
13+
RUN rbenv install ${RUBY_VERSION_TO_INSTALL1} && rbenv global ${RUBY_VERSION_TO_INSTALL1} \
14+
&& rbenv rehash && gem install bundler
15+
16+
#ARG RUBY_VERSION_TO_INSTALL2=3.0.6
17+
#RUN rbenv install ${RUBY_VERSION_TO_INSTALL2} && rbenv global ${RUBY_VERSION_TO_INSTALL2} \
18+
#&& rbenv rehash && gem install bundler
19+
#
20+
#ARG RUBY_VERSION_TO_INSTALL3=3.1.4
21+
#RUN rbenv install ${RUBY_VERSION_TO_INSTALL3} && rbenv global ${RUBY_VERSION_TO_INSTALL3} \
22+
#&& rbenv rehash && gem install bundler
23+
#
24+
#ARG RUBY_VERSION_TO_INSTALL4=3.2.2
25+
#RUN rbenv install ${RUBY_VERSION_TO_INSTALL4} && rbenv global ${RUBY_VERSION_TO_INSTALL4} \
26+
#&& rbenv rehash && gem install bundler
27+
28+
ENV PGUSER=postgres
29+
ENV PGPORT=5432
30+
ENV PGHOST=localhost
31+
32+
RUN sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/*/main/pg_hba.conf
33+
34+
RUN git config --global --add safe.directory /root/hyperstack
35+
36+
## RUN apt-get purge google-chrome-stable
37+
#RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
38+
#RUN dpkg -i google-chrome*.deb
39+
40+
#RUN apt-get install -y chromium-chromedriver \
41+
## && ln -s /usr/lib/chromium-browser/chromium-browser /usr/bin/google-chrome \
42+
# && ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/chromedriver
43+
# pg_ctlcluster 12 main start
44+
#RUN curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
45+
#RUN apt-get install -y ./google-chrome-stable_current_amd64.deb
46+
#RUN rm google-chrome-stable_current_amd64.deb
47+
48+
#&& \
49+
# gem install rubygems-update && gem update --system && gem update && rbenv rehash

docker-compose.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
version: '3.5'
2+
3+
volumes:
4+
local_gems:
5+
external: true
6+
name: local_gems
7+
# rails_cache:
8+
# node_modules:
9+
# packs:
10+
# packs-test:
11+
12+
networks:
13+
default:
14+
name: development_network
15+
driver: bridge
16+
ipam:
17+
driver: default
18+
config:
19+
- subnet: ${CONTAINER_SUBNET}
20+
21+
22+
services:
23+
#############################
24+
# Setup the base containers #
25+
#############################
26+
27+
hyperstack:
28+
image: ${PRIVATE_REGISTRY}/base20:hyperstack
29+
domainname: ${BASE_TEST_DOMAIN}
30+
hostname: hyperstack
31+
container_name: "hyperstack"
32+
entrypoint: ./runall
33+
stdin_open: true
34+
tty: true
35+
working_dir: /root/hyperstack
36+
environment:
37+
BUNDLE_PATH: "/root/local_gems"
38+
volumes:
39+
- ${MOUNT_PATH:-..}/hyperstack:/root/hyperstack
40+
- local_gems:/root/local_gems
41+
networks:
42+
default:

hyperstack.gocd.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,9 @@ pipelines:
2828
timeout: 0
2929
tasks:
3030
- exec:
31-
# arguments:
32-
# - run
33-
# - -w
34-
# - /root/hyperstack
35-
# - -v
36-
# - .:/root/hyperstack
37-
# - ${PRIVATE_REGISTRY}/base20:hyperstack
38-
# - ./runall
39-
command: ./run
31+
arguments:
32+
- compose
33+
- run
34+
- hyperstack
35+
command: docker
4036
run_if: passed

run

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)