Skip to content
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

Nightly builds #2153

Merged
merged 6 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ce-provision-test-gitlab.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Run GitLab server test build

# Run this workflow nightly and every time a new commit pushed to your repository
# Run this workflow every time a new commit is pushed to your repository
on:
schedule:
- cron: '30 4 * * *'
pull_request:

jobs:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/ce-provision-test-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Run night test builds

# Run this workflow nightly
on:
schedule:
- cron: '30 4 * * *'

jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
test-nightly:
# Name the Job
name: Build server with ce-provision
# Set the type of machine to run on
runs-on: ubuntu-latest

# Use our ce-dev Debian base container
container:
image: codeenigma/ce-dev:2.x
volumes:
- ${{ github.workspace }}:/home/controller

steps:
- name: Install ce-provision
run: |
/usr/bin/curl -LO https://raw.githubusercontent.com/codeenigma/ce-provision/2.x/install.sh
/usr/bin/chmod +x ./install.sh
/usr/bin/sudo ./install.sh --docker --no-firewall

# Run a web server provision
- name: Prepare Git repos on disk
run: |
/usr/bin/git config --global --add safe.directory /home/controller/ce-provision
/usr/bin/git config --global --add safe.directory /home/controller/ce-provision/config

- name: Start SSHD
run: /usr/sbin/sshd&

- name: Provision a test web server
run: /usr/bin/su - controller -c "cd /home/controller/ce-provision && /bin/sh /home/controller/ce-provision/scripts/provision.sh --python-interpreter /home/controller/ce-python/bin/python3 --repo dummy --branch dummy --workspace /home/controller/ce-provision/ce-dev/ansible --playbook plays/web/ci.yml --own-branch 2.x --config-branch 2.x --force"

- name: Provision a test GitLab server
run: /usr/bin/su - controller -c "cd /home/controller/ce-provision && /bin/sh /home/controller/ce-provision/scripts/provision.sh --python-interpreter /home/controller/ce-python/bin/python3 --repo dummy --branch dummy --workspace /home/controller/ce-provision/ce-dev/ansible --playbook plays/gitlab/ci.yml --own-branch 2.x --config-branch 2.x --force"
4 changes: 1 addition & 3 deletions .github/workflows/ce-provision-test-web.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Run web server test build

# Run this workflow nightly and every time a new commit pushed to your repository
# Run this every time a new commit is pushed to your repository
on:
schedule:
- cron: '30 4 * * *'
pull_request:

jobs:
Expand Down
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ usage(){
/usr/bin/echo '--version: ce-provision version to use (default: 2.x)'
/usr/bin/echo '--user: Ansible controller user (default: controller)'
/usr/bin/echo '--config: Git URL to your ce-provision Ansible config repository (default: https://github.com/codeenigma/ce-provision-config-example.git)'
/usr/bin/echo '--config-branch: branch of your Ansible config repository to use (default: 1.x)'
/usr/bin/echo '--config-branch: branch of your Ansible config repository to use (default: 2.x)'
/usr/bin/echo '--no-firewall: skip installing iptables with ports 22, 80 and 443 open'
/usr/bin/echo '--gitlab: install GitLab CE on this server (default: no, set to desired GitLab address to install, e.g. gitlab.example.com)'
/usr/bin/echo '--letsencrypt: try to create an SSL certificate with LetsEncrypt (requires DNS pointing at this server for provided GitLab URL)'
Expand Down Expand Up @@ -72,7 +72,7 @@ parse_options(){
VERSION="2.x"
CONTROLLER_USER="controller"
CONFIG_REPO="https://github.com/codeenigma/ce-provision-config-example.git"
CONFIG_REPO_BRANCH="1.x"
CONFIG_REPO_BRANCH="2.x"
GITLAB_URL="no"
LE_SUPPORT="no"
FIREWALL="true"
Expand Down
Loading