Skip to content

Commit

Permalink
Merge pull request #73 from bndabbs/master
Browse files Browse the repository at this point in the history
Update Concourse pipelines to use new URLs
  • Loading branch information
dcode authored Apr 26, 2019
2 parents d1063a0 + 297f1b8 commit 3127bb7
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 23 deletions.
21 changes: 11 additions & 10 deletions concourse/create_iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ GPG_KEY_PASS="$2"
GPG_KEY="$3"
ENABLE_TESTING=$4
OFFICIAL_RELEASE=$5
PULP_HOST=$6

if [[ $OFFICIAL_RELEASE -eq 1 ]]; then
# Curl the tags and find the latest tag available on github and cut out all the other cruft
Expand Down Expand Up @@ -54,11 +55,11 @@ echo "-g $GPG_KEY_NAME"
echo "-p HIDDEN PASSWORD"
echo "-i $GPG_KEY_PATH"
echo "-t $ENABLE_TESTING"
echo "-b http://pulp.cyberlab.lan/pulp/repos/centos/7.5/os/"
echo "-e http://pulp.cyberlab.lan/pulp/repos/centos/7.5/extras/"
echo "-E http://pulp.cyberlab.lan/pulp/repos/epel/7/x86_64/"
echo "-u http://pulp.cyberlab.lan/pulp/repos/centos/7.5/updates/"
echo "-l http://pulp.cyberlab.lan/pulp/repos/elastic/6/"
echo "-b http://${PULP_HOST}/pulp/repos/centos/7.5/os/"
echo "-e http://${PULP_HOST}/pulp/repos/centos/7.5/extras/"
echo "-E http://${PULP_HOST}/pulp/repos/epel/7/x86_64/"
echo "-u http://${PULP_HOST}/pulp/repos/centos/7.5/updates/"
echo "-l http://${PULP_HOST}/pulp/repos/elastic/6/"

set +x
../master-iso.sh \
Expand All @@ -68,9 +69,9 @@ set +x
-p "$GPG_KEY_PASS" \
-i "$GPG_KEY_PATH" \
-t "$ENABLE_TESTING" \
-b "http://pulp.cyberlab.lan/pulp/repos/centos/7/os/" \
-e "http://pulp.cyberlab.lan/pulp/repos/centos/7/extras/" \
-E "http://pulp.cyberlab.lan/pulp/repos/epel/7/x86_64/" \
-u "http://pulp.cyberlab.lan/pulp/repos/centos/7/updates/" \
-l "http://pulp.cyberlab.lan/pulp/repos/elastic/7/" \
-b "http://${PULP_HOST}/pulp/repos/centos/7/os/" \
-e "http://${PULP_HOST}/pulp/repos/centos/7/extras/" \
-E "http://${PULP_HOST}/pulp/repos/epel/7/x86_64/" \
-u "http://${PULP_HOST}/pulp/repos/centos/7/updates/" \
-l "http://${PULP_HOST}/pulp/repos/elastic/7/" \
-a 'https://packagecloud.io/rocknsm/2_4/el/7/$basearch'
4 changes: 3 additions & 1 deletion concourse/download_minimal_iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_MIRROR_HOST=$1

# mkdir
mkdir -p centos-minimal-iso

# download ISO
curl -sL internal-mirror.cyberlab.lan/upstream/$(curl -L -s internal-mirror.cyberlab.lan/upstream | awk -F '"' '/href.*Minimal/ {print $2}') -o centos-minimal-iso/centos-minimal.iso
curl -sL ${LOCAL_MIRROR_HOST}/upstream/$(curl -L -s ${LOCAL_MIRROR_HOST}/upstream | awk -F '"' '/href.*Minimal/ {print $2}') -o centos-minimal-iso/centos-minimal.iso
12 changes: 9 additions & 3 deletions concourse/pipelines/manual/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,19 @@ jobs:
outputs:
- name: centos-minimal-iso
run:
path: rock-createiso-git/concourse/download_minimal_iso.sh
path: /bin/bash
args:
- '-c'
- 'rock-createiso-git/concourse/download_minimal_iso.sh "$MIRROR_HOST"'
params:
MIRROR_HOST: ((mirror-host))
on_failure:
put: RockNSM-Slack
params:
text: "Concourse Manual failed to build. Could not retrieve a copy of centos minimal iso."
username: "Concourse-CI"
# icon_url: URL

- task: ROCK Create ISO
config:
platform: linux
Expand All @@ -57,13 +62,14 @@ jobs:
path: /bin/bash
args:
- '-c'
- 'rock-createiso-git/concourse/create_iso.sh "$GPG_KEY_NAME" "$GPG_KEY_PASS" "$GPG_KEY" "$ENABLE_TESTING" "$OFFICIAL_RELEASE"'
- 'rock-createiso-git/concourse/create_iso.sh "$GPG_KEY_NAME" "$GPG_KEY_PASS" "$GPG_KEY" "$ENABLE_TESTING" "$OFFICIAL_RELEASE" "$PULP_HOST"'
params:
GPG_KEY: ((gpg-key))
GPG_KEY_PASS: ((gpg-passphrase))
GPG_KEY_NAME: ((gpg-key-name))
ENABLE_TESTING: 1
OFFICIAL_RELEASE: 0
PULP_HOST: ((pulp-host))
on_failure:
put: RockNSM-Slack
params:
Expand Down
12 changes: 9 additions & 3 deletions concourse/pipelines/nightly/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,19 @@ jobs:
outputs:
- name: centos-minimal-iso
run:
path: rock-createiso-git/concourse/download_minimal_iso.sh
path: /bin/bash
args:
- '-c'
- 'rock-createiso-git/concourse/download_minimal_iso.sh "$MIRROR_HOST"'
params:
MIRROR_HOST: ((mirror-host))
on_failure:
put: RockNSM-Slack
params:
text: "Concourse Nightly failed to build. Could not retrieve a copy of centos minimal iso."
username: "Concourse-CI"
# icon_url: URL

- task: ROCK Create ISO
config:
platform: linux
Expand All @@ -65,13 +70,14 @@ jobs:
path: /bin/bash
args:
- '-c'
- 'rock-createiso-git/concourse/create_iso.sh "$GPG_KEY_NAME" "$GPG_KEY_PASS" "$GPG_KEY" "$ENABLE_TESTING" "$OFFICIAL_RELEASE"'
- 'rock-createiso-git/concourse/create_iso.sh "$GPG_KEY_NAME" "$GPG_KEY_PASS" "$GPG_KEY" "$ENABLE_TESTING" "$OFFICIAL_RELEASE" "$PULP_HOST"'
params:
GPG_KEY: ((gpg-key))
GPG_KEY_PASS: ((gpg-passphrase))
GPG_KEY_NAME: ((gpg-key-name))
ENABLE_TESTING: 1
OFFICIAL_RELEASE: 0
PULP_HOST: ((pulp-host))
on_failure:
put: RockNSM-Slack
params:
Expand Down
10 changes: 8 additions & 2 deletions concourse/pipelines/prerelease/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ jobs:
outputs:
- name: centos-minimal-iso
run:
path: rock-createiso-git/concourse/download_minimal_iso.sh
path: /bin/bash
args:
- '-c'
- 'rock-createiso-git/concourse/download_minimal_iso.sh "$MIRROR_HOST"'
params:
MIRROR_HOST: ((mirror-host))
on_failure:
put: RockNSM-Slack
params:
Expand All @@ -57,13 +62,14 @@ jobs:
path: /bin/bash
args:
- '-c'
- 'rock-createiso-git/concourse/create_iso.sh "$GPG_KEY_NAME" "$GPG_KEY_PASS" "$GPG_KEY" "$ENABLE_TESTING" "OFFICIAL_RELEASE"'
- 'rock-createiso-git/concourse/create_iso.sh "$GPG_KEY_NAME" "$GPG_KEY_PASS" "$GPG_KEY" "$ENABLE_TESTING" "OFFICIAL_RELEASE" "$PULP_HOST"'
params:
GPG_KEY: ((gpg-key))
GPG_KEY_PASS: ((gpg-passphrase))
GPG_KEY_NAME: ((gpg-key-name))
ENABLE_TESTING: 0
OFFICIAL_RELEASE: 0
PULP_HOST: ((pulp-host))
on_failure:
put: RockNSM-Slack
params:
Expand Down
12 changes: 9 additions & 3 deletions concourse/pipelines/release/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,19 @@ jobs:
outputs:
- name: centos-minimal-iso
run:
path: rock-createiso-git/concourse/download_minimal_iso.sh
path: /bin/bash
args:
- '-c'
- 'rock-createiso-git/concourse/download_minimal_iso.sh "$MIRROR_HOST"'
params:
MIRROR_HOST: ((mirror-host))
on_failure:
put: RockNSM-Slack
params:
text: "Concourse Official Release failed to build. Could not retrieve a copy of centos minimal iso."
username: "Concourse-CI"
# icon_url: URL

- task: ROCK Create ISO
config:
platform: linux
Expand All @@ -66,13 +71,14 @@ jobs:
path: /bin/bash
args:
- '-c'
- 'rock-createiso-git/concourse/create_iso.sh "$GPG_KEY_NAME" "$GPG_KEY_PASS" "$GPG_KEY" "$ENABLE_TESTING" "$OFFICIAL_RELEASE"'
- 'rock-createiso-git/concourse/create_iso.sh "$GPG_KEY_NAME" "$GPG_KEY_PASS" "$GPG_KEY" "$ENABLE_TESTING" "$OFFICIAL_RELEASE" "$PULP_HOST"'
params:
GPG_KEY: ((gpg-key))
GPG_KEY_PASS: ((gpg-passphrase))
GPG_KEY_NAME: ((gpg-key-name))
ENABLE_TESTING: 0
OFFICIAL_RELEASE: 1
PULP_HOST: ((pulp-host))
on_failure:
put: RockNSM-Slack
params:
Expand Down
2 changes: 1 addition & 1 deletion concourse/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ chmod 0600 /root/.ssh/*
# Upload to local mirror
rsync -e "ssh -o StrictHostKeyChecking=no -i /root/.ssh/id_ed25519" -rv rocknsm-iso/ $LOCAL_MIRROR_USER@$LOCAL_MIRROR_HOST:/var/www/mirror/public/isos/$LOCAL_MIRROR_REPO/
# Sync to public mirror
ssh -i /root/.ssh/id_ed25519 -o StrictHostKeyChecking=no admin@mirror.cyberlab.lan 'rsync -rlvtP -e "ssh -i ~/.ssh/mirror_sync" /var/www/mirror/public/ [email protected]:/var/www/mirror/ --delete'
ssh -i /root/.ssh/id_ed25519 -o StrictHostKeyChecking=no admin@${LOCAL_MIRROR_HOST} 'rsync -rlvtP -e "ssh -i ~/.ssh/mirror_sync" /var/www/mirror/public/ [email protected]:/var/www/mirror/ --delete'

0 comments on commit 3127bb7

Please sign in to comment.