Chown files to a custom user after building
parent
a1f68ab26c
commit
d36a0bef5e
|
|
@ -106,6 +106,10 @@ inputs:
|
||||||
|
|
||||||
Parameters must start with a hyphen (-) and may be followed by a value (without hyphen).
|
Parameters must start with a hyphen (-) and may be followed by a value (without hyphen).
|
||||||
Parameters without a value will be considered booleans (with a value of true).
|
Parameters without a value will be considered booleans (with a value of true).
|
||||||
|
chownFilesTo:
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
description: After building, change the ownership of the created files to this user
|
||||||
allowDirtyBuild:
|
allowDirtyBuild:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -143,6 +143,19 @@ if [[ "$BUILD_TARGET" == "StandaloneOSX" ]]; then
|
||||||
chmod +x $ADD_PERMISSIONS_PATH
|
chmod +x $ADD_PERMISSIONS_PATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [[ -n "$CHOWN_FILES_TO" ]]; then
|
||||||
|
if [[ -n "$BUILD_PATH_FULL" ]]; then
|
||||||
|
chown -R $CHOWN_FILES_TO $BUILD_PATH_FULL
|
||||||
|
fi
|
||||||
|
if [[ -n "$UNITY_PROJECT_PATH" ]]; then
|
||||||
|
chown -R $CHOWN_FILES_TO $UNITY_PROJECT_PATH
|
||||||
|
fi
|
||||||
|
if [[ -n "$CUSTOM_BUILD_PATH" ]]; then
|
||||||
|
chown -R $CHOWN_FILES_TO $CUSTOM_BUILD_PATH
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Results
|
# Results
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ export const mockGetFromUser = jest.fn().mockResolvedValue({
|
||||||
buildMethod: undefined,
|
buildMethod: undefined,
|
||||||
buildVersion: '1.3.37',
|
buildVersion: '1.3.37',
|
||||||
customParameters: '',
|
customParameters: '',
|
||||||
|
chownFilesTo: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,10 @@ class AWS {
|
||||||
name: 'CUSTOM_PARAMETERS',
|
name: 'CUSTOM_PARAMETERS',
|
||||||
value: buildParameters.customParameters,
|
value: buildParameters.customParameters,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'CHOWN_FILES_TO',
|
||||||
|
value: buildParameters.chownFilesTo,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'BUILD_TARGET',
|
name: 'BUILD_TARGET',
|
||||||
value: buildParameters.platform,
|
value: buildParameters.platform,
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ class BuildParameters {
|
||||||
androidKeyaliasName: Input.androidKeyaliasName,
|
androidKeyaliasName: Input.androidKeyaliasName,
|
||||||
androidKeyaliasPass: Input.androidKeyaliasPass,
|
androidKeyaliasPass: Input.androidKeyaliasPass,
|
||||||
customParameters: Input.customParameters,
|
customParameters: Input.customParameters,
|
||||||
|
chownFilesTo: Input.chownFilesTo,
|
||||||
remoteBuildCluster: Input.remoteBuildCluster,
|
remoteBuildCluster: Input.remoteBuildCluster,
|
||||||
awsStackName: Input.awsStackName,
|
awsStackName: Input.awsStackName,
|
||||||
kubeConfig: Input.kubeConfig,
|
kubeConfig: Input.kubeConfig,
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ class Docker {
|
||||||
androidKeyaliasName,
|
androidKeyaliasName,
|
||||||
androidKeyaliasPass,
|
androidKeyaliasPass,
|
||||||
customParameters,
|
customParameters,
|
||||||
|
chownFilesTo,
|
||||||
} = parameters;
|
} = parameters;
|
||||||
|
|
||||||
const command = `docker run \
|
const command = `docker run \
|
||||||
|
|
@ -62,6 +63,7 @@ class Docker {
|
||||||
--env ANDROID_KEYALIAS_NAME="${androidKeyaliasName}" \
|
--env ANDROID_KEYALIAS_NAME="${androidKeyaliasName}" \
|
||||||
--env ANDROID_KEYALIAS_PASS="${androidKeyaliasPass}" \
|
--env ANDROID_KEYALIAS_PASS="${androidKeyaliasPass}" \
|
||||||
--env CUSTOM_PARAMETERS="${customParameters}" \
|
--env CUSTOM_PARAMETERS="${customParameters}" \
|
||||||
|
--env CHOWN_FILES_TO="${chownFilesTo}" \
|
||||||
--env GITHUB_REF \
|
--env GITHUB_REF \
|
||||||
--env GITHUB_SHA \
|
--env GITHUB_SHA \
|
||||||
--env GITHUB_REPOSITORY \
|
--env GITHUB_REPOSITORY \
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,10 @@ class Input {
|
||||||
return core.getInput('customParameters') || '';
|
return core.getInput('customParameters') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static get chownFilesTo() {
|
||||||
|
return core.getInput('chownFilesTo') || '';
|
||||||
|
}
|
||||||
|
|
||||||
static get remoteBuildCluster() {
|
static get remoteBuildCluster() {
|
||||||
return core.getInput('remoteBuildCluster') || '';
|
return core.getInput('remoteBuildCluster') || '';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -222,6 +222,10 @@ class Kubernetes {
|
||||||
name: 'CUSTOM_PARAMETERS',
|
name: 'CUSTOM_PARAMETERS',
|
||||||
value: this.buildParameters.customParameters,
|
value: this.buildParameters.customParameters,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'CHOWN_FILES_TO',
|
||||||
|
value: this.buildParameters.chownFilesTo,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'BUILD_TARGET',
|
name: 'BUILD_TARGET',
|
||||||
value: this.buildParameters.platform,
|
value: this.buildParameters.platform,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue