File tree Expand file tree Collapse file tree 7 files changed +50
-3
lines changed Expand file tree Collapse file tree 7 files changed +50
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ LABEL PURPOSE="This image is configured to build Swift for the version of Amazon
1212RUN yum -y update
1313
1414# RPM and yum development tools
15- RUN yum install -y rpmdevtools yum-utils
15+ RUN yum install -y rpmdevtools yum-utils createrepo
1616
1717# Configure epel
1818RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ services:
3838 << : *common
3939 command : /bin/bash -cl "./build_rpm.sh"
4040
41+ createrepo :
42+ << : *common
43+ command : /bin/bash -cl "../shared/createrepo_rpm.sh"
44+
4145 shell :
4246 << : *common
4347 entrypoint : /bin/bash -l
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ LABEL PURPOSE="This image is configured to build Swift for the version of CentOS
1212RUN yum -y update
1313
1414# RPM and yum development tools
15- RUN yum install -y rpmdevtools yum-utils
15+ RUN yum install -y rpmdevtools yum-utils createrepo
1616
1717# Configure epel
1818RUN yum install -y epel-release centos-release-scl
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ services:
4141 << : *common
4242 command : /bin/bash -cl "./build_rpm.sh"
4343
44+ createrepo :
45+ << : *common
46+ command : /bin/bash -cl "../shared/createrepo_rpm.sh"
47+
4448 shell :
4549 << : *common
4650 entrypoint : /bin/bash -l
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ LABEL PURPOSE="This image is configured to build Swift for the version of CentOS
1212RUN yum -y update
1313
1414# RPM and yum development tools
15- RUN yum install -y rpmdevtools yum-utils
15+ RUN yum install -y rpmdevtools yum-utils createrepo
1616
1717# Configure epel and powertools
1818RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ services:
4141 << : *common
4242 command : /bin/bash -cl "./build_rpm.sh"
4343
44+ createrepo :
45+ << : *common
46+ command : /bin/bash -cl "../shared/createrepo_rpm.sh"
47+
4448 shell :
4549 << : *common
4650 entrypoint : /bin/bash -l
Original file line number Diff line number Diff line change 1+ # This source file is part of the Swift.org open source project
2+ #
3+ # Copyright (c) 2021 Apple Inc. and the Swift project authors
4+ # Licensed under Apache License v2.0 with Runtime Library Exception
5+ #
6+ # See http://swift.org/LICENSE.txt for license information
7+ # See http://swift.org/CONTRIBUTORS.txt for Swift project authors
8+
9+ #! /usr/bin/env bash
10+
11+ set -eux
12+
13+ output_dir=/output
14+ if [[ ! -d " $output_dir " ]]; then
15+ echo " $output_dir does not exist, so no place to copy the artifacts!"
16+ exit 1
17+ fi
18+
19+ # always make sure we're up to date
20+ yum update -y
21+
22+ # prepare direcoties
23+ mkdir -p " $HOME /createrepo"
24+
25+ # Copy rpm file
26+ cp " $output_dir " /* .rpm " $HOME /createrepo/"
27+
28+ # Create the repodata
29+ createrepo " $HOME /createrepo/" 2>&1 | tee " $HOME /createrepo-output.txt"
30+
31+
32+ # Include the createrepo log which can be used to determine what went
33+ # wrong if there are no artifacts
34+ cp " $HOME /createrepo-output.txt" " $output_dir "
35+ cp -r " $HOME /createrepo/repodata" " $output_dir /repodata"
You can’t perform that action at this time.
0 commit comments