File tree 7 files changed +50
-3
lines changed 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
12
12
RUN yum -y update
13
13
14
14
# RPM and yum development tools
15
- RUN yum install -y rpmdevtools yum-utils
15
+ RUN yum install -y rpmdevtools yum-utils createrepo
16
16
17
17
# Configure epel
18
18
RUN 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:
38
38
<< : *common
39
39
command : /bin/bash -cl "./build_rpm.sh"
40
40
41
+ createrepo :
42
+ << : *common
43
+ command : /bin/bash -cl "../shared/createrepo_rpm.sh"
44
+
41
45
shell :
42
46
<< : *common
43
47
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
12
12
RUN yum -y update
13
13
14
14
# RPM and yum development tools
15
- RUN yum install -y rpmdevtools yum-utils
15
+ RUN yum install -y rpmdevtools yum-utils createrepo
16
16
17
17
# Configure epel
18
18
RUN yum install -y epel-release centos-release-scl
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ services:
41
41
<< : *common
42
42
command : /bin/bash -cl "./build_rpm.sh"
43
43
44
+ createrepo :
45
+ << : *common
46
+ command : /bin/bash -cl "../shared/createrepo_rpm.sh"
47
+
44
48
shell :
45
49
<< : *common
46
50
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
12
12
RUN yum -y update
13
13
14
14
# RPM and yum development tools
15
- RUN yum install -y rpmdevtools yum-utils
15
+ RUN yum install -y rpmdevtools yum-utils createrepo
16
16
17
17
# Configure epel and powertools
18
18
RUN 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:
41
41
<< : *common
42
42
command : /bin/bash -cl "./build_rpm.sh"
43
43
44
+ createrepo :
45
+ << : *common
46
+ command : /bin/bash -cl "../shared/createrepo_rpm.sh"
47
+
44
48
shell :
45
49
<< : *common
46
50
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