I managed to get the tarball approach working in gitlab ci with the following steps:
- In gitlab go to settings -> CI / CD. Expand Variables and add the following variables:
- S390X_SSH_IP_ADDRESS: username@instance_ip - S390X_SSH_PRIVATE_KEY: private key of ssh connection - S390X_SSH_CI_DIRECTORY: name of directory in remote server where the tarball is extracted and tested
- Update gitlab-ci.yml as follows:
- Add this line to variables category at the top of file:
DEBIAN_BUILD: buildenv-debian
- Add these lines to the end of file
Debian.remote.s390x: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_BUILD before_script: - apt-get update -qq - apt-get install -qq git - 'which ssh-agent || ( apt-get install -qq openssh-client )' - eval $(ssh-agent -s) - ssh-add <(echo "$S390X_SSH_PRIVATE_KEY") - mkdir -p ~/.ssh - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - ssh $S390X_SSH_IP_ADDRESS "mkdir -p $S390X_SSH_CI_DIRECTORY/$CI_PIPELINE_IID" script: - tar --exclude=.git --exclude=gitlab-ci.yml -cf - . | ssh $S390X_SSH_IP_ADDRESS "cd $S390X_SSH_CI_DIRECTORY/$CI_PIPELINE_IID && tar -xf - && ./.bootstrap && ./configure --disable-documentation && make && make check" after_script: - eval $(ssh-agent -s) - ssh-add <(echo "$S390X_SSH_PRIVATE_KEY") - ssh $S390X_SSH_IP_ADDRESS "rm -rf $S390X_SSH_CI_DIRECTORY/$CI_PIPELINE_IID/ && exit" only: variables: - $S390X_SSH_IP_ADDRESS - $S390X_SSH_PRIVATE_KEY - $S390X_SSH_CI_DIRECTORY tags: - shared - linux except: - tags
This approach archives the repo files and extracts the tar in remote server in order to be built and tested. It creates a directory with a unique name in the remote server for every pipeline, also if one of the required variables is not present (defined) the job is not created, with that said fresh forks wouldn't have s390x job unless they define the s390x specific variables.
regards, Mamone