snap: official image / test (#10168)
* official image / test * fix / test * bit more necromancy * fix paths * add source bin/df /test * add source bin/df /test2 * something w paths /test * something w paths /test * add source-type /test * show paths /test * copy plugin /test * plugin -> nil * install rhash * no questions while installing rhash * publish snap only for release
This commit is contained in:
		
							parent
							
								
									d8394bded7
								
							
						
					
					
						commit
						a4dc85543b
					
				@ -103,9 +103,9 @@ publish-docker:
 | 
			
		||||
    - scripts/gitlab/publish-docker.sh parity
 | 
			
		||||
 | 
			
		||||
publish-snap:
 | 
			
		||||
  stage:                           publish
 | 
			
		||||
  stage:                           optional #publish
 | 
			
		||||
  only:                            *releaseable_branches
 | 
			
		||||
  image:                           parity/snapcraft:gitlab-ci
 | 
			
		||||
  image:                           snapcore/snapcraft
 | 
			
		||||
  variables:
 | 
			
		||||
    BUILD_ARCH:                  amd64
 | 
			
		||||
  cache: {}
 | 
			
		||||
 | 
			
		||||
@ -21,7 +21,19 @@ SNAP_PACKAGE="parity_"$VERSION"_"$BUILD_ARCH".snap"
 | 
			
		||||
echo "__________Create snap package__________"
 | 
			
		||||
echo "Release channel :" $GRADE " Branch/tag: " $CI_COMMIT_REF_NAME
 | 
			
		||||
echo $VERSION:$GRADE:$BUILD_ARCH
 | 
			
		||||
cat scripts/snap/snapcraft.template.yaml | envsubst '$VERSION:$GRADE:$BUILD_ARCH:$CARGO_TARGET' > snapcraft.yaml
 | 
			
		||||
# cat scripts/snap/snapcraft.template.yaml | envsubst '$VERSION:$GRADE:$BUILD_ARCH:$CARGO_TARGET' > snapcraft.yaml
 | 
			
		||||
# a bit more necromancy (substitutions):
 | 
			
		||||
pwd
 | 
			
		||||
cd /builds/$CI_PROJECT_PATH/scripts/snap/
 | 
			
		||||
sed -e 's/$VERSION/'"$VERSION"'/g' \
 | 
			
		||||
    -e 's/$GRADE/'"$GRADE"'/g' \
 | 
			
		||||
    -e 's/$BUILD_ARCH/'"$BUILD_ARCH"'/g' \
 | 
			
		||||
    -e 's/$CARGO_TARGET/'"$CARGO_TARGET"'/g' \
 | 
			
		||||
    snapcraft.template.yaml > /builds/$CI_PROJECT_PATH/snapcraft.yaml
 | 
			
		||||
cd /builds/$CI_PROJECT_PATH
 | 
			
		||||
pwd
 | 
			
		||||
apt update
 | 
			
		||||
apt install -y --no-install-recommends rhash
 | 
			
		||||
cat snapcraft.yaml
 | 
			
		||||
snapcraft --target-arch=$BUILD_ARCH
 | 
			
		||||
ls *.snap
 | 
			
		||||
 | 
			
		||||
@ -50,8 +50,4 @@ parts:
 | 
			
		||||
      cp -v ethkey $SNAPCRAFT_PART_INSTALL/usr/bin/ethkey
 | 
			
		||||
      cp -v ethstore $SNAPCRAFT_PART_INSTALL/usr/bin/ethstore
 | 
			
		||||
      cp -v whisper $SNAPCRAFT_PART_INSTALL/usr/bin/whisper
 | 
			
		||||
    stage-packages: [libc6, libudev1, libstdc++6, cmake, libdb]
 | 
			
		||||
  df:
 | 
			
		||||
    plugin:         nil
 | 
			
		||||
    stage-packages: [coreutils]
 | 
			
		||||
    stage:          [bin/df]
 | 
			
		||||
    stage-packages: [libc6, libudev1, libstdc++6, cmake, libdb5.3]
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user