Skip to content

Commit

Permalink
Fix missing additional files in PR #96 for Photon image (#101)
Browse files Browse the repository at this point in the history
Found out that PR #96 merged without some of the additional files and config in yml.

- Add Photon Tags JSON
- Add Photon Meta JSON
- Add Photon getLatestTag PowerShell script
- Update Photon to vsts-ci.yml
- Update powershell community README
  • Loading branch information
kiazhi authored and TravisEz13 committed Dec 13, 2018
1 parent 95f712e commit 6a9bb93
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 1 deletion.
6 changes: 6 additions & 0 deletions assets/README.powershellcommunity.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
* Tags: `parrot-4.2.2` , `6.1.1-parrot-4.2.2`
* Dockerfile: [/release/community-stable/parrot/docker/Dockerfile][parrotsec-linux-stable-dockerfile]
* Example: `docker pull pshorg/powershellcommunity:parrot-4.2.2`
* **[Photon Linux][parrotsec-linux-uri]**
* Tags: `photon-2.0` , `6.1.1-photon-2.0`
* Dockerfile: [/release/community-stable/photon/docker/Dockerfile][photon-linux-stable-dockerfile]
* Example: `docker pull pshorg/powershellcommunity:photon-2.0`

[amazon-linux-stable-dockerfile]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/community-stable/amazonlinux/docker/Dockerfile
[arch-linux-stable-dockerfile]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/community-stable/archlinux/docker/Dockerfile
Expand All @@ -46,6 +50,7 @@
[kali-linux-stable-dockerfile]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/community-stable/kali-rolling/docker/Dockerfile
[oracle-linux-stable-dockerfile]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/community-stable/oraclelinux/docker/Dockerfile
[parrotsec-linux-stable-dockerfile]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/community-stable/parrot/docker/Dockerfile
[photon-linux-stable-dockerfile]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/community-stable/photon/docker/Dockerfile

[amazon-linux-uri]: https://aws.amazon.com/amazon-linux-2/
[arch-linux-uri]: https://www.archlinux.org/
Expand All @@ -54,6 +59,7 @@
[kali-linux-uri]: https://www.kali.org/
[oracle-linux-uri]: https://www.oracle.com/linux/
[parrotsec-linux-uri]: https://www.parrotsec.org/
[photon-linux-uri]: https://vmware.github.io/photon/

## Legal and licensing

Expand Down
2 changes: 1 addition & 1 deletion release/community-stable/photon/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ARG PS_INSTALL_VERSION=6
# Define Args and Env needed to create links
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION

# Download the Linux tar.gz and save it
# Download the PowerShell Core Linux tar.gz and save it
ADD ${PS_PACKAGE_URL} /tmp/powershell-linux.tar.gz

# Installation of packages to uncompress downloaded package
Expand Down
14 changes: 14 additions & 0 deletions release/community-stable/photon/getLatestTag.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

# return objects representing the tags we need to base the vmware photon image on

# The versions of photon we care about
$shortTags = @('2.0')

$parent = Join-Path -Path $PSScriptRoot -ChildPath '..'
$repoRoot = Join-Path -path (Join-Path -Path $parent -ChildPath '..') -ChildPath '..'
$modulePath = Join-Path -Path $repoRoot -ChildPath 'tools\getDockerTags'
Import-Module $modulePath

Get-DockerTags -ShortTags $shortTags -Image "photon" -FullTagFilter '^2\.0\-\d{8}?$'
5 changes: 5 additions & 0 deletions release/community-stable/photon/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"IsLinux" : true,
"SkipWebCmdletTests": true,
"PackageFormat": "powershell-${PS_VERSION}-linux-x64.tar.gz"
}
4 changes: 4 additions & 0 deletions release/community-stable/photon/tags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"#psversion#-photon-#tag#",
"photon-#shorttag#"
]
9 changes: 9 additions & 0 deletions vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ phases:
preview: false
communityStable: true

- template: .vsts-ci/phase.yml
parameters:
name: photon
imagename: photon
stable: false
servicing: false
preview: false
communityStable: true

# Use CI switch to disable 1709 and 1803 builds because the VSTS hosted instances don't yet support 1709 or 1803
# Skipping previews on windows due to how long it takes to build on windows
- template: .vsts-ci/phase.yml
Expand Down

0 comments on commit 6a9bb93

Please sign in to comment.