Commit 476f6c6b authored by Chris Croome's avatar Chris Croome

The debs are lost again?!

parent df7a3287
Pipeline #3480 failed with stages
in 1 minute and 46 seconds
stages:
- build
- test
# - deploy
- deploy
before_script:
- apt-get update
......@@ -13,21 +13,27 @@ before_script:
- apt-get -y dist-upgrade
- apt-get -y install ansible
- echo "${GPG_PRIVATE_KEY}" > /dev/shm/sec.gpg && chmod 600 /dev/shm/sec.gpg
- mkdir /root/.ssh && chmod 700 /root/.ssh
- eval $(ssh-agent -s)
- echo "${SSH_PRIVATE_KEY}" | tr -d '\r' | ssh-add -
- echo "${SSH_KNOWN_HOSTS}" > /root/.ssh/known_hosts && chmod 644 /root/.ssh/known_hosts
build:
stage: build
script:
- ansible-playbook --extra-vars "hostname=localhost" -i "localhost," -c local build.yml -v
artifacts:
paths:
- debs/
expire_in: 1 week
test:
stage: test
script:
- ansible-playbook --extra-vars "hostname=localhost" -i "localhost," -c local test.yml -v
#deploy:
# stage: deploy
# script:
# - ansible-playbook --extra-vars "hostname=localhost" -i "localhost," -c local deploy.yml -v
#
#
#
deploy:
stage: deploy
script:
- ansible-playbook --extra-vars "hostname=localhost" -i "localhost," -c local deploy.yml -v
when: manual
---
- name: Deploy
hosts: "{{ hostname }}"
vars:
php_ssh_user_and_domain: deb@webarch4.co.uk
roles:
- deploy
......@@ -115,6 +115,14 @@
args:
chdir: "/build/src/{{ php_dir.stdout }}"
- name: Find the .deb files that have been built
command: find /build/src -name "*.deb"
- name: rsync the debs to the artifacts directory
command: rsync -aq /build/src/*.deb /builds/webarch/php/debs/
args:
warn: no
- name: Loop through the .deb files signing them
command: "dpkg-sig --sign builder {{ item }}"
args:
......@@ -122,11 +130,6 @@
with_fileglob:
- "/build/src/*.deb"
- name: rsync the debs to the artifacts directory
command: rsync -aq /build/src/*.deb /builds/webarch/php/debs/
args:
warn: no
- name: Add the debs to the repo
command: "reprepro -Vb . includedeb {{ php_distro }} {{ item }}"
args:
......
---
- name: Rsync the files to the repo
command: "rsync -aq --delete /build/repo/ {{ php_ssh_user_and_domain }}:sites/default/"
---
- name: Test
hosts: "{{ hostname }}"
roles:
- test
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment