Commit 1182bbed authored by Ben Avison's avatar Ben Avison
Browse files

Initial commit

parents
Pipeline #631 passed with stage
in 4 seconds
stages:
- generate
variables:
GIT_SUBMODULE_STRATEGY: normal
generate:
stage: generate
tags: [ cross ]
script:
# Ensure submodules are checked out and up-to-date with their remote
# tracking branches. There is no need to check out the 'All' superproject
# recursively - we're only interested in its .gitmodules file.
- git submodule update --init --remote
# For the submodule that holds the autogenerated YAML files, create a
# branch whose name matches the branch in this source project.
- cd CI
- git checkout --detach
- git branch | grep -q $CI_COMMIT_BRANCH && git branch -D $CI_COMMIT_BRANCH || true
- git checkout -b $CI_COMMIT_BRANCH
- cd -
# Do the actual YAML generation
- ./refresh.awk $EXTRA_PROJECTS
# Create a commit containing the autogenerated YAML files (this will
# have ROOL in the author field) and push it to the neighbouring project
# (i.e. when we are triggered due to pushing to a fork project, the
# autogenerated files will be pushed to the branch of the same name in
# the fork project owned by the same user). For this to work, you need
# to configure your fork project in Settings -> CI/CD -> Variables so
# that USER and PASSWORD contain credentials of a user which has
# permission to push to the neighbouring project.
- cd CI
- git add *.yml
- git diff --cached --quiet --exit-code || git commit -m "Refresh YAML files" -m "Generated by $CI_PIPELINE_URL"
- URL=${CI_REPOSITORY_URL#*@}
- URL=${URL%.git}
- git push "https://$USER:$PASSWORD@${URL%_Source}.git" $CI_COMMIT_BRANCH
[submodule "BuildSys"]
path = BuildSys
url = ../../RiscOS/BuildSys.git
[submodule "All"]
path = All
url = ../../Products/All.git
[submodule "CI"]
path = CI
url = ../CI.git
Subproject commit ec9f534d7052d35a9200de78b31524e54f37f45b
Subproject commit 9cedcd56ec2441af8215c7aa554ae17e15061f7e
Subproject commit ebd652f5129973b216c26ca7845682ae54c22479
Copyright (c) 2020, RISC OS Open Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of RISC OS Open Ltd nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
# CI_Source
This project contains a script that autogenerates the YAML configuration
files for GitLab CI in most of the other projects on this server.
It can be executed manually, but most often it is expected to operate as
part of this project's own CD job.
This diff is collapsed.
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