gocd: slfo-stagings: Fix osc staging plugin setup.
This commit is contained in:
parent
44779bbb16
commit
422a0e1ec9
@ -44,14 +44,24 @@ pipelines:
|
|||||||
- script: |-
|
- script: |-
|
||||||
set -eu
|
set -eu
|
||||||
export PYTHONPATH=$PWD/scripts
|
export PYTHONPATH=$PWD/scripts
|
||||||
|
|
||||||
|
## Setup osc staging plugin
|
||||||
|
tempdir=$(mktemp -d)
|
||||||
|
mkdir -p $tempdir/.osc-plugins
|
||||||
|
ln -s $PWD/osc-staging.py $tempdir/.osc-plugins
|
||||||
|
ln -s $PWD/osclib $tempdir/.osc-plugins
|
||||||
|
export HOME=$tempdir
|
||||||
|
|
||||||
for letter in A B C D E F G H S V Y ; do
|
for letter in A B C D E F G H S V Y ; do
|
||||||
## if the staging was frozen today, skip it
|
## if the staging was frozen today, skip it
|
||||||
if ! osc -A $STAGING_API meta attribute "${SLFO_PROJECT}:Staging:${letter}" --attribute OSRT:FreezeTime | grep $(date +%Y-%m-%d); then
|
if ! osc -A $STAGING_API meta attribute "${SLFO_PROJECT}:Staging:${letter}" --attribute OSRT:FreezeTime | grep $(date +%Y-%m-%d); then
|
||||||
osc -A $STAGING_API staging freeze -p $SLFO_PROJECT $letter
|
osc -A $STAGING_API staging freeze -p $SLFO_PROJECT $letter
|
||||||
else
|
else
|
||||||
echo Skipping "${SLFO_PROJECT}:Staging:${letter}"
|
echo "${SLFO_PROJECT}:Staging:${letter}" was frozen today, skipping it...
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
## Tear down osc staging plugin
|
||||||
|
rm -rf $tempdir
|
||||||
|
|
||||||
SUSE.SLFO.Main.Staging.A:
|
SUSE.SLFO.Main.Staging.A:
|
||||||
environment_variables:
|
environment_variables:
|
||||||
|
@ -45,14 +45,24 @@ pipelines:
|
|||||||
- script: |-
|
- script: |-
|
||||||
set -eu
|
set -eu
|
||||||
export PYTHONPATH=$PWD/scripts
|
export PYTHONPATH=$PWD/scripts
|
||||||
|
|
||||||
|
## Setup osc staging plugin
|
||||||
|
tempdir=$(mktemp -d)
|
||||||
|
mkdir -p $tempdir/.osc-plugins
|
||||||
|
ln -s $PWD/osc-staging.py $tempdir/.osc-plugins
|
||||||
|
ln -s $PWD/osclib $tempdir/.osc-plugins
|
||||||
|
export HOME=$tempdir
|
||||||
|
|
||||||
for letter in <% stagings.each do |letter| %><%= letter %> <% end -%>; do
|
for letter in <% stagings.each do |letter| %><%= letter %> <% end -%>; do
|
||||||
## if the staging was frozen today, skip it
|
## if the staging was frozen today, skip it
|
||||||
if ! osc -A $STAGING_API meta attribute "${SLFO_PROJECT}:Staging:${letter}" --attribute OSRT:FreezeTime | grep $(date +%Y-%m-%d); then
|
if ! osc -A $STAGING_API meta attribute "${SLFO_PROJECT}:Staging:${letter}" --attribute OSRT:FreezeTime | grep $(date +%Y-%m-%d); then
|
||||||
osc -A $STAGING_API staging freeze -p $SLFO_PROJECT $letter
|
osc -A $STAGING_API staging freeze -p $SLFO_PROJECT $letter
|
||||||
else
|
else
|
||||||
echo Skipping "${SLFO_PROJECT}:Staging:${letter}"
|
echo "${SLFO_PROJECT}:Staging:${letter}" was frozen today, skipping it...
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
## Tear down osc staging plugin
|
||||||
|
rm -rf $tempdir
|
||||||
<% stagings.each do |letter| %>
|
<% stagings.each do |letter| %>
|
||||||
SUSE.SLFO.Main.Staging.<%= letter %>:
|
SUSE.SLFO.Main.Staging.<%= letter %>:
|
||||||
environment_variables:
|
environment_variables:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user